bbc-cosmos-tools 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7bced8408377bdbdc301893e95cbf40fa0a5687
|
4
|
+
data.tar.gz: 5d0501804714ac48e6ec8e2321435c8856b12dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d98798f22c80c6d8a37b312c442116779f276ca0ce2473970bc08937ea3c3c043786269c356d3d0d7faeb5203b028e65e19790d54b964b98a3bf1fd3bc68ec2
|
7
|
+
data.tar.gz: 4a9f1055c66b5d88f8721746483122078ee9a6ec5585f19b8d7a91e96a0782851b39429668cb980ae74598e30219f112d1352343d1730152f94c67756584a3f4
|
@@ -16,8 +16,7 @@ module BBC
|
|
16
16
|
method_option :project, :type => :string, :required => true, :desc => "The name of the project"
|
17
17
|
def generate(component)
|
18
18
|
|
19
|
-
|
20
|
-
say cloudformation(component_identifier, options), :green
|
19
|
+
say cloudformation(component, options), :green
|
21
20
|
|
22
21
|
end
|
23
22
|
|
@@ -31,7 +30,6 @@ module BBC
|
|
31
30
|
method_option :key_path, :type => :string, :default => ENV['DEV_CERT_PATH'], :desc => "The path to your dev cert, by default it looks in the env variable '$DEV_CERT_PATH'"
|
32
31
|
def create(component, stack_name = 'main', main_stack = false)
|
33
32
|
|
34
|
-
component_identifier = options[:group].nil? ? component : options[:group]
|
35
33
|
data = cloudformation(component_identifier, options, false)
|
36
34
|
|
37
35
|
post_data = {
|
@@ -61,10 +59,8 @@ module BBC
|
|
61
59
|
method_option :key_path, :type => :string, :default => ENV['DEV_CERT_PATH'], :desc => "The path to your dev cert, by default it looks in the env variable '$DEV_CERT_PATH'"
|
62
60
|
def update(component)
|
63
61
|
|
64
|
-
component_identifier = options[:group].nil? ? component : options[:group]
|
65
62
|
stack_name = "#{options[:env]}-#{component}-#{options[:stack]}"
|
66
|
-
|
67
|
-
data = cloudformation(component_identifier, options, false)
|
63
|
+
data = cloudformation(component, options, false)
|
68
64
|
|
69
65
|
post_data = {
|
70
66
|
'template' => data,
|
@@ -88,7 +84,8 @@ module BBC
|
|
88
84
|
config_data = config
|
89
85
|
|
90
86
|
Tools::Cloudformation::Generator.create(component, config, options, to_json) do
|
91
|
-
|
87
|
+
component_identifier = options[:group].nil? ? component : options[:group]
|
88
|
+
instance_eval config_data.cf_templates(component_identifier, options[:stack])
|
92
89
|
end
|
93
90
|
end
|
94
91
|
|
@@ -47,7 +47,8 @@ module BBC
|
|
47
47
|
|
48
48
|
def cf_templates(component, stack = 'main')
|
49
49
|
aws_templates = File.join(base_path, 'stacks', component, stack, '/aws/**/*.rb')
|
50
|
-
|
50
|
+
component_template_path = File.join(base_path, 'stacks', component, stack, 'template.rb')
|
51
|
+
component_template = (File.exists? component_template_path) ? File.read(component_template_path) : ''
|
51
52
|
|
52
53
|
Dir
|
53
54
|
.glob(aws_templates)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbc-cosmos-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Jack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|