cfoo 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.simplecov +4 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +676 -0
- data/README.md +166 -0
- data/Rakefile +10 -0
- data/TODO +29 -0
- data/bin/cfoo +26 -0
- data/cfoo.gemspec +35 -0
- data/features/attribute_expansion.feature +43 -0
- data/features/convert_yaml_to_json.feature +69 -0
- data/features/el_escaping.feature +21 -0
- data/features/map_reference_expansion.feature +68 -0
- data/features/modules.feature +101 -0
- data/features/parse_files.feature +46 -0
- data/features/reference_expansion.feature +49 -0
- data/features/step_definitions/cfoo_steps.rb +107 -0
- data/features/support/env.rb +5 -0
- data/features/yamly_shortcuts.feature +132 -0
- data/lib/cfoo.rb +11 -0
- data/lib/cfoo/cfoo.rb +15 -0
- data/lib/cfoo/el_parser.rb +105 -0
- data/lib/cfoo/file_system.rb +28 -0
- data/lib/cfoo/module.rb +25 -0
- data/lib/cfoo/parser.rb +82 -0
- data/lib/cfoo/processor.rb +38 -0
- data/lib/cfoo/project.rb +16 -0
- data/lib/cfoo/renderer.rb +9 -0
- data/lib/cfoo/version.rb +3 -0
- data/lib/cfoo/yaml.rb +34 -0
- data/lib/cfoo/yaml_parser.rb +16 -0
- data/spec/cfoo/cfoo_spec.rb +31 -0
- data/spec/cfoo/el_parser_spec.rb +47 -0
- data/spec/cfoo/file_system_spec.rb +61 -0
- data/spec/cfoo/module_spec.rb +16 -0
- data/spec/cfoo/parser_spec.rb +148 -0
- data/spec/cfoo/processor_spec.rb +52 -0
- data/spec/cfoo/project_spec.rb +16 -0
- data/spec/cfoo/renderer_spec.rb +19 -0
- data/spec/cfoo/yaml_parser_spec.rb +79 -0
- data/spec/spec_helper.rb +2 -0
- metadata +235 -0
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'fileutils'
|
3
|
+
include FileUtils
|
4
|
+
|
5
|
+
module Cfoo
|
6
|
+
describe FileSystem do
|
7
|
+
let(:project_root) { "/tmp/#{File.basename(__FILE__)}#{$$}" }
|
8
|
+
let(:yaml_parser) { double("yaml_parser") }
|
9
|
+
let(:file_system) { FileSystem.new(project_root, yaml_parser) }
|
10
|
+
before do
|
11
|
+
rm_rf project_root
|
12
|
+
mkdir project_root
|
13
|
+
end
|
14
|
+
|
15
|
+
after do
|
16
|
+
rm_rf project_root
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#list" do
|
20
|
+
it "returns full path of files, resolved relative to project root" do
|
21
|
+
files = %w[a b c].map {|file| File.join(project_root, "modules", file) }
|
22
|
+
mkdir File.join(project_root, "modules")
|
23
|
+
touch files
|
24
|
+
|
25
|
+
file_system.list("modules").sort.should == files
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "#glob_relative" do
|
30
|
+
it "returns relative path of files, resolved relative to project root" do
|
31
|
+
files = %w[a b c].map {|file| File.join(project_root, "modules", file) }
|
32
|
+
mkdir File.join(project_root, "modules")
|
33
|
+
touch files
|
34
|
+
|
35
|
+
relative_files = files.map {|f| f.gsub(project_root + "/", "")}
|
36
|
+
|
37
|
+
file_system.glob_relative("modules/*").sort.should == relative_files
|
38
|
+
end
|
39
|
+
it "expands globs" do
|
40
|
+
files = %w[a.txt b.json c.yml].map {|file| File.join(project_root, "modules", file) }
|
41
|
+
mkdir File.join(project_root, "modules")
|
42
|
+
touch files
|
43
|
+
|
44
|
+
file_system.glob_relative("modules/*.yml").should == ["modules/c.yml"]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe "#parse_file" do
|
49
|
+
it "loads the file with the YAML parser" do
|
50
|
+
yaml_parser.should_receive(:load_file).with("#{project_root}/yamlfile.yml")
|
51
|
+
file_system.parse_file("yamlfile.yml")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def write(file, content)
|
56
|
+
File.open(file, "w+") do |f|
|
57
|
+
f.puts content
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Cfoo
|
4
|
+
describe Module do
|
5
|
+
let(:file_system) { double('file_system') }
|
6
|
+
let(:mod) { Module.new("/modulepath", file_system) }
|
7
|
+
|
8
|
+
describe "#files" do
|
9
|
+
it "lists all files in the module directory" do
|
10
|
+
files = ["file1.yml", "file2.yml", "file3.yml"]
|
11
|
+
file_system.should_receive(:glob_relative).with("/modulepath/*.yml").and_return files
|
12
|
+
mod.files.should == files
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,148 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Cfoo
|
4
|
+
describe Parser do
|
5
|
+
let(:file_system) { double('file_system') }
|
6
|
+
let(:parser) { Parser.new(file_system) }
|
7
|
+
|
8
|
+
describe "#parse_file" do
|
9
|
+
context "when processing a normal array" do
|
10
|
+
it "returns it" do
|
11
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return([1, 2, 3])
|
12
|
+
parser.parse_file("myfile.yml").should == [1, 2, 3]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
context "when processing a normal map" do
|
17
|
+
it "returns it" do
|
18
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return({"a" => "b"})
|
19
|
+
parser.parse_file("myfile.yml").should == { "a" => "b" }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context "when parsing integer literals" do
|
24
|
+
it "returns them" do
|
25
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return(1)
|
26
|
+
parser.parse_file("myfile.yml").should == 1
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "when parsing boolean literals" do
|
31
|
+
it "turns false into a string" do
|
32
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return(false)
|
33
|
+
parser.parse_file("myfile.yml").should == "false"
|
34
|
+
end
|
35
|
+
it "turns true into a string" do
|
36
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return(true)
|
37
|
+
parser.parse_file("myfile.yml").should == "true"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "when parsing a string" do
|
42
|
+
it 'turns simple EL references into CloudFormation "Ref" maps' do
|
43
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return("$(orange)")
|
44
|
+
parser.parse_file("myfile.yml").should == {"Ref" => "orange"}
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'turns EL references embedded in strings into appended arrays' do
|
48
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return("large $(MelonType) melon")
|
49
|
+
parser.parse_file("myfile.yml").should == {"Fn::Join" => [ "", [ "large ", { "Ref" => "MelonType" }, " melon" ] ] }
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'turns multiple EL references embedded in strings into single appended arrays' do
|
53
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return("$(apples) and $(oranges)")
|
54
|
+
expected = {"Fn::Join" => [ "", [ { "Ref" => "apples" }, " and ", { "Ref" => "oranges" } ] ] }
|
55
|
+
parser.parse_file("myfile.yml").should == expected
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'turns EL attribute references into CloudFormation "GetAtt" maps' do
|
59
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return("$(apple.color)")
|
60
|
+
parser.parse_file("myfile.yml").should == {"Fn::GetAtt" => ["apple", "color"]}
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'turns EL map references into CloudFormation "FindInMap" maps' do
|
64
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return("$(fruit[apple][color])")
|
65
|
+
parser.parse_file("myfile.yml").should == {"Fn::FindInMap" => ["fruit", "apple", "color"]}
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'leaves escaped EL alone' do
|
69
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return("\\$(apple.color) apple")
|
70
|
+
parser.parse_file("myfile.yml").should == "$(apple.color) apple"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
context "when parsing a YAML::PrivateType" do
|
75
|
+
it "wraps references in AWS Ref maps" do
|
76
|
+
file_system.should_receive(:parse_file).with("ref.yml").and_return(YAML::DomainType.create("Ref", "AWS::Region"))
|
77
|
+
parser.parse_file("ref.yml").should == {"Ref" => "AWS::Region" }
|
78
|
+
end
|
79
|
+
it "wraps attribute references in AWS GetAtt maps" do
|
80
|
+
file_system.should_receive(:parse_file).with("getattr.yml").and_return(YAML::DomainType.create("GetAtt", ["Object", "Property"]))
|
81
|
+
|
82
|
+
parser.parse_file("getattr.yml").should == {"Fn::GetAtt" => [ "Object", "Property" ] }
|
83
|
+
end
|
84
|
+
it "wraps joins in AWS Join function-calls" do
|
85
|
+
file_system.should_receive(:parse_file).with("join.yml").and_return(YAML::DomainType.create("Join", ['', ["a","b","c"]]))
|
86
|
+
|
87
|
+
parser.parse_file("join.yml").should == {"Fn::Join" => [ "" , [ "a", "b", "c" ] ] }
|
88
|
+
end
|
89
|
+
it "wraps concatenations in AWS Join function-calls with empty strings" do
|
90
|
+
file_system.should_receive(:parse_file).with("join.yml").and_return(YAML::DomainType.create("Concat", ["a","b","c"]))
|
91
|
+
|
92
|
+
parser.parse_file("join.yml").should == {"Fn::Join" => [ "" , [ "a", "b", "c" ] ] }
|
93
|
+
end
|
94
|
+
it "wraps map lookups in AWS FindInMap function-calls" do
|
95
|
+
file_system.should_receive(:parse_file).with("findinmap.yml").and_return(YAML::DomainType.create("FindInMap", ["Map", "Key", "Value"]))
|
96
|
+
|
97
|
+
parser.parse_file("findinmap.yml").should == {"Fn::FindInMap" => [ "Map", "Key", "Value" ] }
|
98
|
+
end
|
99
|
+
it "wraps AZ lookups in AWS GetAZs function-calls" do
|
100
|
+
file_system.should_receive(:parse_file).with("az.yml").and_return(YAML::DomainType.create("GetAZs", "us-east-1"))
|
101
|
+
|
102
|
+
parser.parse_file("az.yml").should == {"Fn::GetAZs" => "us-east-1"}
|
103
|
+
end
|
104
|
+
it "wraps base64 strings in AWS Base64 function-calls" do
|
105
|
+
file_system.should_receive(:parse_file).with("b64.yml").and_return(YAML::DomainType.create("Base64", "myencodedstring"))
|
106
|
+
|
107
|
+
parser.parse_file("b64.yml").should == {"Fn::Base64" => "myencodedstring"}
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
context "in an array" do
|
112
|
+
it "expands elements' EL" do
|
113
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return [ "$(orange)" ]
|
114
|
+
parser.parse_file("myfile.yml").should == [{"Ref" => "orange"}]
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
context "in a map" do
|
119
|
+
it "expands values' EL" do
|
120
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return({ "IpAddress" => "$(IpAddress)" })
|
121
|
+
parser.parse_file("myfile.yml").should == {"IpAddress" => { "Ref" => "IpAddress"}}
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
context "in a complex data structure" do
|
126
|
+
it "expands EL deeply" do
|
127
|
+
input_map = {
|
128
|
+
"AvailabilityZones" => ["$(PublicSubnetAz)"],
|
129
|
+
"URLs" => ["http://$(Hostname)/index.html"]
|
130
|
+
}
|
131
|
+
expected_output = {
|
132
|
+
"AvailabilityZones" => [ {"Ref" => "PublicSubnetAz"}],
|
133
|
+
"URLs" => [{"Fn::Join" => [ "", [ "http://", { "Ref" => "Hostname" }, "/index.html" ] ] }]
|
134
|
+
}
|
135
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return(input_map)
|
136
|
+
parser.parse_file("myfile.yml").should == expected_output
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
context "when presented with an unknown object" do
|
141
|
+
it "raises an error" do
|
142
|
+
file_system.should_receive(:parse_file).with("myfile.yml").and_return(/a regex/)
|
143
|
+
expect {parser.parse_file("myfile.yml")}.to raise_error Parser::ElParseError
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Cfoo
|
4
|
+
describe Processor do
|
5
|
+
|
6
|
+
let(:parser) { double('parser') }
|
7
|
+
let(:project) { double('project') }
|
8
|
+
let(:processor) { Processor.new(parser, project) }
|
9
|
+
|
10
|
+
describe "#process" do
|
11
|
+
it "parses the specified files" do
|
12
|
+
parser.should_receive(:parse_file).with("app.yml").and_return({"Resources" => { "AppServer" => { "Type" => "EC2Instance" } } })
|
13
|
+
parser.should_receive(:parse_file).with("db.yml").and_return({"Resources" => { "DbServer" => { "Type" => "EC2Instance" } } })
|
14
|
+
parser.should_receive(:parse_file).with("network.yml").and_return({"Parameters" => { "LoadBalancerIpAddress" => "10.0.0.51" } })
|
15
|
+
processor.process("app.yml", "db.yml", "network.yml").should == {
|
16
|
+
"AWSTemplateFormatVersion" => "2010-09-09",
|
17
|
+
"Parameters" => {
|
18
|
+
"LoadBalancerIpAddress" => "10.0.0.51"
|
19
|
+
},
|
20
|
+
"Resources" => {
|
21
|
+
"AppServer" => { "Type" => "EC2Instance" },
|
22
|
+
"DbServer" => { "Type" => "EC2Instance" }
|
23
|
+
}
|
24
|
+
}
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "#process_all" do
|
29
|
+
it "processes all modules" do
|
30
|
+
modules = [ double("module0"), double("module1") ]
|
31
|
+
project.should_receive(:modules).and_return(modules)
|
32
|
+
modules[0].should_receive(:files).and_return ["app.yml", "db.yml"]
|
33
|
+
modules[1].should_receive(:files).and_return ["network.yml"]
|
34
|
+
parser.should_receive(:parse_file).with("app.yml").and_return({"Resources" => { "AppServer" => { "Type" => "EC2Instance" } } })
|
35
|
+
parser.should_receive(:parse_file).with("db.yml").and_return({"Resources" => { "DbServer" => { "Type" => "EC2Instance" } } })
|
36
|
+
parser.should_receive(:parse_file).with("network.yml").and_return({"Parameters" => { "LoadBalancerIpAddress" => "10.0.0.51" } })
|
37
|
+
|
38
|
+
processor.process_all.should == {
|
39
|
+
"AWSTemplateFormatVersion" => "2010-09-09",
|
40
|
+
"Parameters" => {
|
41
|
+
"LoadBalancerIpAddress" => "10.0.0.51"
|
42
|
+
},
|
43
|
+
"Resources" => {
|
44
|
+
"AppServer" => { "Type" => "EC2Instance" },
|
45
|
+
"DbServer" => { "Type" => "EC2Instance" }
|
46
|
+
}
|
47
|
+
}
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Cfoo
|
4
|
+
describe Project do
|
5
|
+
|
6
|
+
let(:file_system) { double('file_system') }
|
7
|
+
let(:project) { Project.new(file_system) }
|
8
|
+
describe '#modules' do
|
9
|
+
it 'lists the directories in the "modules" folder of the project' do
|
10
|
+
file_system.should_receive(:glob_relative).with("modules/*").and_return ["a", "b", "c"]
|
11
|
+
project.modules.should == ["a", "b", "c"].map {|e| Module.new("modules/#{e}", file_system) }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Cfoo
|
4
|
+
describe Renderer do
|
5
|
+
describe "#render" do
|
6
|
+
let(:renderer) { Renderer.new }
|
7
|
+
it "renders a Hash as a CloudFormation JSON template" do
|
8
|
+
hash = {
|
9
|
+
"Resources" => {
|
10
|
+
"Server" => { "Type" => "EC2Instance" },
|
11
|
+
"DNS Entry" => { "Type" => "ARecord" }
|
12
|
+
}
|
13
|
+
}
|
14
|
+
renderer.render(hash).should == JSON.pretty_unparse(hash)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Cfoo
|
4
|
+
describe YamlParser do
|
5
|
+
|
6
|
+
let(:parser) { YamlParser.new }
|
7
|
+
let(:working_dir) { "/tmp/#{File.basename(__FILE__)}#{$$}" }
|
8
|
+
|
9
|
+
before do
|
10
|
+
rm_rf working_dir
|
11
|
+
mkdir working_dir
|
12
|
+
end
|
13
|
+
|
14
|
+
after do
|
15
|
+
rm_rf working_dir
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "#load_file" do
|
19
|
+
it "parses a file as YAML" do
|
20
|
+
write "#{working_dir}/file.yml", "key: value"
|
21
|
+
|
22
|
+
parser.load_file("#{working_dir}/file.yml").should == {"key" => "value"}
|
23
|
+
end
|
24
|
+
context "when the YAML contains EL" do
|
25
|
+
it "parses it with the EL intact" do
|
26
|
+
write "#{working_dir}/el.yml", "key: [$(value)]"
|
27
|
+
|
28
|
+
parser.load_file("#{working_dir}/el.yml").should == {"key" => ["$(value)"]}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
context "when the YAML is invalid" do
|
32
|
+
it "raises an error" do
|
33
|
+
write "#{working_dir}/bad.yml", "key: : value"
|
34
|
+
|
35
|
+
expect {parser.load_file("#{working_dir}/bad.yml")}.to raise_error
|
36
|
+
end
|
37
|
+
end
|
38
|
+
context "when the YAML contains a custom AWS datatype" do
|
39
|
+
it "wraps references in AWS Ref maps" do
|
40
|
+
write "#{working_dir}/ref.yml", "!Ref AWS::Region"
|
41
|
+
|
42
|
+
parser.load_file("#{working_dir}/ref.yml").should == YAML::DomainType.create("Ref", "AWS::Region")
|
43
|
+
end
|
44
|
+
it "wraps attribute references in AWS GetAtt maps" do
|
45
|
+
write "#{working_dir}/getatt.yml", "!GetAtt [Object, Property]"
|
46
|
+
|
47
|
+
parser.load_file("#{working_dir}/getatt.yml").should == YAML::DomainType.create("GetAtt", ["Object", "Property"])
|
48
|
+
end
|
49
|
+
it "wraps joins in AWS Join function-calls" do
|
50
|
+
write "#{working_dir}/join.yml", "!Join ['', [a, b, c]]"
|
51
|
+
|
52
|
+
parser.load_file("#{working_dir}/join.yml").should == YAML::DomainType.create("Join", ["", ["a","b","c"]])
|
53
|
+
end
|
54
|
+
it "wraps concatenations in AWS Join function-calls with empty strings" do
|
55
|
+
write "#{working_dir}/concat.yml", "!Concat [a, b, c]"
|
56
|
+
|
57
|
+
parser.load_file("#{working_dir}/concat.yml").should == YAML::DomainType.create("Concat", ["a","b","c"])
|
58
|
+
end
|
59
|
+
it "wraps map lookups in AWS FindInMap function-calls" do
|
60
|
+
write "#{working_dir}/findinmap.yml", "!FindInMap [Map, Key, Value]"
|
61
|
+
|
62
|
+
parser.load_file("#{working_dir}/findinmap.yml").should == YAML::DomainType.create("FindInMap", ["Map", "Key", "Value"])
|
63
|
+
end
|
64
|
+
it "wraps base64 strings in AWS Base64 function-calls" do
|
65
|
+
write "#{working_dir}/base64.yml", "!Base64 myencodedstring"
|
66
|
+
|
67
|
+
parser.load_file("#{working_dir}/base64.yml").should == YAML::DomainType.create("Base64", "myencodedstring")
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def write(file, content)
|
73
|
+
File.open(file, "w+") do |f|
|
74
|
+
f.puts content
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,235 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cfoo
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- drrb
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-05-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: parslet
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: cucumber
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coveralls
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.6.3
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.6.3
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: json
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: 'Cfoo: CloudFormation master'
|
140
|
+
email:
|
141
|
+
- drrrrrrrrrrrb@gmail.com
|
142
|
+
executables:
|
143
|
+
- cfoo
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- .gitignore
|
148
|
+
- .simplecov
|
149
|
+
- .travis.yml
|
150
|
+
- Gemfile
|
151
|
+
- LICENSE.txt
|
152
|
+
- README.md
|
153
|
+
- Rakefile
|
154
|
+
- TODO
|
155
|
+
- bin/cfoo
|
156
|
+
- cfoo.gemspec
|
157
|
+
- features/attribute_expansion.feature
|
158
|
+
- features/convert_yaml_to_json.feature
|
159
|
+
- features/el_escaping.feature
|
160
|
+
- features/map_reference_expansion.feature
|
161
|
+
- features/modules.feature
|
162
|
+
- features/parse_files.feature
|
163
|
+
- features/reference_expansion.feature
|
164
|
+
- features/step_definitions/cfoo_steps.rb
|
165
|
+
- features/support/env.rb
|
166
|
+
- features/yamly_shortcuts.feature
|
167
|
+
- lib/cfoo.rb
|
168
|
+
- lib/cfoo/cfoo.rb
|
169
|
+
- lib/cfoo/el_parser.rb
|
170
|
+
- lib/cfoo/file_system.rb
|
171
|
+
- lib/cfoo/module.rb
|
172
|
+
- lib/cfoo/parser.rb
|
173
|
+
- lib/cfoo/processor.rb
|
174
|
+
- lib/cfoo/project.rb
|
175
|
+
- lib/cfoo/renderer.rb
|
176
|
+
- lib/cfoo/version.rb
|
177
|
+
- lib/cfoo/yaml.rb
|
178
|
+
- lib/cfoo/yaml_parser.rb
|
179
|
+
- spec/cfoo/cfoo_spec.rb
|
180
|
+
- spec/cfoo/el_parser_spec.rb
|
181
|
+
- spec/cfoo/file_system_spec.rb
|
182
|
+
- spec/cfoo/module_spec.rb
|
183
|
+
- spec/cfoo/parser_spec.rb
|
184
|
+
- spec/cfoo/processor_spec.rb
|
185
|
+
- spec/cfoo/project_spec.rb
|
186
|
+
- spec/cfoo/renderer_spec.rb
|
187
|
+
- spec/cfoo/yaml_parser_spec.rb
|
188
|
+
- spec/spec_helper.rb
|
189
|
+
homepage: https://github.com/drrb/cfoo
|
190
|
+
licenses:
|
191
|
+
- GPL-3
|
192
|
+
metadata: {}
|
193
|
+
post_install_message:
|
194
|
+
rdoc_options: []
|
195
|
+
require_paths:
|
196
|
+
- lib
|
197
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - '>='
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
203
|
+
requirements:
|
204
|
+
- - '>='
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '0'
|
207
|
+
requirements: []
|
208
|
+
rubyforge_project:
|
209
|
+
rubygems_version: 2.0.3
|
210
|
+
signing_key:
|
211
|
+
specification_version: 4
|
212
|
+
summary: Cfoo (pronounced 'sifu') allows you to write your CloudFormation templates
|
213
|
+
in a YAML-based markup language, and organise it into modules to make it easier
|
214
|
+
to maintain.
|
215
|
+
test_files:
|
216
|
+
- features/attribute_expansion.feature
|
217
|
+
- features/convert_yaml_to_json.feature
|
218
|
+
- features/el_escaping.feature
|
219
|
+
- features/map_reference_expansion.feature
|
220
|
+
- features/modules.feature
|
221
|
+
- features/parse_files.feature
|
222
|
+
- features/reference_expansion.feature
|
223
|
+
- features/step_definitions/cfoo_steps.rb
|
224
|
+
- features/support/env.rb
|
225
|
+
- features/yamly_shortcuts.feature
|
226
|
+
- spec/cfoo/cfoo_spec.rb
|
227
|
+
- spec/cfoo/el_parser_spec.rb
|
228
|
+
- spec/cfoo/file_system_spec.rb
|
229
|
+
- spec/cfoo/module_spec.rb
|
230
|
+
- spec/cfoo/parser_spec.rb
|
231
|
+
- spec/cfoo/processor_spec.rb
|
232
|
+
- spec/cfoo/project_spec.rb
|
233
|
+
- spec/cfoo/renderer_spec.rb
|
234
|
+
- spec/cfoo/yaml_parser_spec.rb
|
235
|
+
- spec/spec_helper.rb
|