posxml_parser 2.8.0 → 2.8.1

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
  SHA1:
3
- metadata.gz: e0f79b2e53edf5b30845ed0b52dd45d6a68130c1
4
- data.tar.gz: c2aabe64c1d84a47b02a23ae5de401704a4ca432
3
+ metadata.gz: 75698368d9027886e4f0eb814f9dad2f189a9c4a
4
+ data.tar.gz: 7058de9d31f7e90186c69bf9c92595cdd0edf4bc
5
5
  SHA512:
6
- metadata.gz: fe118e0b98a77595bbf4f65c71562d17704589ca360d7350a59b36c0d4032a6e41a7785a7e5cf92ebe088aacf3a0da8fb73888a9142912ac2c6c1753e5ecd289
7
- data.tar.gz: 9835dc9a42b38bc3f6d90c46bf084a631e32f2e31bf5b1b13074e28e28700e265f88478f15ca2872ee824c76b147e2744234bbe14ecd1a3fb73ce51f02032a9f
6
+ metadata.gz: 413314bda102faa426cef8426a7f7b4f10626ac405dfcafe00895ef8a877b7d632c77146a2fc4769ee10314ade4c075bb8c3c57bbf25f4f86c9683178bd1749e
7
+ data.tar.gz: 1adfcd2f7c148a9dc765acf2f8b46c5958b1f77b1d714b365ab5f0caa21cabedbceec860fdc82f3cd1d350ca134c65afcb007271066f734b7dc82c8cd5f82144
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- posxml_parser (2.8.0)
4
+ posxml_parser (2.8.1)
5
5
  funky-emv (~> 0.3)
6
6
 
7
7
  GEM
data/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Posxml Parser
2
2
 
3
+ ### 2.8.1 - 2018-09-03
4
+
5
+ - Fix ambiguous argument on instruction tests.
6
+ - Fix multiple reference supporting no variable value.
7
+
3
8
  ### 2.8.0 - 2018-08-24
4
9
 
5
10
  - Support float variable compilation.
@@ -85,6 +85,7 @@ module PosxmlCompiler
85
85
  # Return:
86
86
  # {:original => "functionbla", :value => "functionbla", :type => :string}
87
87
  # {:original => "$(sKeyTouchScreen)", :value => "$(1)", :type => :string}
88
+ # {:original => "$(!sBufRecv[2])", :value => "$(2.&2)", :type => :string}
88
89
  # {:original => "$(!sBufRecv[$(iFound)])", :value => "$(2.$&3)", :type => :string}
89
90
  # {:original => "$(sBufRecv[$(iFound)])", :value => "$(2.$3)", :type => :string}
90
91
  # {:original => "equalto", :value => "equalto", :type => :string}
@@ -184,7 +185,7 @@ module PosxmlCompiler
184
185
  def parse_index_variable(value, reference)
185
186
  #if reference && value.include?("[")
186
187
  if self.multiple_reference?(value, reference)
187
- index = "$(#{value.match(/\[\$\((.+)\)\]/)[1]})"
188
+ index = "#{value.match(/\[(.+)\]/)[1]}"
188
189
  str = "$(#{value.split("[")[0]})"
189
190
 
190
191
  if str[2] == "!"
@@ -201,9 +202,13 @@ module PosxmlCompiler
201
202
  def format_multiple_reference(range_index, variable1, variable2)
202
203
  str1 = variable1.sub(VARIABLE_REFERENCE, "").sub(")", "") # Format value to be like "123"
203
204
  str2 = variable2.sub("(", "").sub(")", "") # format value to be "$123")
204
- # At the end "$(123.$&456)"
205
+ # At the end "$(123.$&456)" or "$(123.&456)" (no reference)
205
206
  if range_index
206
- format = "#{VARIABLE_REFERENCE}#{str1}.#{str2.insert(1, "&")})"
207
+ if str2.include?("$") # no reference
208
+ format = "#{VARIABLE_REFERENCE}#{str1}.#{str2.insert(1, "&")})"
209
+ else
210
+ format = "#{VARIABLE_REFERENCE}#{str1}.#{str2.insert(0, "&")})"
211
+ end
207
212
  else
208
213
  format = "#{VARIABLE_REFERENCE}#{str1}.#{str2})"
209
214
  end
@@ -1,5 +1,5 @@
1
1
 
2
2
  module PosxmlParser
3
- VERSION = "2.8.0"
3
+ VERSION = "2.8.1"
4
4
  end
5
5
 
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: posxml_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CloudWalk Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-24 00:00:00.000000000 Z
11
+ date: 2018-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler