cfn-toml 1.0.5 → 1.0.8

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
  SHA256:
3
- metadata.gz: 7799a8f712a8d5f32a51dc93058499ff8d72304c599578fe82604305118dde62
4
- data.tar.gz: 60d55ee3765aff414549de3f8b6758cc6113220778437c34fd0b53470ab31461
3
+ metadata.gz: e00e25360cc6daac82cf8948a54773cb6336a343885d4f4c9b6d92c22d26cdfd
4
+ data.tar.gz: 601f83414b46d373c645e26b635704566a82bcc203f4f333088e14426b8e1b85
5
5
  SHA512:
6
- metadata.gz: 3bc93943f00f72790d3d040abc488f6b1737b3170927987c0bd11e92fea23bbba3416cd54c46f0fc15040a5855b1d0da52d0aba00a3ccade8c5fdb0a21cdc05d
7
- data.tar.gz: 3e1e1772b899fa24b1225b1519baf1fc566daa81ec84146399be4a35c3b83163b5ff85a7efb8e7eb063d1c99185af3635a44f340b22a68d6b0b4cef067974ab0
6
+ metadata.gz: c1e6bcf2a73ac3d6f1e87396687225eb03ff3513b9f2ec1e41f831e6d3dfcc5b1d76663636556615b30bc40eb02d1b01453e841b5b549280acd0809a5919f98a
7
+ data.tar.gz: 4010e915240b386bde01a5eb63c5e11568476363ceeeb9c0d1f4d04441528e61d18a8a5c309addc9a13c24eb4ed51872dcc4da1fa441720f85a17c3e11467497
data/README.md CHANGED
File without changes
data/bin/cfn-toml CHANGED
@@ -3,7 +3,6 @@ $LOAD_PATH << File.expand_path('lib')
3
3
 
4
4
  require 'optparse'
5
5
  require 'cfn_toml'
6
- require 'pry'
7
6
  require 'pathname'
8
7
 
9
8
  def show_version
@@ -58,6 +57,7 @@ begin
58
57
 
59
58
  arg1 = ARGV[0]
60
59
  arg2 = ARGV[1]
60
+ arg3 = ARGV[2]
61
61
 
62
62
  # Defaults
63
63
  options[:toml_filepath] ||= "config.toml"
@@ -78,7 +78,7 @@ begin
78
78
  result = CfnToml.key options[:toml_filepath], arg2
79
79
  STDOUT.puts result
80
80
  elsif arg1 == 'params'
81
- result = CfnToml.params options[:toml_filepath], arg2
81
+ result = CfnToml.params options[:toml_filepath], arg2, arg3
82
82
  STDOUT.puts result
83
83
  elsif arg1 == 'init'
84
84
  # arg2 - stackname
@@ -1,3 +1,3 @@
1
1
  module CfnToml
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.8'
3
3
  end
data/lib/cfn_toml.rb CHANGED
@@ -35,9 +35,9 @@ module CfnToml
35
35
  end
36
36
  end
37
37
  if values.key?('Default')
38
- f.write "#{name} = '#{values['Default']}' # #{values['Type']}\n"
38
+ f.write "##{name} = '#{values['Default']}' # #{values['Type']}\n"
39
39
  else
40
- f.write "##{name} = '' # #{values['Type']}\n"
40
+ f.write "#{name} = '' # #{values['Type']}\n"
41
41
  end
42
42
  end
43
43
  end
@@ -48,14 +48,14 @@ 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
53
  if params_version == 'v1'
54
- data['parameters'].map do |k,v|
54
+ data[parameters_name].map do |k,v|
55
55
  "ParameterKey=#{k},ParameterValue=#{v}"
56
56
  end.join(' ')
57
57
  elsif params_version == 'v2'
58
- data['parameters'].map do |k,v|
58
+ data[parameters_name].map do |k,v|
59
59
  "#{k}=#{v}"
60
60
  end.join(' ')
61
61
  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.5
4
+ version: 1.0.8
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: []