miasma 0.2.30 → 0.2.32

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: c9d47952cbfd15fb3a57ddfd6103c5024a689456
4
- data.tar.gz: 5a06b29d9f76fae06e9ee1cc2ee5343eb0bfd948
3
+ metadata.gz: 48da08fd7ed1ba1008c9e096ef25dc0bdaef075c
4
+ data.tar.gz: 3269b073a883189f845b85650b82190da416f408
5
5
  SHA512:
6
- metadata.gz: 8b78609a2d1cb7150337f29ed0dada0c69f9274d7407f83fde98c23b8bd13e5e648fd2cdc1059968687b4d45009d8a0038720f8260483691cc462a181893fb1e
7
- data.tar.gz: 8fc58eb0e34295f1bd04e0f693ac0a2a540e52ad246d27d372b4e0c1483c78b47d8311cc06960dba7defcdbc5d67b9ee096816106cca8abbbcf59da0a9e3f044
6
+ metadata.gz: 594a6037ccea6c2f4680f6b76fad80c2155bbf6c590dd2589f2f3c9f33d85f818cd4493d54df0306229f5369a399fec4abb10d0233d0f56e41dd76d717dcded2
7
+ data.tar.gz: 0c12f456735c0554df17b5c6a65e83b8ccc1423076764608007916c437dfb2f529fbd4a6df0a513f68af1b26766eb1f98e5cd6bf716e179d748e53d07e5f968b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.2.32
2
+ * Add API stub for after setup modifications (#17)
3
+ * Allow Server attributes to be lazy loaded
4
+
1
5
  # v0.2.30
2
6
  * Provide interface for API implementations to customize retry behavior
3
7
 
@@ -24,8 +24,8 @@ module Miasma
24
24
  end
25
25
 
26
26
  attribute :name, String, :required => true
27
- attribute :image_id, [String, Numeric], :required => true
28
- attribute :flavor_id, [String, Numeric], :required => true
27
+ attribute :image_id, [String, Numeric]
28
+ attribute :flavor_id, [String, Numeric]
29
29
  attribute :state, Symbol, :allowed => VALID_COMPUTE_STATES
30
30
  attribute :status, String
31
31
  attribute :addresses_public, Address, :multiple => true, :coerce => lambda{|v| Address.new(v)}
@@ -35,6 +35,8 @@ module Miasma
35
35
  attribute :metadata, Hash, :coerce => lambda{|o| o.to_smash}
36
36
  attribute :key_name, String
37
37
 
38
+ on_missing :reload
39
+
38
40
  # @return [Array<Smash>]
39
41
  def addresses
40
42
  addresses_public + addresses_private
@@ -25,6 +25,7 @@ module Miasma
25
25
  else
26
26
  raise TypeError.new "Expecting `credentials` to be of type `Hash`. Received: `#{creds.class}`"
27
27
  end
28
+ after_setup(creds)
28
29
  connect
29
30
  end
30
31
 
@@ -37,6 +38,15 @@ module Miasma
37
38
  true
38
39
  end
39
40
 
41
+ # Simple hook for concrete APIs to make adjustments after
42
+ # attribute population and prior to connection
43
+ #
44
+ # @param creds [Hash]
45
+ # @return [TrueClass]
46
+ def after_setup(creds)
47
+ true
48
+ end
49
+
40
50
  # @return [Symbol] name of provider
41
51
  def provider
42
52
  Utils.snake(self.class.to_s.split('::').last).to_sym
@@ -1,4 +1,4 @@
1
1
  module Miasma
2
2
  # current library version
3
- VERSION = Gem::Version.new('0.2.30')
3
+ VERSION = Gem::Version.new('0.2.32')
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miasma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.30
4
+ version: 0.2.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-01 00:00:00.000000000 Z
11
+ date: 2015-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -257,9 +257,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  version: '0'
258
258
  requirements: []
259
259
  rubyforge_project:
260
- rubygems_version: 2.2.2
260
+ rubygems_version: 2.4.8
261
261
  signing_key:
262
262
  specification_version: 4
263
263
  summary: Smoggy API
264
264
  test_files: []
265
- has_rdoc: