lono 7.0.2 → 7.0.3

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: aa4a710d7a1bdad0c469e7861025f6226498bc930a57af098eac5bc13c5999ef
4
- data.tar.gz: e2ef71b7951a0e403f2082f194be1e8a05a4b1c3606a69413582e44440153fc9
3
+ metadata.gz: 8be9fefa227ea8e810d55b39b86550a9bd712575d92886d545de612b092dca1c
4
+ data.tar.gz: c5b189d514f18331e5edee251653815416f50e2790bbab61d6b0f3a97d447ee6
5
5
  SHA512:
6
- metadata.gz: 82447d85788089f54f036c033fe5a6022cdc667b6dadce1c4d47e14774147cf2411c57c71fd65584a3e040ead1fbdef8f843bbb7944abd4544214fe83578b79a
7
- data.tar.gz: 6face157c667dfe12bd4c858c215f9d4f316933704326ad4d443965ac53ac363f28f5959e2882e4fe8aa135fa9dc6b91c557daa85756044e207c4dadac842887
6
+ metadata.gz: 44b7820ece17a7e62b98384f9b21718ae67851fc4ca8128429a76257a23e1abf917a47d649ec804ef8d2e4fac4094d5af2293b65cd18ecaa2df71b29ef0597d7
7
+ data.tar.gz: 2e1edfcf3e4dcc33835e43c4f2de7e3eeea74f551854ed435a4c7709827e9532d62f716b571536976f2bcbb54969e9a730714717a5a4b5de43a57db3f131449c
@@ -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
@@ -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
- result = contents.compact.join("\n")
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
@@ -1,3 +1,3 @@
1
1
  module Lono
2
- VERSION = "7.0.2"
2
+ VERSION = "7.0.3"
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: 7.0.2
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-17 00:00:00.000000000 Z
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
- rubygems_version: 3.1.2
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