cfndsl 0.15.2 → 0.15.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -2
- data/lib/cfndsl.rb +2 -1
- data/lib/cfndsl/version.rb +1 -1
- data/spec/cfndsl_spec.rb +18 -4
- data/spec/fixtures/test.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8852a97814954a3b9d681a67246a8319b26f2642
|
4
|
+
data.tar.gz: 5ecf2b8ac6d0e1a3ad71605bed8ce2fc0f8f3873
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54539f355c4fb532a90e006fad49e61f1fbd38ec7fd7cf18c5119529723766bfed855509b5180c2dd995c35fb2d85b9d4848d4271d7ef808e2181632fa23a2bd
|
7
|
+
data.tar.gz: 82b118e315415b8acf8e2490d7ca3e2120f1b6282e9932eee5ff2039fa1dd92c4ccc797f95bf0a94a0954e2b57f5f5cb8188e9d63da247c52965c797c71f8932
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,26 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [0.15.
|
4
|
-
[Full Changelog](https://github.com/stevenjack/cfndsl/compare/v0.15.
|
3
|
+
## [0.15.3](https://github.com/stevenjack/cfndsl/tree/0.15.3) (2017-09-05)
|
4
|
+
[Full Changelog](https://github.com/stevenjack/cfndsl/compare/v0.15.2...0.15.3)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- list cfndsl equivalents [\#336](https://github.com/stevenjack/cfndsl/issues/336)
|
9
|
+
|
10
|
+
**Closed issues:**
|
11
|
+
|
12
|
+
- backtrace shown when incorrect resource name is passed to -g [\#338](https://github.com/stevenjack/cfndsl/issues/338)
|
13
|
+
- Condition and ALB ListenerRule Conditions get merged [\#337](https://github.com/stevenjack/cfndsl/issues/337)
|
14
|
+
- Request to include support for AWS::Logs::SubscriptionFilter [\#335](https://github.com/stevenjack/cfndsl/issues/335)
|
15
|
+
- Support for Lambda backed custom resources with shorthand [\#315](https://github.com/stevenjack/cfndsl/issues/315)
|
16
|
+
- Merging cfnlego, cfn2dsl into cfndsl [\#272](https://github.com/stevenjack/cfndsl/issues/272)
|
17
|
+
|
18
|
+
**Merged pull requests:**
|
19
|
+
|
20
|
+
- Fix parameter parsing when its value contains equal symbol [\#340](https://github.com/stevenjack/cfndsl/pull/340) ([ans0600](https://github.com/ans0600))
|
21
|
+
|
22
|
+
## [v0.15.2](https://github.com/stevenjack/cfndsl/tree/v0.15.2) (2017-06-20)
|
23
|
+
[Full Changelog](https://github.com/stevenjack/cfndsl/compare/v0.15.1...v0.15.2)
|
5
24
|
|
6
25
|
**Implemented enhancements:**
|
7
26
|
|
data/lib/cfndsl.rb
CHANGED
@@ -74,7 +74,8 @@ module CfnDsl
|
|
74
74
|
b.eval(File.read(file), file)
|
75
75
|
end
|
76
76
|
when :raw
|
77
|
-
|
77
|
+
file_parts = file.split("=")
|
78
|
+
params.set_param(file_parts[0],file_parts[1..-1].join("="))
|
78
79
|
unless disable_binding?
|
79
80
|
logstream.puts("Running raw ruby code #{file}") if logstream
|
80
81
|
b.eval(file, 'raw code')
|
data/lib/cfndsl/version.rb
CHANGED
data/spec/cfndsl_spec.rb
CHANGED
@@ -1,16 +1,30 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe CfnDsl do
|
4
|
+
let(:test_template_file_name) { "#{File.dirname(__FILE__)}/fixtures/test.rb" }
|
5
|
+
let(:heat_test_template_file_name) { "#{File.dirname(__FILE__)}/fixtures/heattest.rb" }
|
6
|
+
|
4
7
|
after(:example) { CfnDsl::ExternalParameters.refresh! }
|
5
8
|
|
6
9
|
it 'evaluates a cloud formation' do
|
7
|
-
|
8
|
-
subject.eval_file_with_extras(filename, [[:raw, 'test=123']])
|
10
|
+
subject.eval_file_with_extras(test_template_file_name, [[:raw, 'test=123']])
|
9
11
|
end
|
10
12
|
|
11
13
|
it 'evaluates a heat' do
|
12
|
-
|
13
|
-
|
14
|
+
subject.eval_file_with_extras(heat_test_template_file_name)
|
15
|
+
end
|
16
|
+
|
17
|
+
context 'when binding is disabed' do
|
18
|
+
let(:param_value) { 'www.google.com?a=1&b=2' }
|
19
|
+
before do
|
20
|
+
CfnDsl.disable_binding
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'evaluates parameters correctly when its value contains "="' do
|
24
|
+
template = subject.eval_file_with_extras(test_template_file_name, [[:raw, "three=#{param_value}"]]).to_json
|
25
|
+
parsed_template = JSON.parse(template)
|
26
|
+
expect(parsed_template['Parameters']['Three']['Default']).to eq param_value
|
27
|
+
end
|
14
28
|
end
|
15
29
|
end
|
16
30
|
|
data/spec/fixtures/test.rb
CHANGED
@@ -16,6 +16,11 @@ CloudFormation do
|
|
16
16
|
MaxLength 15
|
17
17
|
end
|
18
18
|
|
19
|
+
Parameter('Three') do
|
20
|
+
String
|
21
|
+
Default external_parameters[:three]
|
22
|
+
end
|
23
|
+
|
19
24
|
# Condition Function examples
|
20
25
|
Condition('OneIsTest', FnEquals(Ref('One'), 'Test'))
|
21
26
|
Condition('OneIsNotTest', FnNot(FnEquals(Ref('One'), 'Test')))
|
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.15.
|
4
|
+
version: 0.15.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: 2017-
|
12
|
+
date: 2017-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.
|
149
|
+
rubygems_version: 2.6.13
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: AWS Cloudformation DSL
|