cfndsl 0.11.1 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +2 -0
- data/bin/cfndsl +1 -0
- data/lib/cfndsl.rb +1 -0
- data/lib/cfndsl/aws/types.yaml +7 -0
- data/lib/cfndsl/conditions.rb +1 -1
- data/lib/cfndsl/external_parameters.rb +1 -1
- data/lib/cfndsl/jsonable.rb +5 -1
- data/lib/cfndsl/orchestration_template.rb +10 -11
- data/lib/cfndsl/version.rb +1 -1
- data/spec/cfndsl_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDEyMTg0ZmVkZjIxYjk2MjAxOGM0MDZiM2E2MDhlMTViYWYyOTMxZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTY2MjdlMjY4N2VjMjMyNmYwNTk3NDM2ZjljY2MwN2MzMTliZjQ3MA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWZiZDEzZGUyNWQ3MzdmZGIyZWUwODc5MmM1OTdhNjJiNjI4YWE4YTgwNTE0
|
10
|
+
OTIyY2EwYjllNjgyMDJmMWY1ZWY2NmI5NmNlMThlNGZhMjlhYzQxYzUxM2I4
|
11
|
+
YmUwZjczZjBkYzNhZTYyYWU1ZmVjMzY2MDVhOTJiN2ZkNzE0ODU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTI5Mjk2OTJmMDRiZGVjY2E3YmFiNmEzNDFkZDUxNzhiNjBiZTFlNTllZDhl
|
14
|
+
NmZiN2Q1MjI1NTVhNWMxNDkwMzNlNDBjZTgxNWUzNDYxYjJiOTRkNDgwZjIy
|
15
|
+
ZDNkOTZkYTFmOTE2N2MxNzJkZjFlOGMwMjIxNTkyMTJiNzA2YjI=
|
data/bin/cfndsl
CHANGED
data/lib/cfndsl.rb
CHANGED
data/lib/cfndsl/aws/types.yaml
CHANGED
@@ -544,6 +544,7 @@ Resources:
|
|
544
544
|
VersionLabel: String
|
545
545
|
"AWS::ElasticLoadBalancing::LoadBalancer" :
|
546
546
|
Properties:
|
547
|
+
AccessLoggingPolicy: AccessLoggingPolicy
|
547
548
|
AvailabilityZones: [String]
|
548
549
|
CrossZone: Boolean
|
549
550
|
HealthCheck: HealthCheck
|
@@ -610,6 +611,7 @@ Resources:
|
|
610
611
|
AdvancedOptions: JSON
|
611
612
|
DomainName: String
|
612
613
|
EBSOptions: EBSOptions
|
614
|
+
ElasticsearchVersion: String
|
613
615
|
ElasticsearchClusterConfig: ElasticsearchClusterConfig
|
614
616
|
SnapshotOptions: SnapshotOptions
|
615
617
|
Tags: [ ResourceTag ]
|
@@ -1149,6 +1151,11 @@ Types:
|
|
1149
1151
|
AppCookieStickinessPolicy:
|
1150
1152
|
CookieName: String
|
1151
1153
|
PolicyName: String
|
1154
|
+
AccessLoggingPolicy:
|
1155
|
+
EmitInterval: Integer
|
1156
|
+
Enabled: Boolean
|
1157
|
+
S3BucketName: String
|
1158
|
+
S3BucketPrefix: String
|
1152
1159
|
HealthCheck:
|
1153
1160
|
HealthyThreshold: String
|
1154
1161
|
Interval: String
|
data/lib/cfndsl/conditions.rb
CHANGED
@@ -4,7 +4,7 @@ module CfnDsl
|
|
4
4
|
# Handles condition objects
|
5
5
|
#
|
6
6
|
# Usage:
|
7
|
-
# Condition :ConditionName,
|
7
|
+
# Condition :ConditionName, FnEquals(Ref(:ParameterName), 'helloworld')
|
8
8
|
class ConditionDefinition < JSONable
|
9
9
|
include JSONSerialisableObject
|
10
10
|
|
data/lib/cfndsl/jsonable.rb
CHANGED
@@ -56,7 +56,11 @@ module CfnDsl
|
|
56
56
|
|
57
57
|
# Equivalent to the Cloudformation template built in function Fn::Not
|
58
58
|
def FnNot(value)
|
59
|
-
|
59
|
+
if value.is_a?(Array)
|
60
|
+
Fn.new('Not', value)
|
61
|
+
else
|
62
|
+
Fn.new('Not', [value])
|
63
|
+
end
|
60
64
|
end
|
61
65
|
|
62
66
|
# Equivalent to the CloudFormation template built in function Fn::Or
|
@@ -76,17 +76,16 @@ module CfnDsl
|
|
76
76
|
|
77
77
|
sname = CfnDsl::Plurals.singularize pname
|
78
78
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
end
|
79
|
+
return if sname == pname
|
80
|
+
resource.class_eval do
|
81
|
+
CfnDsl.method_names(sname) do |method|
|
82
|
+
define_method(method) do |value = nil, &block|
|
83
|
+
@Properties ||= {}
|
84
|
+
@Properties[pname] ||= PropertyDefinition.new([])
|
85
|
+
value = pclass.new unless value
|
86
|
+
@Properties[pname].value.push value
|
87
|
+
value.instance_eval(&block) if block
|
88
|
+
value
|
90
89
|
end
|
91
90
|
end
|
92
91
|
end
|
data/lib/cfndsl/version.rb
CHANGED
data/spec/cfndsl_spec.rb
CHANGED
@@ -154,6 +154,20 @@ describe CfnDsl::CloudFormationTemplate do
|
|
154
154
|
expect(func.to_json).to eq('{"Fn::GetAZs":"reg"}')
|
155
155
|
end
|
156
156
|
|
157
|
+
context 'FnNot', 'Array' do
|
158
|
+
it 'FnNot' do
|
159
|
+
func = subject.FnNot(['foo'])
|
160
|
+
expect(func.to_json).to eq('{"Fn::Not":["foo"]}')
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
context 'FnNot', 'String' do
|
165
|
+
it 'FnNot' do
|
166
|
+
func = subject.FnNot('foo')
|
167
|
+
expect(func.to_json).to eq('{"Fn::Not":["foo"]}')
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
157
171
|
context 'FnFormat', 'String' do
|
158
172
|
it 'formats correctly' do
|
159
173
|
func = subject.FnFormat('abc%0def%1ghi%%x', 'A', 'B')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfndsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Jack
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-09-
|
12
|
+
date: 2016-09-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|