fog-core 2.2.1 → 2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/ruby.yml +34 -0
- data/.github/workflows/stale.yml +23 -0
- data/README.md +1 -1
- data/changelog.md +17 -0
- data/lib/fog/core/logger.rb +3 -0
- data/lib/fog/core/provider.rb +16 -14
- data/lib/fog/core/services_mixin.rb +8 -7
- data/lib/fog/core/version.rb +1 -1
- data/lib/fog/test_helpers/succeeds_helper.rb +2 -2
- metadata +6 -5
- data/.github/stale.yml +0 -17
- data/.travis.yml +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67cb461f9cadd8561112c31a7f506c4ff8b31a0ec3311e7e54ba824ac5e035d4
|
4
|
+
data.tar.gz: 9260f5a75cccc538be855890049577bf277a071b5df1135bdf1b5e881fc03c97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a84c4f82cd5da914c2dcc561b21d2a57b21806ea663b9a51f9f97f83e6897cc2052d902946ebcea51bea2502383bc8d1cd6092106fbdae5219113b680896b68
|
7
|
+
data.tar.gz: 073d12e4f17329540b9b00ea8308408acc8e04c6c094162833e3af459c63f523108331782e51e127bfe8f2ad5eb563e819be69bb1ca3ba113dffb6dfdb6bcd8d
|
@@ -0,0 +1,34 @@
|
|
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
|
+
strategy:
|
21
|
+
matrix:
|
22
|
+
ruby-version: ['2.4', '2.5', '2.6', '2.7', '3.0', 'head']
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby
|
27
|
+
uses: ruby/setup-ruby@v1
|
28
|
+
with:
|
29
|
+
ruby-version: ${{ matrix.ruby-version }}
|
30
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
31
|
+
- name: Install dependencies
|
32
|
+
run: bundle install
|
33
|
+
- name: Run tests
|
34
|
+
run: bundle exec rake
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Mark stale issues and pull requests
|
2
|
+
|
3
|
+
on:
|
4
|
+
schedule:
|
5
|
+
- cron: "30 1 * * *"
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
stale:
|
9
|
+
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/stale@v3
|
14
|
+
with:
|
15
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
16
|
+
days-before-stale: 60
|
17
|
+
days-before-close: 7
|
18
|
+
exempt-issue-labels: 'pinned,security'
|
19
|
+
exempt-pr-labels: 'pinned,security'
|
20
|
+
stale-issue-message: 'This issue has been marked inactive and will be closed if no further activity occurs.'
|
21
|
+
stale-pr-message: 'This pr has been marked inactive and will be closed if no further activity occurs.'
|
22
|
+
stale-issue-label: 'no-issue-activity'
|
23
|
+
stale-pr-label: 'no-pr-activity'
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Shared classes and tests for fog providers and services.
|
4
4
|
|
5
|
-
[![Build Status](https://
|
5
|
+
[![Build Status](https://github.com/fog/fog-core/actions/workflows/ruby.yml/badge.svg)](https://github.com/fog/fog-core/actions/workflows/ruby.yml)
|
6
6
|
|
7
7
|
## Ruby version
|
8
8
|
|
data/changelog.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
2.2.4 04/28/2020
|
2
|
+
==========================================================
|
3
|
+
|
4
|
+
Add FOG_DEBUG in addition to DEBUG to allow avoiding namespace collisions
|
5
|
+
Add github actions configuration
|
6
|
+
Update succeeds helper to expected syntax for ruby 3+
|
7
|
+
|
8
|
+
2.2.3 09/16/2020
|
9
|
+
==========================================================
|
10
|
+
|
11
|
+
Fix provider lookup to properly symbolize newly underscored names
|
12
|
+
|
13
|
+
2.2.2 09/15/2020
|
14
|
+
==========================================================
|
15
|
+
|
16
|
+
Fix #underscore name to be class method (instead of instance method)
|
17
|
+
|
1
18
|
2.2.1 09/15/2020
|
2
19
|
==========================================================
|
3
20
|
|
data/lib/fog/core/logger.rb
CHANGED
data/lib/fog/core/provider.rb
CHANGED
@@ -8,10 +8,22 @@ module Fog
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module Provider
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
class << self
|
12
|
+
def extended(base)
|
13
|
+
provider = base.to_s.split("::").last
|
14
|
+
Fog.providers[provider.downcase.to_sym] = provider
|
15
|
+
Fog.providers[underscore_name(provider).to_sym] = provider
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def underscore_name(string)
|
21
|
+
string.gsub(/::/, '/').
|
22
|
+
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
23
|
+
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
24
|
+
tr("-", "_").
|
25
|
+
downcase
|
26
|
+
end
|
15
27
|
end
|
16
28
|
|
17
29
|
def [](service_key)
|
@@ -47,15 +59,5 @@ module Fog
|
|
47
59
|
)
|
48
60
|
['Fog', constant_string, provider].join("::")
|
49
61
|
end
|
50
|
-
|
51
|
-
private
|
52
|
-
|
53
|
-
def underscore_name(string)
|
54
|
-
string.gsub(/::/, '/').
|
55
|
-
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
56
|
-
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
57
|
-
tr("-", "_").
|
58
|
-
downcase
|
59
|
-
end
|
60
62
|
end
|
61
63
|
end
|
@@ -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.4
|
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:
|
12
|
+
date: 2021-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|
@@ -201,10 +201,11 @@ executables: []
|
|
201
201
|
extensions: []
|
202
202
|
extra_rdoc_files: []
|
203
203
|
files:
|
204
|
-
- ".github/
|
204
|
+
- ".github/dependabot.yml"
|
205
|
+
- ".github/workflows/ruby.yml"
|
206
|
+
- ".github/workflows/stale.yml"
|
205
207
|
- ".gitignore"
|
206
208
|
- ".rubocop.yml"
|
207
|
-
- ".travis.yml"
|
208
209
|
- CONTRIBUTING.md
|
209
210
|
- CONTRIBUTORS.md
|
210
211
|
- Gemfile
|
@@ -335,7 +336,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
336
|
- !ruby/object:Gem::Version
|
336
337
|
version: '0'
|
337
338
|
requirements: []
|
338
|
-
rubygems_version: 3.
|
339
|
+
rubygems_version: 3.2.15
|
339
340
|
signing_key:
|
340
341
|
specification_version: 4
|
341
342
|
summary: Shared classes and tests for fog providers and services.
|
data/.github/stale.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Number of days of inactivity before an issue becomes stale
|
2
|
-
daysUntilStale: 60
|
3
|
-
# Number of days of inactivity before a stale issue is closed
|
4
|
-
daysUntilClose: 7
|
5
|
-
# Issues with these labels will never be considered stale
|
6
|
-
exemptLabels:
|
7
|
-
- pinned
|
8
|
-
- security
|
9
|
-
# Label to use when marking an issue as stale
|
10
|
-
staleLabel: wontfix
|
11
|
-
# Comment to post when marking an issue as stale. Set to `false` to disable
|
12
|
-
markComment: >
|
13
|
-
This issue has been automatically marked stale due to inactivity.
|
14
|
-
It will be closed if no further activity occurs.
|
15
|
-
Thank you for your contributions.
|
16
|
-
# Comment to post when closing a stale issue. Set to `false` to disable
|
17
|
-
closeComment: false
|
data/.travis.yml
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- 2.0
|
5
|
-
- 2.1
|
6
|
-
- 2.2
|
7
|
-
- 2.3
|
8
|
-
- 2.4
|
9
|
-
- jruby-head
|
10
|
-
|
11
|
-
sudo: false
|
12
|
-
dist: trusty
|
13
|
-
|
14
|
-
script: bundle exec rake travis
|
15
|
-
|
16
|
-
matrix:
|
17
|
-
fast_finish: true
|
18
|
-
include:
|
19
|
-
- rvm: 2.1
|
20
|
-
gemfile: Gemfile
|
21
|
-
env: COVERAGE=true
|
22
|
-
- rvm: jruby-head
|
23
|
-
gemfile: Gemfile
|
24
|
-
allow_failures:
|
25
|
-
- rvm: jruby-head
|
26
|
-
- rvm: jruby9k
|
27
|
-
|
28
|
-
notifications:
|
29
|
-
email: false
|
30
|
-
irc:
|
31
|
-
channels:
|
32
|
-
- "irc.freenode.org#ruby-fog"
|
33
|
-
template:
|
34
|
-
- "[#%{build_number}] %{message} %{build_url}"
|
35
|
-
- "[#%{build_number}] %{commit} on %{branch} by %{author}"
|
36
|
-
- "[#%{build_number}] %{compare_url}"
|
37
|
-
on_success: always
|
38
|
-
on_failure: always
|
39
|
-
use_notice: false
|