fog-core 2.2.2 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e12788f1604380c50ec19c246cacdd74d769a04d71ee56660bc3c5bc62238ae
4
- data.tar.gz: d0bfdca7690d42db8771d84dd1fdb8b7d013b2d719071ee4165be900f14ae788
3
+ metadata.gz: bf5282b4a064dccd00331a96b041d338ca5dc5da63536e3531809fecb0d73377
4
+ data.tar.gz: df4d83502273c8645ba207081f4e6099f68157c2eac464c294f16bd2195dd2f5
5
5
  SHA512:
6
- metadata.gz: 9f1e44a5714c271433bc108ba068006b98ab2acbb88319db688a63ef0ed0cb1d567fcb6c254fb96a6df527a4ff3e0e7f0f1d8e258f2eb6a8d43b05552e905c7f
7
- data.tar.gz: afcb84b9410a1361aa87a019bdf6934a428780d50713edd5da98c32104d4d3a3c813aef048f2368888b74da2718f6fea6a0c0cdade6ced7b29837ebc515db2a3
6
+ metadata.gz: b9e19b1e44512d4ac2c6b3cb01ec78fd9b9027fdfc5dbab5d8d65c4a9c54aee4f86eb939692910018af856dbc84f5025be1e1f5093414127e320758271888627
7
+ data.tar.gz: eb0c9cb1e6c55ff2f53d5b10c01dee467ac685257d5da1a071a85fbfea3e32a73f5403d14e4ffe412a09925584830be422f9b8d8db374ae35ea2e5041ec19487
@@ -0,0 +1,33 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby
24
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
25
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
26
+ # uses: ruby/setup-ruby@v1
27
+ uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
28
+ with:
29
+ ruby-version: 2.6
30
+ - name: Install dependencies
31
+ run: bundle install
32
+ - name: Run tests
33
+ run: bundle exec rake
@@ -1,3 +1,8 @@
1
+ 2.2.3 09/16/2020
2
+ ==========================================================
3
+
4
+ Fix provider lookup to properly symbolize newly underscored names
5
+
1
6
  2.2.2 09/15/2020
2
7
  ==========================================================
3
8
 
@@ -12,7 +12,7 @@ module Fog
12
12
  def extended(base)
13
13
  provider = base.to_s.split("::").last
14
14
  Fog.providers[provider.downcase.to_sym] = provider
15
- Fog.providers[underscore_name(provider)] = provider
15
+ Fog.providers[underscore_name(provider).to_sym] = provider
16
16
  end
17
17
 
18
18
  private
@@ -18,19 +18,20 @@ module Fog
18
18
  end
19
19
 
20
20
  def new(attributes)
21
- attributes = attributes.dup # Prevent delete from having side effects
22
- provider = check_provider_alias(attributes.delete(:provider).to_s.downcase.to_sym)
23
- provider_name = Fog.providers[provider]
21
+ attributes = attributes.dup # Prevent delete from having side effects
22
+ provider = attributes.delete(:provider).to_s.downcase.to_sym
23
+ provider_alias = check_provider_alias(provider)
24
+ provider_name = Fog.providers[provider_alias]
24
25
 
25
- raise ArgumentError, "#{provider} is not a recognized provider" unless providers.include?(provider)
26
+ raise ArgumentError, "#{provider_alias} is not a recognized provider" unless providers.include?(provider) || providers.include?(provider_alias)
26
27
 
27
- require_service_provider_library(service_name.downcase, provider)
28
+ require_service_provider_library(service_name.downcase, provider_alias)
28
29
  spc = service_provider_constant(service_name, provider_name)
29
30
  spc.new(attributes)
30
31
  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.warning("Error while loading provider #{provider_alias}: #{e.message}")
32
33
  Fog::Logger.debug("backtrace: #{e.backtrace.join("\n")}")
33
- raise Fog::Service::NotFound, "#{provider} has no #{service_name.downcase} service"
34
+ raise Fog::Service::NotFound, "#{provider_alias} has no #{service_name.downcase} service"
34
35
  end
35
36
 
36
37
  def providers
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Core
3
- VERSION = "2.2.2"
3
+ VERSION = "2.2.3"
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.2.2
4
+ version: 2.2.3
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: 2020-09-15 00:00:00.000000000 Z
12
+ date: 2020-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
@@ -202,6 +202,7 @@ extensions: []
202
202
  extra_rdoc_files: []
203
203
  files:
204
204
  - ".github/stale.yml"
205
+ - ".github/workflows/ruby.yml"
205
206
  - ".gitignore"
206
207
  - ".rubocop.yml"
207
208
  - ".travis.yml"