kumogata 0.5.9 → 0.5.10

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: 07484e1dc9d3112db2ce0060eb95ee25742d79b6
4
- data.tar.gz: a9bf4bd11df77b5897d7561df2a4b3a6b143c5a0
3
+ metadata.gz: 7f3a10d37ab4c95b7a585e92ddbd64899a94de48
4
+ data.tar.gz: 3f3b7dfee3ad7319d380b32699e12edde35ee492
5
5
  SHA512:
6
- metadata.gz: 6ab34d54558666432e47a2304f985c57eb0eb808c5052687e31c3f752262e8b783087b2c0891e5dc11cc679a1737c3dcd4e62065a68c48aabf7da76dcb1cf017
7
- data.tar.gz: d27210edb34a84dee5331d484f7067768827b0038b2da20d3387547add1d69abf52865dfdd28620e9eda4659c6b1faef1b01a104bd946f1c488da29579134b20
6
+ metadata.gz: ef26126cd1a30a26678493a960532b542338f58a1870708a9e242d437644538e12061dd3470c2cf69b192b176ce3ca3ef969337f8e83a35a614c1423145f2387
7
+ data.tar.gz: bb4fffe30d13a57d756d09796868c66cd0d69333c67e16445eb11680e0db08b0304c8ad95abea3228cc20183ba089e8d217c1801fbb8051defe2a22f7fd4a791
@@ -122,6 +122,32 @@ class String
122
122
  #{null.inspect}
123
123
  end
124
124
 
125
+ def Fn__If(value)
126
+ value = {'Fn::If' => @__value_conv__[value]}
127
+
128
+ case @__functions__
129
+ when Array
130
+ @__functions__ << value
131
+ when Hash
132
+ @__functions__.update(value)
133
+ end
134
+
135
+ #{null.inspect}
136
+ end
137
+
138
+ def Fn__Select(value)
139
+ value = {'Fn::Select' => @__value_conv__[value]}
140
+
141
+ case @__functions__
142
+ when Array
143
+ @__functions__ << value
144
+ when Hash
145
+ @__functions__.update(value)
146
+ end
147
+
148
+ #{null.inspect}
149
+ end
150
+
125
151
  def Ref(value)
126
152
  value = {'Ref' => value}
127
153
 
@@ -1,3 +1,3 @@
1
1
  module Kumogata
2
- VERSION = '0.5.9'
2
+ VERSION = '0.5.10'
3
3
  end
@@ -773,6 +773,18 @@ Outputs do
773
773
  <%= Fn__GetAZs "us-east-1" %>
774
774
  EOS
775
775
  end
776
+
777
+ ConditionalValue do
778
+ Value (<<-EOS).fn_join
779
+ <%= Fn__If ["Tokyo", "ap-northeast-1", _{ Ref "AWS::Region" }] %>
780
+ EOS
781
+ end
782
+
783
+ SelectedValue do
784
+ Value (<<-EOS).fn_join
785
+ <%= Fn__Select [1, _ { Fn__GetAZs "ap-northeast-1" }] %>
786
+ EOS
787
+ end
776
788
  end
777
789
  TEMPLATE
778
790
 
@@ -915,6 +927,43 @@ end
915
927
  ]
916
928
  ]
917
929
  }
930
+ },
931
+ "ConditionalValue": {
932
+ "Value": {
933
+ "Fn::Join": [
934
+ "",
935
+ [
936
+ {
937
+ "Fn::If": [
938
+ "Tokyo",
939
+ "ap-northeast-1",
940
+ {
941
+ "Ref": "AWS::Region"
942
+ }
943
+ ]
944
+ },
945
+ "\n"
946
+ ]
947
+ ]
948
+ }
949
+ },
950
+ "SelectedValue": {
951
+ "Value": {
952
+ "Fn::Join": [
953
+ "",
954
+ [
955
+ {
956
+ "Fn::Select": [
957
+ 1,
958
+ {
959
+ "Fn::GetAZs": "ap-northeast-1"
960
+ }
961
+ ]
962
+ },
963
+ "\n"
964
+ ]
965
+ ]
966
+ }
918
967
  }
919
968
  }
920
969
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumogata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.5.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-22 00:00:00.000000000 Z
11
+ date: 2016-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-v1