lono 7.0.2 → 7.0.3
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/lono/param/generator.rb +12 -4
- data/lib/lono/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8be9fefa227ea8e810d55b39b86550a9bd712575d92886d545de612b092dca1c
|
4
|
+
data.tar.gz: c5b189d514f18331e5edee251653815416f50e2790bbab61d6b0f3a97d447ee6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44b7820ece17a7e62b98384f9b21718ae67851fc4ca8128429a76257a23e1abf917a47d649ec804ef8d2e4fac4094d5af2293b65cd18ecaa2df71b29ef0597d7
|
7
|
+
data.tar.gz: 2e1edfcf3e4dcc33835e43c4f2de7e3eeea74f551854ed435a4c7709827e9532d62f716b571536976f2bcbb54969e9a730714717a5a4b5de43a57db3f131449c
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
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
|
+
## [7.0.3]
|
7
|
+
- #39 improve param parser. allow surrounding quotes
|
8
|
+
|
6
9
|
## [7.0.2]
|
7
10
|
- fix build and improve docs
|
8
11
|
- improve reg check message
|
data/lib/lono/param/generator.rb
CHANGED
@@ -90,10 +90,7 @@ class Lono::Param
|
|
90
90
|
contents = []
|
91
91
|
contents << render_erb(@base_path)
|
92
92
|
contents << render_erb(@env_path)
|
93
|
-
|
94
|
-
# puts "process_erb result".color(:yellow)
|
95
|
-
# puts result
|
96
|
-
result
|
93
|
+
contents.compact.join("\n") # result
|
97
94
|
end
|
98
95
|
|
99
96
|
def render_erb(path)
|
@@ -128,6 +125,7 @@ class Lono::Param
|
|
128
125
|
data = {}
|
129
126
|
lines.each do |line|
|
130
127
|
key,value = line.strip.split("=").map {|x| x.strip}
|
128
|
+
value = remove_surrounding_quotes(value)
|
131
129
|
data[key] = value
|
132
130
|
end
|
133
131
|
|
@@ -153,6 +151,16 @@ class Lono::Param
|
|
153
151
|
params
|
154
152
|
end
|
155
153
|
|
154
|
+
def remove_surrounding_quotes(s)
|
155
|
+
if s =~ /^"/ && s =~ /"$/
|
156
|
+
s.sub(/^["]/, '').gsub(/["]$/,'') # remove surrounding double quotes
|
157
|
+
elsif s =~ /^'/ && s =~ /'$/
|
158
|
+
s.sub(/^[']/, '').gsub(/[']$/,'') # remove surrounding single quotes
|
159
|
+
else
|
160
|
+
s
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
156
164
|
def output_path
|
157
165
|
output = Lono.config.output_path.sub("#{Lono.root}/","")
|
158
166
|
path = if @base_path && !@env_path
|
data/lib/lono/version.rb
CHANGED
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: 7.0.
|
4
|
+
version: 7.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -717,7 +717,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
717
717
|
- !ruby/object:Gem::Version
|
718
718
|
version: '0'
|
719
719
|
requirements: []
|
720
|
-
|
720
|
+
rubyforge_project:
|
721
|
+
rubygems_version: 2.7.6.2
|
721
722
|
signing_key:
|
722
723
|
specification_version: 4
|
723
724
|
summary: The CloudFormation Framework
|