fog-core 2.1.2 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37a78082a2b5880cfb9cd072a6a4cb2b3fbd93241e3ccdfc7b7af4441ef297a9
4
- data.tar.gz: 1623121246d01f7e9f4b046dfff2c7ed9d3704a21fdd9a2c6beba97f042a7c29
3
+ metadata.gz: 4fcacc9e6414f43350224925a67a7adba9395451d04271991aa7163f6abe92ec
4
+ data.tar.gz: 88e60a9bf166a5a8814071684e753d5b9c06787c0a6c53e6f7c51754c0c4efe5
5
5
  SHA512:
6
- metadata.gz: b33e459698577f22440d749e8c14390c08caedea72b48ef222dc2941cb549ec4a916e5b198ac77b4b8a85c38852bf37c8152f4d3f42c677334a8334758a0a7bd
7
- data.tar.gz: 392d7f5b448dca96a1793d8624f01165c998ccb10ab37a1779a2caff91284dabc6ac1a8cf5a837cd41a47f6833f8db590f6952551b02d009f704e17575f0b5ac
6
+ metadata.gz: 07bc031a55c69e26ca52b09081aa9c29354504725ed7a9c34c6ef2a2bf9d5d9cbd87bb8bed1b10fcdeaff2640e7ff81324d0ae4f01d32e85bb0ac48742470cfd
7
+ data.tar.gz: ed8e334529667209327093cb3a5f4cc1e1cb892c5f1b41ad7468d91c27f5220c6cee83dc4ae4d2da9ef36f7359ca6fc72edc3bf8fd2863cb2f291124ae39c51c
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- require 'bundler/setup'
1
+ require 'bundler/gem_tasks'
2
2
 
3
3
  task :default => [:test]
4
4
 
@@ -20,4 +20,4 @@ task :travis do
20
20
  Coveralls::RakeTask.new
21
21
  Rake::Task["coveralls:push"].invoke
22
22
  end
23
- end
23
+ end
@@ -1,16 +1,25 @@
1
+ 2.2.0 12/17/2019
2
+ ==========================================================
3
+
4
+ - Add explanation for service/provider format deprecation.
5
+ - Fix formatting of changelog
6
+ - Better logging around required providers for easier debugging.
7
+ - bump excon version
8
+ - add bundler gem tasks
9
+
1
10
  2.1.2 09/04/2018
2
11
  ==========================================================
3
12
 
4
- fix typo in ssh options handling
13
+ - fix typo in ssh options handling
5
14
 
6
15
  2.1.1 09/04/2018
7
16
  ==========================================================
8
17
 
9
- deprecate attributes not defined by DSL
10
- fix path_prefix warnings
11
- update to enforce best practices
12
- extract parts of ssh to private methods
13
- deprecate wrong provider names
18
+ - deprecate attributes not defined by DSL
19
+ - fix path_prefix warnings
20
+ - update to enforce best practices
21
+ - extract parts of ssh to private methods
22
+ - deprecate wrong provider names
14
23
 
15
24
 
16
25
  2.1.0 03/10/2018
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_dependency("builder")
24
24
  spec.add_dependency("mime-types")
25
- spec.add_dependency("excon", "~> 0.58")
25
+ spec.add_dependency("excon", "~> 0.71")
26
26
  spec.add_dependency("formatador", "~> 0.2")
27
27
 
28
28
  # https://github.com/fog/fog-core/issues/206
@@ -28,13 +28,22 @@ module Fog
28
28
  @services_registry.keys
29
29
  end
30
30
 
31
+ # Returns service constant path, with provider, as string. If
32
+ # "provider::service" is defined (the preferred format) then it returns that
33
+ # string, otherwise it returns the deprecated string "service::provider".
31
34
  def service_klass(constant_string)
32
35
  eval([to_s, constant_string].join("::"))
33
36
  [to_s, constant_string].join("::")
34
37
  rescue NameError
35
38
  provider = to_s.split("::").last
36
39
  Fog::Logger.deprecation("Unable to load #{[to_s, constant_string].join("::")}")
