lono-params 0.0.4 → 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: 79469aa41beee128511ce61e2a880608b6bbfcba
4
- data.tar.gz: 55ea002171278b9da58f5486b511361f345e5ef0
3
+ metadata.gz: 318c489d045f09adc0345972f4a9e5263e9c5b9b
4
+ data.tar.gz: e6d1a961b79025103a5d451b7b36d0c02a093cdf
5
5
  SHA512:
6
- metadata.gz: b993abd2ac3196ef75c4b9eb8df48191d456a58acc23604492dfffda439057a1c1fc798ef0376fdb12573ca5466912da64507171030964f3e3ca42324d5eb804
7
- data.tar.gz: 97e53b3377f59aa3c754ede75d8d579778a037b73711c7a6016c26c87132cd599ff29c01a2783cadd1c9f9ea0ad63ac88efee58b61574f5efe106cdba1c7603a
6
+ metadata.gz: ae6704676a16eabf71354702d8769c738e9a204ccbba33678a017fe7311afff9b47ad87a913f6b743e840080bbd5d7088f05abebc5798dea938daa90579fa8f0
7
+ data.tar.gz: 5c944fe65681c6b47325cd7a4fa86b86dfecda0bc027e42aec98a3a9afd8a9c04e203cd36a7f352d10d0be1d73c5b0a9eb6e67e34bbe0f27d5ac4818f073efca
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.0.5] do not generate param if the value is not set
7
+
8
+ - do not generate param if the value is not set
9
+
6
10
  ## [0.0.4] Implement use_previous_value
7
11
 
8
12
  - Implement use_previous_value: will create a hash with UsePreviousValue key.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lono-params (0.0.4)
4
+ lono-params (0.0.5)
5
5
  colorize
6
6
  hashie
7
7
  plissken
@@ -10,16 +10,15 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activemodel (4.0.13)
14
- activesupport (= 4.0.13)
15
- builder (~> 3.1.0)
16
- activesupport (4.0.13)
17
- i18n (~> 0.6, >= 0.6.9)
18
- minitest (~> 4.2)
19
- multi_json (~> 1.3)
20
- thread_safe (~> 0.1)
21
- tzinfo (~> 0.3.37)
22
- builder (3.1.4)
13
+ activemodel (4.2.8)
14
+ activesupport (= 4.2.8)
15
+ builder (~> 3.1)
16
+ activesupport (4.2.8)
17
+ i18n (~> 0.7)
18
+ minitest (~> 5.1)
19
+ thread_safe (~> 0.3, >= 0.3.4)
20
+ tzinfo (~> 1.1)
21
+ builder (3.2.3)
23
22
  codeclimate-test-reporter (0.6.0)
24
23
  simplecov (>= 0.7.1, < 1.0.0)
25
24
  coderay (1.1.1)
@@ -46,8 +45,8 @@ GEM
46
45
  guard (~> 2.1)
47
46
  guard-compat (~> 1.1)
48
47
  rspec (>= 2.99.0, < 4.0)
49
- hashie (3.4.6)
50
- i18n (0.7.0)
48
+ hashie (3.5.5)
49
+ i18n (0.8.1)
51
50
  json (2.0.2)
52
51
  listen (3.1.5)
53
52
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -55,13 +54,12 @@ GEM
55
54
  ruby_dep (~> 1.2)
56
55
  lumberjack (1.0.10)
57
56
  method_source (0.8.2)
58
- minitest (4.7.5)
59
- multi_json (1.12.1)
57
+ minitest (5.10.1)
60
58
  nenv (0.3.0)
61
59
  notiffany (0.1.1)
62
60
  nenv (~> 0.1)
63
61
  shellany (~> 0.0)
64
- plissken (0.2.0)
62
+ plissken (0.3.0)
65
63
  symbolize (~> 4.2)
66
64
  pry (0.10.4)
67
65
  coderay (~> 1.1.0)
@@ -97,8 +95,9 @@ GEM
97
95
  activesupport (>= 3.2, < 5)
98
96
  i18n
99
97
  thor (0.19.1)
100
- thread_safe (0.3.5)
101
- tzinfo (0.3.51)
98
+ thread_safe (0.3.6)
99
+ tzinfo (1.2.3)
100
+ thread_safe (~> 0.1)
102
101
 
