stackit 0.3.8 → 0.3.9

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: 64a90ba15bf97b7a8212b76b81b84018fb5d406a
4
- data.tar.gz: 32c5c71e84a560f59028d8ef96f13a1ed522dac8
3
+ metadata.gz: cdda9a13490cb6d90640e958f9cd42a748185024
4
+ data.tar.gz: 4c2a5584e18dcc02e102c65b7ccb895cb5a8529e
5
5
  SHA512:
6
- metadata.gz: 3672ea775e88199023a66c0b424f054291d896aec9e925fbb1c429b87b2121dbe3d6c410d2d61754571b66de46ffb39145614668baaac518897a4ec32607b0f2
7
- data.tar.gz: dc882c7bd34b0d04000eab172152ff6a26fc8a24d86a06e0fa4916d1c47b6c1a8e68a16e02ac2393bbd177f5b751f7c8026eb41b4b57d4e2456744859816eccf
6
+ metadata.gz: 0236c6783d0ab999ff465db3e86f9d71a65d89ffe59a906efce2fcedd1b458943f6acaa2db9a1e82c1a17dde2fcdfce3aedee604db3cc31210d9c882fd69c3d1
7
+ data.tar.gz: 8cb6842996ccf6073659a72f55f0af4e4d7c40bd07e6a77b3d7b898e024a488d0c01260256fefa15bdc772be19c716d68b9dd1f88c7c9fdca48f4eff227d44c1
@@ -1,13 +1,28 @@
1
1
  module Stackit::Mixin::AvailabilityZone
2
2
 
3
+ attr_accessor :az
3
4
  attr_accessor :az_syms
4
5
 
6
+ def az=(az)
7
+ @az = az || az_syms[0]
8
+ end
9
+
5
10
  def az_syms=(keys)
6
11
  @az_syms = keys.each{ |key|
7
12
  key = key.to_sym
8
13
  }
9
14
  end
10
15
 
16
+ def az_hash
17
+ {
18
+ az_sym => resolve_parameter(az_sym)
19
+ }
20
+ end
21
+
22
+ def availability_zone
23
+ resolve_parameter(az)
24
+ end
25
+
11
26
  def availability_zones
12
27
  resolve_parameters(az_syms)
13
28
  end
@@ -15,6 +15,14 @@ module Stackit::Mixin::Tier
15
15
  @tier_map = map
16
16
  end
17
17
 
18
+ def subnet
19
+ resolve_parameter(tier_map[tier][az])
20
+ end
21
+
22
+ def subnets
23
+ resolve_parameters(tier_map[tier].values)
24
+ end
25
+
18
26
  def selected_subnet_sym
19
27
  tier_map[tier][selected_az_sym]
20
28
  end
@@ -23,10 +31,6 @@ module Stackit::Mixin::Tier
23
31
  resolve_parameter(selected_subnet_sym)
24
32
  end
25
33
 
26
- def subnets
27
- resolve_parameters(tier_map[tier].values)
28
- end
29
-
30
34
  def random_subnet
31
35
  random_az_and_subnet[:subnet]
32
36
  end
@@ -1,3 +1,3 @@
1
1
  module Stackit
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stackit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Hahn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-12 00:00:00.000000000 Z
11
+ date: 2016-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler