fog-core 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +33 -0
- data/changelog.md +5 -0
- data/lib/fog/core/provider.rb +1 -1
- data/lib/fog/core/services_mixin.rb +8 -7
- data/lib/fog/core/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf5282b4a064dccd00331a96b041d338ca5dc5da63536e3531809fecb0d73377
|
4
|
+
data.tar.gz: df4d83502273c8645ba207081f4e6099f68157c2eac464c294f16bd2195dd2f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/changelog.md
CHANGED
data/lib/fog/core/provider.rb
CHANGED
@@ -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
|
22
|
-
provider
|
23
|
-
|
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, "#{
|
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,
|
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 #{
|
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, "#{
|
34
|
+
raise Fog::Service::NotFound, "#{provider_alias} has no #{service_name.downcase} service"
|
34
35
|
end
|
35
36
|
|
36
37
|
def providers
|
data/lib/fog/core/version.rb
CHANGED
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.
|
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-
|
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"
|