37
- Fog::Logger.deprecation("The format #{['Fog', constant_string, provider].join("::")} is deprecated")
40
+ Fog::Logger.deprecation(
41
+ format(
42
+ Fog::ServicesMixin::E_SERVICE_PROVIDER_CONSTANT,
43
+ service: constant_string,
44
+ provider: provider
45
+ )
46
+ )
38
47
  ['Fog', constant_string, provider].join("::")
39
48
  end
40
49
  end
@@ -1,5 +1,18 @@
1
1
  module Fog
2
2
  module ServicesMixin
3
+ E_SERVICE_PROVIDER_CONSTANT = <<-EOS.gsub(/\s+/, ' ').strip.freeze
4
+ Falling back to deprecated constant Fog::%<service>s::%<provider>s. The
5
+ preferred format of service provider constants has changed from
6
+ service::provider to provider::service. Please update this service
7
+ provider to use the preferred format.
8
+ EOS
9
+ E_SERVICE_PROVIDER_PATH = <<-EOS.gsub(/\s+/, ' ').strip.freeze
10
+ Falling back to deprecated path fog/%<service>s/%<provider>s. The
11
+ preferred file path format has changed from service/provider to
12
+ provider/service. Please update this service provider to use the preferred
13
+ format.
14
+ EOS
15
+
3
16
  def [](provider)
4
17
  new(:provider => provider)
5
18
  end
@@ -14,7 +27,9 @@ module Fog
14
27
  require_service_provider_library(service_name.downcase, provider)
15
28
  spc = service_provider_constant(service_name, provider_name)
16
29
  spc.new(attributes)
17
- rescue LoadError, NameError # Only rescue errors in finding the libraries, allow connection errors through to the caller
30
+ rescue LoadError, NameError => e # Only rescue errors in finding the libraries, allow connection errors through to the caller
31
+ Fog::Logger.warning("Error while loading provider #{provider}: #{e.message}")
32
+ Fog::Logger.debug("backtrace: #{e.backtrace.join("\n")}")
18
33
  raise Fog::Service::NotFound, "#{provider} has no #{service_name.downcase} service"
19
34
  end
20
35
 
@@ -32,7 +47,9 @@ module Fog
32
47
  require "fog/#{provider}/#{service}"
33
48
  rescue LoadError # Try to require the service provider in an alternate location
34
49
  Fog::Logger.deprecation("Unable to require fog/#{provider}/#{service}")
35
- Fog::Logger.deprecation("The format fog/#{service}/#{provider} is deprecated")
50
+ Fog::Logger.deprecation(
51
+ format(E_SERVICE_PROVIDER_PATH, service: service, provider: provider)
52
+ )
36
53
  require "fog/#{service}/#{provider}"
37
54
  end
38
55
 
@@ -40,7 +57,9 @@ module Fog
40
57
  Fog.const_get(provider_name).const_get(*const_get_args(service_name))
41
58
  rescue NameError # Try to find the constant from in an alternate location
42
59
  Fog::Logger.deprecation("Unable to load Fog::#{provider_name}::#{service_name}")
43
- Fog::Logger.deprecation("The format Fog::#{service_name}::#{provider_name} is deprecated")
60
+ Fog::Logger.deprecation(
61
+ format(E_SERVICE_PROVIDER_CONSTANT, service: service_name, provider: provider_name)
62
+ )
44
63
  Fog.const_get(service_name).const_get(*const_get_args(provider_name))
45
64
  end
46
65
 
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Core
3
- VERSION = "2.1.2"
3
+ VERSION = "2.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Light
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-04 00:00:00.000000000 Z
12
+ date: 2019-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '0.58'
48
+ version: '0.71'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '0.58'
55
+ version: '0.71'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: formatador
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -335,8 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
335
  - !ruby/object:Gem::Version
336
336
  version: '0'
337
337
  requirements: []
338
- rubyforge_project:
339
- rubygems_version: 2.7.6
338
+ rubygems_version: 3.0.3
340
339
  signing_key:
341
340
  specification_version: 4
342
341
  summary: Shared classes and tests for fog providers and services.