lono 6.1.5 → 6.1.6

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: 451cabbd35459ee59695b80d3838756d978115b76e8439fab63f4e4bf5ad2e15
4
- data.tar.gz: b73359e119a5ff577e237aa71a569f60be31291cfa5e65be022245cac34d4f4a
3
+ metadata.gz: 5287a846ea6db17b4e422e6bb43c6f534b7b5ee39b82e6e96cb5c514c8fc5b4f
4
+ data.tar.gz: e73157d630908be59706a1e000b5ec32ccaf9076914e8f1d38723014ff364a69
5
5
  SHA512:
6
- metadata.gz: 91e5c867855bac062ea0d937e709b2cd1c25b659a39e051034731e34cbc85ba37ae66220f924e92183d69f27fb9b40f304837ed66fb203267714aa69f3ebb588
7
- data.tar.gz: cf30a279629efc794e20beab973a925b58c6bf7f8b5ed7be8d26e613643ab7e66a0ae7ade72ce3c53a0a0e3cfad7b83f60d6ca4286376c95311f226d33903488
6
+ metadata.gz: bfc052f5ac5103d0877490292f1b21e66f59f7dce54ded27830edf044418fbce1d75b00bc0ccb815e950c8a47b8520c130ff56d830f195b08202b0ced8212517
7
+ data.tar.gz: 1dd8964b59340d0aec5fbaaa98d8f24dcbf518aedea5c630b675c263619ee64aae7d1657a8b3b518418571cec23653a62be048f678717d17ed13bbb7fa0f7aa6
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
+ ## [6.1.6]
7
+ - #24 auto remove properties with nil value
8
+ - lono seed: change default optional value to nothing
9
+
6
10
  ## [6.1.5]
7
11
  - #23 improve blueprint starter project and add --no-demo option
8
12
 
@@ -82,6 +82,11 @@ class Lono::Blueprint
82
82
  end
83
83
  end
84
84
 
85
+ def create_license
86
+ return unless ENV['LONO_LICENSE_FILE']
87
+ copy_file ENV['LONO_LICENSE_FILE'], "#{@cwd}/#{blueprint_name}/LICENSE.txt"
88
+ end
89
+
85
90
  # After this commands are executed with the newly created project
86
91
  def set_destination_root
87
92
  destination_root = "#{@cwd}/#{blueprint_name}"
File without changes
@@ -125,7 +125,7 @@ class Lono::Seed
125
125
  end
126
126
 
127
127
  def description_example(description)
128
- default = '...'
128
+ default = ''
129
129
  return default unless description
130
130
  md = description.match(/(Example|IE): (.*)/)
131
131
  return default unless md
@@ -5,7 +5,7 @@
5
5
  class Lono::Template::Dsl::Builder
6
6
  class Resource < Base
7
7
  def template
8
- camelize(standarize(@definition))
8
+ camelize(clean(standarize(@definition)))
9
9
  end
10
10
 
11
11
  # Type is the only required property: https://amzn.to/2x8W5aD
@@ -40,5 +40,19 @@ class Lono::Template::Dsl::Builder
40
40
  raise "Invalid form provided. definition #{definition.inspect}"
41
41
  end
42
42
  end
43
+
44
+ # Remove properties with nil value automatically
45
+ def clean(resource)
46
+ logical_id = resource.keys.first
47
+ attributes = resource[logical_id]
48
+ properties = attributes["Properties"]
49
+
50
+ if properties
51
+ properties.delete_if { |k,v| v.nil? }
52
+ resource[logical_id]["Properties"] = properties
53
+ end
54
+
55
+ resource
56
+ end
43
57
  end
44
58
  end
data/lib/lono/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lono
2
- VERSION = "6.1.5"
2
+ VERSION = "6.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lono
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.5
4
+ version: 6.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-07 00:00:00.000000000 Z
11
+ date: 2019-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -493,7 +493,7 @@ files:
493
493
  - lib/lono/default/settings.yml
494
494
  - lib/lono/file_uploader.rb
495
495
  - lib/lono/help.rb
496
- - lib/lono/help/blueprint.md
496
+ - lib/lono/help/blueprint/new.md
497
497
  - lib/lono/help/cfn.md
498
498
  - lib/lono/help/cfn/cancel.md
499
499
  - lib/lono/help/cfn/create.md