cfn-toml 1.0.6 → 1.0.9

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
  SHA256:
3
- metadata.gz: 9fb303663cf48453351fce8897acd8a0774fd70821cb16dd1aee50dc41181490
4
- data.tar.gz: 10ae64c13c6f538128be6623f83d43f14859ebd58765a4318f671e9383be1f68
3
+ metadata.gz: 13a0bb5a6fa693cdebfe50e081f27de82166dce8232c8cb0e827f809b1df33bd
4
+ data.tar.gz: bd980cea0d66962cbd1bf297a80767fb16c10915beb72b2ad84896cbf832aabf
5
5
  SHA512:
6
- metadata.gz: 3c96096a5107924376113ef996c80b17509bf740cc6ca879620d6807c5b4f0259d01a7444c67dae5ef44b3b350f427fac536fd6f88770331d06b50ee6360fe54
7
- data.tar.gz: 54381f188c0dcd69cc2ff0a271b4a3d6dc0b763a11b978287da2eb69d3d44be44846f9074dd246eefcd7b8b98a685c85d159d27a6f882b585a72574921a60e62
6
+ metadata.gz: 4bf802d29f8bb188cc9b338f9cf37ab24f3db6922cfd48d8f35780525e41ad2d47dccadc03decf1f9e122133a2cf894e3fb0ad5471223c9850b039d40f7a1436
7
+ data.tar.gz: 76fb7e467d0f1c87cad5f351bccdbd5637588e1a51fc9819e12b84997160106f93154df0ef6fbbe11d4d1a23aaf83655ace00930e7ad6f1ba8f7b699db6ae618
data/README.md CHANGED
File without changes
data/bin/cfn-toml CHANGED
@@ -57,6 +57,7 @@ begin
57
57
 
58
58
  arg1 = ARGV[0]
59
59
  arg2 = ARGV[1]
60
+ arg3 = ARGV[2]
60
61
 
61
62
  # Defaults
62
63
  options[:toml_filepath] ||= "config.toml"
@@ -77,7 +78,7 @@ begin
77
78
  result = CfnToml.key options[:toml_filepath], arg2
78
79
  STDOUT.puts result
79
80
  elsif arg1 == 'params'
80
- result = CfnToml.params options[:toml_filepath], arg2
81
+ result = CfnToml.params options[:toml_filepath], arg2, arg3
81
82
  STDOUT.puts result
82
83
  elsif arg1 == 'init'
83
84
  # arg2 - stackname
@@ -1,3 +1,3 @@
1
1
  module CfnToml
2
- VERSION = '1.0.6'
2
+ VERSION = '1.0.9'
3
3
  end
data/lib/cfn_toml.rb CHANGED
@@ -48,14 +48,15 @@ module CfnToml
48
48
  data[namespace][key]
49
49
  end
50
50
 
51
- def self.params toml_filepath, params_version
51
+ def self.params toml_filepath, params_version, parameters_name='parameters'
52
52
  data = TomlRB.load_file(toml_filepath)
53
+ parameters_name ||= 'parameters'
53
54
  if params_version == 'v1'
54
- data['parameters'].map do |k,v|
55
+ data[parameters_name].map do |k,v|
55
56
  "ParameterKey=#{k},ParameterValue=#{v}"
56
57
  end.join(' ')
57
58
  elsif params_version == 'v2'
58
- data['parameters'].map do |k,v|
59
+ data[parameters_name].map do |k,v|
59
60
  "#{k}=#{v}"
60
61
  end.join(' ')
61
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfn-toml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Brown
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-15 00:00:00.000000000 Z
11
+ date: 2022-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb
@@ -54,7 +54,7 @@ homepage: https://github.com/teacherseat/cfn-toml
54
54
  licenses:
55
55
  - MIT
56
56
  metadata: {}
57
- post_install_message:
57
+ post_install_message:
58
58
  rdoc_options: []
59
59
  require_paths:
60
60
  - lib
@@ -69,8 +69,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.1.2
73
- signing_key:
72
+ rubygems_version: 3.1.4
73
+ signing_key:
74
74
  specification_version: 4
75
75
  summary: Configuration file parsing for CFN Bash scripting
76
76
  test_files: []