Skip to content

Commit

Permalink
fixes #14368 - update fog to 1.38.0
Browse files Browse the repository at this point in the history
  • Loading branch information
domcleal committed Mar 29, 2016
1 parent 2a08e8c commit 76be66a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gem 'gettext_i18n_rails', '~> 1.0'
gem 'rails-i18n', '~> 4.0.0'
gem 'turbolinks', '~> 2.5'
gem 'logging', '>= 1.8.0', '< 3.0.0'
gem 'fog-core', '1.35.0'
gem 'fog-core', '1.36.0'
gem 'net-scp'
if RUBY_VERSION.start_with? '1.9.'
gem 'net-ssh', '< 3'
Expand Down
2 changes: 1 addition & 1 deletion bundler.d/fog.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group :fog do
gem 'fog', '1.37.0', :require => false
gem 'fog', '1.38.0', :require => false
end
3 changes: 3 additions & 0 deletions bundler.d/openstack.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
group :openstack do
gem 'fog-openstack', '~> 0.1'
end
3 changes: 3 additions & 0 deletions bundler.d/rackspace.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
group :rackspace do
gem 'fog-rackspace', '~> 0.1'
end
33 changes: 9 additions & 24 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
end
Bundler.require(*Rails.groups)
if SETTINGS[:unattended]
%w[ec2 fog libvirt ovirt vmware gce].each do |group|
%w[ec2 fog gce libvirt openstack ovirt rackspace vmware].each do |group|
begin
Bundler.require(group)
rescue LoadError
Expand All @@ -35,13 +35,14 @@
end
end

# For standalone CR bundler groups, check that all dependencies are laoded
SETTINGS[:libvirt] = !!(defined?(::Fog::Libvirt) && defined?(::Libvirt))
SETTINGS[:gce] = !!(defined?(::Fog::Google) && defined?(::Google::APIClient::VERSION))
SETTINGS[:ec2] = !!defined?(::Fog::AWS)
SETTINGS[:vmware] = !!(defined?(::Fog::Vsphere))

SETTINGS.merge! :openstack => false, :ovirt => false, :rackspace => false
# For standalone CR bundler groups, check that the fog-* provider is registered
SETTINGS[:ec2] = Fog::Compute.providers.include?(:aws)
SETTINGS[:gce] = Fog::Compute.providers.include?(:google)
SETTINGS[:libvirt] = Fog::Compute.providers.include?(:libvirt)
SETTINGS[:openstack] = Fog::Compute.providers.include?(:openstack)
SETTINGS[:ovirt] = false
SETTINGS[:rackspace] = Fog::Compute.providers.include?(:rackspace)
SETTINGS[:vmware] = Fog::Compute.providers.include?(:vsphere)

# CRs in fog core with extra dependencies will have those deps loaded, so then
# load the corresponding bit of fog
Expand All @@ -50,22 +51,6 @@
SETTINGS[:ovirt] = Fog::Compute.providers.include?(:ovirt)
end

# CRs in fog core need to be loaded to find out if they're present as
# bundler is configured not to load fog
begin
require 'fog/openstack'
SETTINGS[:openstack] = Fog::Compute.providers.include?(:openstack)
rescue LoadError
# ignore as the fog group is missing
end

begin
require 'fog/rackspace'
SETTINGS[:rackspace] = Fog::Compute.providers.include?(:rackspace)
rescue LoadError
# ignore as the fog group is missing
end

require File.expand_path('../../lib/foreman.rb', __FILE__)
require File.expand_path('../../lib/timed_cached_store.rb', __FILE__)
require File.expand_path('../../lib/foreman/exception', __FILE__)
Expand Down

0 comments on commit 76be66a

Please sign in to comment.