fog-openstack 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad424e50f06881e3801f67f64c357107afa2b6e6
4
- data.tar.gz: 1a9fb0ed70943b8dc517e8e778c4d9a741916725
3
+ metadata.gz: 20ea80cf3dba819dede79cf55ec6ac57a55f3d7c
4
+ data.tar.gz: 8e28c773ea76b1685b870ebb0b0eb2d501bc896f
5
5
  SHA512:
6
- metadata.gz: 4c9b18de6e51394c7cfa0028e806829dab9a650d7ff8eb7746416060cdbbddee1f084f0703788bd47108ef531770ae9d09bdb68f73d5c94cceec198275d1e80d
7
- data.tar.gz: bf6b5027e0ec02168228e3e02eb1918fdadf06690cd9595d8741eb2d107d49d5036fe6d6f216a8e812845924e29e62f877e08a29c7c7fe5c7833a3fdaa158368
6
+ metadata.gz: 6d5af4a6ba1a1fc57e49e2db611de5b93a150a101973f8cde96e8af3ff7ff98b1519e029d8dc3cc26629fcdcad23220f4cb7c0698fe9476881d60f1bb04eb362
7
+ data.tar.gz: 8c8c32dc3222008cb8121593d463c427908d195418e2bac083a27a7c90837a12a9796d0c17523a40321c9d1c4d34607af319792886629c8e86bcfc8ca8b66ff8
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.required_ruby_version = '>= 2.2.0'
23
23
 
24
- spec.add_dependency 'fog-core', '~> 2.1'
24
+ spec.add_dependency 'fog-core', '>= 1.45', '<=2.1.0'
25
25
  spec.add_dependency 'fog-json', '>= 1.0'
26
26
  spec.add_dependency 'ipaddress', '>= 0.8'
27
27
 
data/lib/fog/openstack.rb CHANGED
@@ -2,6 +2,39 @@ require 'fog/core'
2
2
  require 'fog/json'
3
3
 
4
4
  module Fog
5
+ # Monkey patch to reflect https://github.com/fog/fog-core/commit/06b7ab4
6
+ # needed because fog-core 2.1.1+ implies entire namespace change
7
+ # is only availabe from fog-openstack 1.0.0+
8
+ module Attributes
9
+ module InstanceMethods
10
+ def all_attributes
11
+ self.class.attributes.reduce({}) do |hash, attribute|
12
+ if masks[attribute].nil?
13
+ Fog::Logger.deprecation("Please define #{attribute} using the Fog DSL")
14
+ hash[attribute] = send(attribute)
15
+ else
16
+ hash[masks[attribute]] = send(attribute)
17
+ end
18
+
19
+ hash
20
+ end
21
+ end
22
+
23
+ def all_associations
24
+ self.class.associations.keys.reduce({}) do |hash, association|
25
+ if masks[association].nil?
26
+ Fog::Logger.deprecation("Please define #{association} using the Fog DSL")
27
+ hash[association] = associations[association] || send(association)
28
+ else
29
+ hash[masks[association]] = associations[association] || send(association)
30
+ end
31
+
32
+ hash
33
+ end
34
+ end
35
+ end
36
+ end
37
+
5
38
  module Baremetal
6
39
  autoload :OpenStack, 'fog/baremetal/openstack'
7
40
  end
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module OpenStack
3
- VERSION = '0.3.2'.freeze
3
+ VERSION = '0.3.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-openstack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Darby
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-21 00:00:00.000000000 Z
11
+ date: 2018-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.45'
20
+ - - "<="
18
21
  - !ruby/object:Gem::Version
19
- version: '2.1'
22
+ version: 2.1.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '1.45'
30
+ - - "<="
25
31
  - !ruby/object:Gem::Version
26
- version: '2.1'
32
+ version: 2.1.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: fog-json
29
35
  requirement: !ruby/object:Gem::Requirement