fog-core 2.1.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/ruby.yml +18 -0
- data/.github/workflows/stale.yml +9 -0
- data/CONTRIBUTING.md +5 -1
- data/README.md +1 -1
- data/Rakefile +2 -2
- data/changelog.md +210 -141
- data/fog-core.gemspec +2 -2
- data/lib/fog/account.rb +0 -16
- data/lib/fog/billing.rb +0 -11
- data/lib/fog/compute.rb +0 -22
- data/lib/fog/core/attributes.rb +14 -2
- data/lib/fog/core/connection.rb +3 -5
- data/lib/fog/core/logger.rb +3 -0
- data/lib/fog/core/provider.rb +37 -4
- data/lib/fog/core/scp.rb +2 -1
- data/lib/fog/core/services_mixin.rb +61 -9
- data/lib/fog/core/ssh.rb +47 -24
- data/lib/fog/core/version.rb +1 -1
- data/lib/fog/dns.rb +0 -11
- data/lib/fog/monitoring.rb +0 -11
- data/lib/fog/network.rb +0 -12
- data/lib/fog/storage.rb +0 -14
- data/lib/fog/support.rb +0 -12
- data/lib/fog/test_helpers/succeeds_helper.rb +2 -2
- data/lib/fog/vpn.rb +0 -12
- data/spec/compute_spec.rb +27 -27
- data/spec/core/cache_spec.rb +1 -1
- data/spec/identity_spec.rb +28 -28
- data/spec/storage_spec.rb +29 -31
- metadata +19 -12
- data/.travis.yml +0 -39
data/spec/identity_spec.rb
CHANGED
@@ -10,55 +10,51 @@ describe "Fog::Identity" do
|
|
10
10
|
describe "#new" do
|
11
11
|
module Fog
|
12
12
|
module TheRightWay
|
13
|
-
|
14
|
-
service(:identity, "Identity")
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
module Fog
|
19
|
-
module Identity
|
20
|
-
class TheRightWay
|
13
|
+
class Identity
|
21
14
|
def initialize(_args); end
|
22
15
|
end
|
23
16
|
end
|
24
17
|
end
|
25
18
|
|
26
|
-
it "instantiates an instance of Fog::Identity::<Provider> from the :provider keyword arg" do
|
27
|
-
identity = Fog::Identity.new(:provider => :therightway)
|
28
|
-
assert_instance_of(Fog::Identity::TheRightWay, identity)
|
29
|
-
end
|
30
|
-
|
31
19
|
module Fog
|
32
|
-
module
|
20
|
+
module TheRightWay
|
33
21
|
extend Provider
|
34
22
|
service(:identity, "Identity")
|
35
23
|
end
|
36
24
|
end
|
37
25
|
|
26
|
+
it "instantiates an instance of Fog::Identity::<Provider> from the :provider keyword arg" do
|
27
|
+
identity = Fog::Identity.new(:provider => :therightway)
|
28
|
+
assert_instance_of(Fog::TheRightWay::Identity, identity)
|
29
|
+
end
|
30
|
+
|
38
31
|
module Fog
|
39
|
-
module
|
40
|
-
class
|
32
|
+
module Identity
|
33
|
+
class TheWrongWay
|
41
34
|
def initialize(_args); end
|
42
35
|
end
|
43
36
|
end
|
44
37
|
end
|
45
38
|
|
46
|
-
it "instantiates an instance of Fog::<Provider>::Identity from the :provider keyword arg" do
|
47
|
-
identity = Fog::Identity.new(:provider => :rackspace)
|
48
|
-
assert_instance_of(Fog::Rackspace::Identity, identity)
|
49
|
-
end
|
50
|
-
|
51
39
|
module Fog
|
52
|
-
module
|
40
|
+
module TheWrongWay
|
53
41
|
extend Provider
|
54
42
|
service(:identity, "Identity")
|
55
43
|
end
|
56
44
|
end
|
57
45
|
|
46
|
+
it "instantiates an instance of Fog::<Provider>::Identity from the :provider keyword arg" do
|
47
|
+
identity = Fog::Identity.new(:provider => :thewrongway)
|
48
|
+
assert_instance_of(Fog::Identity::TheWrongWay, identity)
|
49
|
+
end
|
50
|
+
|
58
51
|
module Fog
|
59
52
|
module BothWays
|
60
53
|
class Identity
|
61
|
-
|
54
|
+
attr_reader :args
|
55
|
+
def initialize(args)
|
56
|
+
@args = args
|
57
|
+
end
|
62
58
|
end
|
63
59
|
end
|
64
60
|
end
|
@@ -66,18 +62,22 @@ describe "Fog::Identity" do
|
|
66
62
|
module Fog
|
67
63
|
module Identity
|
68
64
|
class BothWays
|
69
|
-
|
70
|
-
def initialize(args)
|
71
|
-
@args = args
|
72
|
-
end
|
65
|
+
def initialize(_args); end
|
73
66
|
end
|
74
67
|
end
|
75
68
|
end
|
76
69
|
|
70
|
+
module Fog
|
71
|
+
module BothWays
|
72
|
+
extend Provider
|
73
|
+
service(:identity, "Identity")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
77
|
describe "when both Fog::Identity::<Provider> and Fog::<Provider>::Identity exist" do
|
78
78
|
it "prefers Fog::Identity::<Provider>" do
|
79
79
|
identity = Fog::Identity.new(:provider => :bothways)
|
80
|
-
assert_instance_of(Fog::Identity
|
80
|
+
assert_instance_of(Fog::BothWays::Identity, identity)
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
data/spec/storage_spec.rb
CHANGED
@@ -10,55 +10,50 @@ describe "Fog::Storage" do
|
|
10
10
|
describe "#new" do
|
11
11
|
module Fog
|
12
12
|
module TheRightWay
|
13
|
-
|
14
|
-
service(:storage, "Storage")
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
module Fog
|
19
|
-
module Storage
|
20
|
-
class TheRightWay
|
13
|
+
class Storage
|
21
14
|
def initialize(_args); end
|
22
15
|
end
|
23
16
|
end
|
24
17
|
end
|
25
18
|
|
26
|
-
it "instantiates an instance of Fog::Storage::<Provider> from the :provider keyword arg" do
|
27
|
-
compute = Fog::Storage.new(:provider => :therightway)
|
28
|
-
assert_instance_of(Fog::Storage::TheRightWay, compute)
|
29
|
-
end
|
30
|
-
|
31
19
|
module Fog
|
32
|
-
module
|
20
|
+
module TheRightWay
|
33
21
|
extend Provider
|
34
22
|
service(:storage, "Storage")
|
35
23
|
end
|
36
24
|
end
|
37
25
|
|
26
|
+
it "instantiates an instance of Fog::<Provider>::Storage from the :provider keyword arg" do
|
27
|
+
compute = Fog::Storage.new(:provider => :therightway)
|
28
|
+
assert_instance_of(Fog::TheRightWay::Storage, compute)
|
29
|
+
end
|
30
|
+
|
38
31
|
module Fog
|
39
|
-
module
|
40
|
-
class
|
32
|
+
module Storage
|
33
|
+
class TheWrongWay
|
41
34
|
def initialize(_args); end
|
42
35
|
end
|
43
36
|
end
|
44
|
-
end
|
45
|
-
|
46
|
-
it "instantiates an instance of Fog::<Provider>::Storage from the :provider keyword arg" do
|
47
|
-
compute = Fog::Storage.new(:provider => :thewrongway)
|
48
|
-
assert_instance_of(Fog::TheWrongWay::Storage, compute)
|
49
|
-
end
|
50
37
|
|
51
|
-
|
52
|
-
module BothWays
|
38
|
+
module TheWrongWay
|
53
39
|
extend Provider
|
54
40
|
service(:storage, "Storage")
|
55
41
|
end
|
56
42
|
end
|
57
43
|
|
44
|
+
it "instantiates an instance of Fog::Storage::<Provider> from the :provider keyword arg" do
|
45
|
+
compute = Fog::Storage.new(:provider => :thewrongway)
|
46
|
+
assert_instance_of(Fog::Storage::TheWrongWay, compute)
|
47
|
+
end
|
48
|
+
|
58
49
|
module Fog
|
59
50
|
module BothWays
|
60
51
|
class Storage
|
61
|
-
|
52
|
+
attr_reader :args
|
53
|
+
|
54
|
+
def initialize(args)
|
55
|
+
@args = args
|
56
|
+
end
|
62
57
|
end
|
63
58
|
end
|
64
59
|
end
|
@@ -66,19 +61,22 @@ describe "Fog::Storage" do
|
|
66
61
|
module Fog
|
67
62
|
module Storage
|
68
63
|
class BothWays
|
69
|
-
|
70
|
-
|
71
|
-
def initialize(args)
|
72
|
-
@args = args
|
73
|
-
end
|
64
|
+
def initialize(_args); end
|
74
65
|
end
|
75
66
|
end
|
76
67
|
end
|
77
68
|
|
69
|
+
module Fog
|
70
|
+
module BothWays
|
71
|
+
extend Provider
|
72
|
+
service(:storage, "Storage")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
78
76
|
describe "when both Fog::Storage::<Provider> and Fog::<Provider>::Storage exist" do
|
79
77
|
it "prefers Fog::Storage::<Provider>" do
|
80
78
|
compute = Fog::Storage.new(:provider => :bothways)
|
81
|
-
assert_instance_of(Fog::Storage
|
79
|
+
assert_instance_of(Fog::BothWays::Storage, compute)
|
82
80
|
end
|
83
81
|
end
|
84
82
|
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Light
|
8
8
|
- Wesley Beary
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-03-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|
@@ -45,28 +45,34 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '0.
|
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.
|
55
|
+
version: '0.71'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: formatador
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - "
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0.2'
|
63
|
+
- - "<"
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '2.0'
|
63
66
|
type: :runtime
|
64
67
|
prerelease: false
|
65
68
|
version_requirements: !ruby/object:Gem::Requirement
|
66
69
|
requirements:
|
67
|
-
- - "
|
70
|
+
- - ">="
|
68
71
|
- !ruby/object:Gem::Version
|
69
72
|
version: '0.2'
|
73
|
+
- - "<"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.0'
|
70
76
|
- !ruby/object:Gem::Dependency
|
71
77
|
name: tins
|
72
78
|
requirement: !ruby/object:Gem::Requirement
|
@@ -201,9 +207,11 @@ executables: []
|
|
201
207
|
extensions: []
|
202
208
|
extra_rdoc_files: []
|
203
209
|
files:
|
210
|
+
- ".github/dependabot.yml"
|
211
|
+
- ".github/workflows/ruby.yml"
|
212
|
+
- ".github/workflows/stale.yml"
|
204
213
|
- ".gitignore"
|
205
214
|
- ".rubocop.yml"
|
206
|
-
- ".travis.yml"
|
207
215
|
- CONTRIBUTING.md
|
208
216
|
- CONTRIBUTORS.md
|
209
217
|
- Gemfile
|
@@ -319,7 +327,7 @@ homepage: https://github.com/fog/fog-core
|
|
319
327
|
licenses:
|
320
328
|
- MIT
|
321
329
|
metadata: {}
|
322
|
-
post_install_message:
|
330
|
+
post_install_message:
|
323
331
|
rdoc_options: []
|
324
332
|
require_paths:
|
325
333
|
- lib
|
@@ -334,9 +342,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
342
|
- !ruby/object:Gem::Version
|
335
343
|
version: '0'
|
336
344
|
requirements: []
|
337
|
-
|
338
|
-
|
339
|
-
signing_key:
|
345
|
+
rubygems_version: 3.3.5
|
346
|
+
signing_key:
|
340
347
|
specification_version: 4
|
341
348
|
summary: Shared classes and tests for fog providers and services.
|
342
349
|
test_files:
|
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
|