fog-core 2.1.0 → 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.
data/lib/fog/storage.rb CHANGED
@@ -9,20 +9,6 @@ module Fog
9
9
  module Storage
10
10
  extend Fog::ServicesMixin
11
11
 
12
- def self.new(orig_attributes)
13
- attributes = orig_attributes.dup # prevent delete from having side effects
14
- case attributes.delete(:provider).to_s.downcase.to_sym
15
- when :internetarchive
16
- require "fog/internet_archive/storage"
17
- Fog::Storage::InternetArchive.new(attributes)
18
- when :stormondemand
19
- require "fog/storage/storm_on_demand"
20
- Fog::Storage::StormOnDemand.new(attributes)
21
- else
22
- super(orig_attributes)
23
- end
24
- end
25
-
26
12
  def self.directories
27
13
  directories = []
28
14
  providers.each do |provider|
data/lib/fog/support.rb CHANGED
@@ -1,17 +1,5 @@
1
1
  module Fog
2
2
  module Support
3
3
  extend Fog::ServicesMixin
4
-
5
- def self.new(orig_attributes)
6
- attributes = orig_attributes.dup
7
- provider = attributes.delete(:provider).to_s.downcase.to_sym
8
-
9
- if provider == :stormondemand
10
- require "fog/support/storm_on_demand"
11
- Fog::Support::StormOnDemand.new(attributes)
12
- else
13
- super(orig_attributes)
14
- end
15
- end
16
4
  end
17
5
  end
data/lib/fog/vpn.rb CHANGED
@@ -1,17 +1,5 @@
1
1
  module Fog
2
2
  module VPN
3
3
  extend Fog::ServicesMixin
4
-
5
- def self.new(orig_attributes)
6
- attributes = orig_attributes.dup
7
- provider = attributes.delete(:provider).to_s.downcase.to_sym
8
-
9
- if provider == :stormondemand
10
- require "fog/vpn/storm_on_demand"
11
- Fog::VPN::StormOnDemand.new(attributes)
12
- else
13
- super(orig_attributes)
14
- end
15
- end
16
4
  end
17
5
  end
data/spec/compute_spec.rb CHANGED
@@ -16,8 +16,8 @@ describe "Fog::Compute" do
16
16
  end
17
17
 
18
18
  module Fog
19
- module Compute
20
- class TheRightWay
19
+ module TheRightWay
20
+ class Compute
21
21
  def initialize(_args); end
22
22
  end
23
23
  end
@@ -25,7 +25,7 @@ describe "Fog::Compute" do
25
25
 
26
26
  it "instantiates an instance of Fog::Compute::<Provider> from the :provider keyword arg" do
27
27
  compute = Fog::Compute.new(:provider => :therightway)
28
- assert_instance_of(Fog::Compute::TheRightWay, compute)
28
+ assert_instance_of(Fog::TheRightWay::Compute, compute)
29
29
  end
30
30
 
31
31
  module Fog
@@ -36,8 +36,8 @@ describe "Fog::Compute" do
36
36
  end
37
37
 
38
38
  module Fog
39
- module TheWrongWay
40
- class Compute
39
+ module Compute
40
+ class TheWrongWay
41
41
  def initialize(_args); end
42
42
  end
43
43
  end
@@ -45,7 +45,7 @@ describe "Fog::Compute" do
45
45
 
46
46
  it "instantiates an instance of Fog::<Provider>::Compute from the :provider keyword arg" do
47
47
  compute = Fog::Compute.new(:provider => :thewrongway)
48
- assert_instance_of(Fog::TheWrongWay::Compute, compute)
48
+ assert_instance_of(Fog::Compute::TheWrongWay, compute)
49
49
  end
50
50
 
51
51
  module Fog
@@ -58,7 +58,10 @@ describe "Fog::Compute" do
58
58
  module Fog
59
59
  module BothWays
60
60
  class Compute
61
- def initialize(_args); end
61
+ attr_reader :args
62
+ def initialize(args)
63
+ @args = args
64
+ end
62
65
  end
63
66
  end
64
67
  end
@@ -66,18 +69,15 @@ describe "Fog::Compute" do
66
69
  module Fog
67
70
  module Compute
68
71
  class BothWays
69
- attr_reader :args
70
- def initialize(args)
71
- @args = args
72
- end
72
+ def initialize(_args); end
73
73
  end
74
74
  end
75
75
  end
76
76
 
77
77
  describe "when both Fog::Compute::<Provider> and Fog::<Provider>::Compute exist" do
78
- it "prefers Fog::Compute::<Provider>" do
78
+ it "prefers Fog::<Provider>::Compute" do
79
79
  compute = Fog::Compute.new(:provider => :bothways)
80
- assert_instance_of(Fog::Compute::BothWays, compute)
80
+ assert_instance_of(Fog::BothWays::Compute, compute)
81
81
  end
82
82
  end
83
83
 
@@ -16,8 +16,8 @@ describe "Fog::Identity" do
16
16
  end
17
17
 
18
18
  module Fog
19
- module Identity
20
- class TheRightWay
19
+ module TheRightWay
20
+ class Identity
21
21
  def initialize(_args); end
22
22
  end
23
23
  end
@@ -25,27 +25,27 @@ describe "Fog::Identity" do
25
25
 
26
26
  it "instantiates an instance of Fog::Identity::<Provider> from the :provider keyword arg" do
27
27
  identity = Fog::Identity.new(:provider => :therightway)
