bbc-cosmos-tools 0.0.3 → 0.0.5

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: 88064b80b06d252b26a4d6374c2453d38d74c8b9
4
- data.tar.gz: 01a7bd28dffa10920b0e0052d89a11764819ee7f
3
+ metadata.gz: b7bced8408377bdbdc301893e95cbf40fa0a5687
4
+ data.tar.gz: 5d0501804714ac48e6ec8e2321435c8856b12dfc
5
5
  SHA512:
6
- metadata.gz: dbca70ac824f847de761610b6b5dd303600cfa785795de708cf957cac4fe0d23c71647b00b4c952cbf34fe2e77041191ee57520e6aac274a267d75011b901c80
7
- data.tar.gz: b18471c440a0844e56ae9ab8375276e55a2f3d7e9ec154ece13a52cf2da87d359cc9554458c8032d002d7cfbf21ebc221cdc79e87176ab66fa23b651ece8b042
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
- component_identifier = options[:group].nil? ? component : options[:group]
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
- instance_eval config_data.cf_templates(component, options[:stack])
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
- component_template = File.read(File.join(base_path, 'stacks', component, stack, 'template.rb'))
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)
@@ -1,7 +1,7 @@
1
1
  module BBC
2
2
  module Cosmos
3
3
  module Tools
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.5"
5
5
  end
6
6
  end
7
7
  end
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.3
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-01 00:00:00.000000000 Z
11
+ date: 2014-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler