bora 0.9.0 → 0.9.1

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: 77ea0af19fd9379af09de50f340fd4c7769a7218
4
- data.tar.gz: 9ab827765ce5a5d83f30192c9f9883455e6f24df
3
+ metadata.gz: deb9cb634611af62cf8cbcdf7a2e14dfce79c0ee
4
+ data.tar.gz: b0be2ce0d4e56b6c39bca1eaca8e2368e20632f3
5
5
  SHA512:
6
- metadata.gz: e81d0075cb5a9c0a24a25f4de28ec71a91785d79dbcd4276c8c1b5d631cb74280ebb33bb759ffe1d64789e9979e9abd37ce3d2a46cb038cac4c44944f07cc119
7
- data.tar.gz: a600a4bc019cf26932349bd650d862dbab86f15d08f2bee583dd431f0a64417bcb0d7d6b99b31af2f1612e0b871c1a5d327438c2cd2c8e41a6734ee63d9652b3
6
+ metadata.gz: 371de3c1092a9b94aede3507bcd103e41b5b0ac9b34b15af07a9fa2017adb407bcdaf65f98e66684259702352b6a138218bcb64c814b8b1cdb665f9a10b850eb
7
+ data.tar.gz: b4521c15f3dc649788233b09049926f4a3b3565bb0797886dbf1dbafba4e319441e713ab588f61dc074eb186f1883a26cada8a60edf747f64f90418dd754a08b
@@ -32,7 +32,11 @@ module Bora
32
32
  def define_tasks(template_file, stack_name, stack_config, stack_options)
33
33
  Bora::Tasks.new(stack_name) do |t|
34
34
  if File.extname(template_file) == ".rb"
35
- stack_options[:template_body] = run_cfndsl(template_file, stack_config['params'])
35
+ task :generate do |_, args|
36
+ params = stack_config['params']
37
+ params.merge!(extract_params_from_args(args.extras))
38
+ stack_options[:template_body] = run_cfndsl(template_file, params)
39
+ end
36
40
  else
37
41
  stack_options[:template_url] = template_file
38
42
  end
@@ -54,6 +58,10 @@ module Bora
54
58
  config.select { |k| valid_options.include?(k) }
55
59
  end
56
60
 
61
+ def extract_params_from_args(args)
62
+ args ? Hash[args.map { |arg| arg.split("=", 2) }] : {}
63
+ end
64
+
57
65
  def load_config(config)
58
66
  if config.class == String
59
67
  return YAML.load_file(config)
@@ -1,3 +1,3 @@
1
1
  module Bora
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bora
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Blaxland