28
- assert_instance_of(Fog::Identity::TheRightWay, identity)
28
+ assert_instance_of(Fog::TheRightWay::Identity, identity)
29
29
  end
30
30
 
31
31
  module Fog
32
- module Rackspace
32
+ module TheWrongWay
33
33
  extend Provider
34
34
  service(:identity, "Identity")
35
35
  end
36
36
  end
37
37
 
38
38
  module Fog
39
- module Rackspace
40
- class Identity
39
+ module Identity
40
+ class TheWrongWay
41
41
  def initialize(_args); end
42
42
  end
43
43
  end
44
44
  end
45
45
 
46
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)
47
+ identity = Fog::Identity.new(:provider => :thewrongway)
48
+ assert_instance_of(Fog::Identity::TheWrongWay, identity)
49
49
  end
50
50
 
51
51
  module Fog
@@ -58,7 +58,10 @@ describe "Fog::Identity" do
58
58
  module Fog
59
59
  module BothWays
60
60
  class Identity
61
- def initialize(_args); end
61
+ attr_reader :args
62
+ def initialize(args)
63
+ @args = args
64
+ end
62
65
  end
63
66
  end
64
67
  end
@@ -66,10 +69,7 @@ describe "Fog::Identity" do
66
69
  module Fog
67
70
  module Identity
68
71
  class BothWays
69
- attr_reader :args
70
- def initialize(args)
71
- @args = args
72
- end
72
+ def initialize(_args); end
73
73
  end
74
74
  end
75
75
  end
@@ -77,7 +77,7 @@ describe "Fog::Identity" do
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::BothWays, identity)
80
+ assert_instance_of(Fog::BothWays::Identity, identity)
81
81
  end
82
82
  end
83
83
 
data/spec/storage_spec.rb CHANGED
@@ -16,16 +16,16 @@ describe "Fog::Storage" do
16
16
  end
17
17
 
18
18
  module Fog
19
- module Storage
20
- class TheRightWay
19
+ module TheRightWay
20
+ class Storage
21
21
  def initialize(_args); end
22
22
  end
23
23
  end
24
24
  end
25
25
 
26
- it "instantiates an instance of Fog::Storage::<Provider> from the :provider keyword arg" do
26
+ it "instantiates an instance of Fog::<Provider>::Storage from the :provider keyword arg" do
27
27
  compute = Fog::Storage.new(:provider => :therightway)
28
- assert_instance_of(Fog::Storage::TheRightWay, compute)
28
+ assert_instance_of(Fog::TheRightWay::Storage, compute)
29
29
  end
30
30
 
31
31
  module Fog
@@ -33,19 +33,17 @@ describe "Fog::Storage" do
33
33
  extend Provider
34
34
  service(:storage, "Storage")
35
35
  end
36
- end
37
36
 
38
- module Fog
39
- module TheWrongWay
40
- class Storage
37
+ module Storage
38
+ class TheWrongWay
41
39
  def initialize(_args); end
42
40
  end
43
41
  end
44
42
  end
45
43
 
46
- it "instantiates an instance of Fog::<Provider>::Storage from the :provider keyword arg" do
44
+ it "instantiates an instance of Fog::Storage::<Provider> from the :provider keyword arg" do
47
45
  compute = Fog::Storage.new(:provider => :thewrongway)
48
- assert_instance_of(Fog::TheWrongWay::Storage, compute)
46
+ assert_instance_of(Fog::Storage::TheWrongWay, compute)
49
47
  end
50
48
 
51
49
  module Fog
@@ -58,7 +56,11 @@ describe "Fog::Storage" do
58
56
  module Fog
59
57
  module BothWays
60
58
  class Storage
61
- def initialize(_args); end
59
+ attr_reader :args
60
+
61
+ def initialize(args)
62
+ @args = args
63
+ end
62
64
  end
63
65
  end
64
66
  end
@@ -66,11 +68,7 @@ describe "Fog::Storage" do
66
68
  module Fog
67
69
  module Storage
68
70
  class BothWays
69
- attr_reader :args
70
-
71
- def initialize(args)
72
- @args = args
73
- end
71
+ def initialize(_args); end
74
72
  end
75
73
  end
76
74
  end
@@ -78,7 +76,7 @@ describe "Fog::Storage" do
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::BothWays, compute)
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.1.0
4
+ version: 2.2.3
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: 2018-03-10 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
@@ -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
@@ -201,6 +201,8 @@ executables: []
201
201
  extensions: []
202
202
  extra_rdoc_files: []
203
203
  files:
204
+ - ".github/stale.yml"
205
+ - ".github/workflows/ruby.yml"
204
206
  - ".gitignore"
205
207
  - ".rubocop.yml"
206
208
  - ".travis.yml"
@@ -319,7 +321,7 @@ homepage: https://github.com/fog/fog-core
319
321
  licenses:
320
322
  - MIT
321
323
  metadata: {}
322
- post_install_message:
324
+ post_install_message:
323
325
  rdoc_options: []
324
326
  require_paths:
325
327
  - lib
@@ -334,9 +336,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
334
336
  - !ruby/object:Gem::Version
335
337
  version: '0'
336
338
  requirements: []
337
- rubyforge_project:
338
- rubygems_version: 2.6.11
339
- signing_key:
339
+ rubygems_version: 3.1.2
340
+ signing_key:
340
341
  specification_version: 4
341
342
  summary: Shared classes and tests for fog providers and services.
342
343
  test_files: