xpath-simplify 0.0.1 → 0.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/lib/xpath-simplify.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19b0cfd7d8fe8f1d3e32d2bd10c483a40d5278d3
|
4
|
+
data.tar.gz: 6097aa6968794349dd5ba69c049f896b5d5dfb5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41a3d57eb7310a032dd978f65fa5edc62f061f7ca212595258d11b988f67410256f3808403cfb58b9e839dd503cc98fffc69172d2cf39bcef4fb122f7a152e8f
|
7
|
+
data.tar.gz: 04ed884b65415517bc1a9a86b89bab11ed0eb38fc3c045c70d1abf1db643db147f8499570d076482407ef398e0a5c1346a59adb7f1f1e941a461692204c39111
|
data/lib/xpath-simplify.rb
CHANGED
@@ -18,8 +18,8 @@ class XPathSimplify
|
|
18
18
|
when '))' then return xp.join('')
|
19
19
|
when '->' then i += 1; xp[i] = "[#{arr[i]}]"
|
20
20
|
when '>>' then i += 1; f_attach = xp[i-1]
|
21
|
-
when '&&' then if f_text then @f_and = true; return xp.join(''); else i += 1; xp[i] = " and #{convert(arr[i..arr.length], false, false)}"; i
|
22
|
-
when '||' then if f_text then @f_or = true; return xp.join(''); else i += 1; xp[i] = " or #{convert(arr[i..arr.length], false, false)}"; i
|
21
|
+
when '&&' then if f_text then @f_and = true; return xp.join(''); else i += 1; xp[i] = " and #{convert(arr[i..arr.length], false, false)}"; i = bracket_increment(arr, i+1); end
|
22
|
+
when '||' then if f_text then @f_or = true; return xp.join(''); else i += 1; xp[i] = " or #{convert(arr[i..arr.length], false, false)}"; i = bracket_increment(arr, i+1); end
|
23
23
|
when '::' then if f_text then return xp.join(''); else i+=2; xp[i] = "#{f_attach}[contains(text(),'#{arr[i-1]}#{convert(arr[i..arr.length], f_attach, true)}')]"; i = text_increment(arr,i); end
|
24
24
|
else if f_text then xp[i] = " #{arr[i]}"
|
25
25
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xpath-simplify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Mackie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem helps streamline the creation of X-Paths!
|
14
14
|
email: scottmackie@live.ca
|