103
102
  PLATFORMS
104
103
  ruby
@@ -113,4 +112,4 @@ DEPENDENCIES
113
112
  rake
114
113
 
115
114
  BUNDLED WITH
116
- 1.12.5
115
+ 1.14.6
data/README.md CHANGED
@@ -1,12 +1,15 @@
1
- # LonoParams
1
+ # Lono Params
2
2
 
3
- Tool to generate a CloudFormation params json formatted file from a simplier env like file.
3
+ Tool to generate a CloudFormation params json formatted file from a simple env file.
4
4
 
5
5
  Given:
6
6
 
7
7
  ```
8
8
  Param1=1
9
- Param2=1
9
+ # comments are fine
10
+ Param2=2 # comments can go after the line too
11
+ Param3=use_previous_value # treated specially
12
+ $
10
13
  ```
11
14
 
12
15
  This is produced:
@@ -15,12 +18,14 @@ This is produced:
15
18
  [
16
19
  {
17
20
  "ParameterKey": "Param1",
18
- "ParameterValue": "1",
19
- "UsePreviousValue": true
21
+ "ParameterValue": "1"
20
22
  },
21
23
  {
22
24
  "ParameterKey": "Param2",
23
- "ParameterValue": "1",
25
+ "ParameterValue": "2"
26
+ },
27
+ {
28
+ "ParameterKey": "Param3",
24
29
  "UsePreviousValue": true
25
30
  }
26
31
  ]
@@ -42,50 +47,22 @@ Or install it yourself as:
42
47
 
43
48
  ## Usage
44
49
 
45
- Create a directory under your project folder called `params`. Then given, a file with params in a simple list format:
46
-
47
- ```
48
- $ cat params/my-stack.txt
49
- # comments are fine
50
- Param1=1
51
- Param2=2 # comments can go after the line too
52
- Param2=use_previous_value # treated specially
53
- $
54
- ```
50
+ Create a directory under your project folder called `params`. Create a env file at `params/my-stack.txt`.
55
51
 
56
- Generate the CloudFormation json file that can be used with the `aws cloudformation create-stack` command.
52
+ To generate the CloudFormation json file that can be used with the `aws cloudformation create-stack` command, run:
57
53
 
58
54
  ```
59
55
  $ lono-params generate my-stack
60
- Params file generated for my-stack at ./params/my-stack.json
56
+ Params file generated for my-stack at ./output/params/my-stack.json
61
57
  $
62
58
  ```
63
59
 
64
- This is what the `output/params/my-stack.json` file looks like:
65
-
66
- ```json
67
- [
68
- {
69
- "ParameterKey": "Param1",
70
- "ParameterValue": "1"
71
- },
72
- {
73
- "ParameterKey": "Param2",
74
- "ParameterValue": "2"
75
- },
76
- {
77
- "ParameterKey": "Param2",
78
- "UsePreviousValue": true
79
- }
80
- ]
81
- ```
82
-
83
-
84
60
  ## More Help
85
61
 
86
62
  ```
87
63
  $ bin/lono-params help
88
64
  ```
65
+
89
66
  ## Contributing
90
67
 
91
68
  1. Fork it
@@ -57,14 +57,16 @@ module LonoParams
57
57
  ParameterKey: key,
58
58
  UsePreviousValue: true
59
59
  }
60
- else
60
+ elsif value
61
61
  {
62
62
  ParameterKey: key,
63
63
  ParameterValue: value
64
64
  }
65
65
  end
66
- param = param.to_snake_keys if casing == :underscore
67
- params << param
66
+ if param
67
+ param = param.to_snake_keys if casing == :underscore
68
+ params << param
69
+ end
68
70
  end
69
71
  params
70
72
  end
@@ -1,3 +1,3 @@
1
1
  module LonoParams
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -1,4 +1,4 @@
1
1
  # comments are fine
2
2
  Param1=1
3
3
  Param2=2 # comments can go after the line too
4
- Param2=use_previous_value # treated specially
4
+ Param3=use_previous_value # treated specially
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lono-params
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-02 00:00:00.000000000 Z
11
+ date: 2017-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  requirements: []
185
185
  rubyforge_project:
186
- rubygems_version: 2.6.4
186
+ rubygems_version: 2.6.8
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: Tool to generate a CloudFormation parameters json formatted file