Skip to content

Commit

Permalink
Fixes #15606 - fix all-in-one setup with smart-proxy 1.12+
Browse files Browse the repository at this point in the history
  • Loading branch information
iNecas committed Jul 13, 2016
1 parent 5ffdd5f commit 9d15b62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ group :test do
gem 'smart_proxy', :git => "https://github.com/theforeman/smart-proxy", :branch => "develop"
end

if RUBY_VERSION < "2.0"
gem 'json', '< 2.0.0'
gem 'rest-client', '< 1.7'
gem 'mime-types', '~> 1.0'
end

# load bundler.d
Dir["#{File.dirname(__FILE__)}/bundler.d/*.rb"].each do |bundle|
self.instance_eval(Bundler.read_file(bundle))
Expand Down
1 change: 1 addition & 0 deletions lib/smart_proxy_dynflow/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Plugin < Proxy::Plugin
https_rackup_path File.expand_path(rackup_path, File.expand_path("../", __FILE__))

settings_file "dynflow.yml"
requires :foreman_proxy, ">= 1.12.0"
default_settings :core_url => 'http://localhost:8008'
plugin :dynflow, Proxy::Dynflow::VERSION
end
Expand Down
4 changes: 2 additions & 2 deletions lib/smart_proxy_dynflow_core/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ def self.loaded!
Log.reload!
end

def self.load_from_proxy(plugin)
def self.load_from_proxy(settings)
PROXY_SETTINGS.each do |key|
SETTINGS[key] = Proxy::SETTINGS[key]
end
PLUGIN_SETTINGS.each do |key|
SETTINGS[key] = plugin.settings[key]
SETTINGS[key] = settings[key]
end
SETTINGS.plugins.values.each { |plugin| plugin.load_settings_from_proxy }
Settings.loaded!
Expand Down

0 comments on commit 9d15b62

Please sign in to comment.