backtrack-xpath 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/backtrack-xpath.rb +8 -3
- metadata +21 -19
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01ab878972b759bca2fcf2db8c0a6cdf617799aa
|
4
|
+
data.tar.gz: 30611daf3fc5f7fb9d91244124427f2397762535
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf3135f289f738cfd45d8d282425d3692fa89b2e1f4d77c9dfad2c0653e6aed986b39c38659cbf4e5615e61742090a3a8fd5781fac0ccc68567dabed14d845ba
|
7
|
+
data.tar.gz: 8d68032892e9c465da8bf96be4ed3d58c0ca069b5637e5f54beac5403d01245fa2f3831315aa8af5d494c2810146919c4cdda2b96170c7cf7e1c9297206cee24
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/backtrack-xpath.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
# file: backtrack-xpath.rb
|
4
4
|
|
5
|
+
# for use with the Rexle gem
|
6
|
+
|
5
7
|
class BacktrackXPath
|
6
8
|
|
7
9
|
def initialize(node)
|
@@ -19,9 +21,12 @@ class BacktrackXPath
|
|
19
21
|
def attribute_scan(node)
|
20
22
|
|
21
23
|
result = ''
|
22
|
-
attr = %
|
24
|
+
attr = %i(id class).detect {|x| node.attributes.has_key? x}
|
25
|
+
|
23
26
|
if attr then
|
24
|
-
|
27
|
+
node.attribute(attr)
|
28
|
+
value = attr == :id ? node.attributes[attr] : \
|
29
|
+
node.attributes[attr][0]
|
25
30
|
result = "[@%s='%s']" % [attr, value]
|
26
31
|
end
|
27
32
|
result
|
@@ -37,4 +42,4 @@ class BacktrackXPath
|
|
37
42
|
|
38
43
|
[result, name + attribute]
|
39
44
|
end
|
40
|
-
end
|
45
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backtrack-xpath
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,26 +10,28 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTE1MDQzMDIxNDAxMVoXDTE2MDQyOTIxNDAxMVowSDESMBAG
|
16
16
|
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
17
|
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
18
|
+
ggEBAM8PN7VICemdhhCQzJA2jivDLpDvG9ZRglO7WfGlZuhVYvw5t+ZuauDgNduV
|
19
|
+
oE2TU/HItCUwWbunHfICDipxASS9PDHa0s5Cccr+u3cVRu6rmMbUxH8QsWRRYd3P
|
20
|
+
WPVmECc2aYHwywDDHSudjhLef81YYKroGDTvU6+NIlyapnnbfriFWhS56A9b4rvL
|
21
|
+
5PYt3ZZMpI5gIU93lzLNWWfnRicVt5bv+bgKm9RUOtyo6tOPpt9oTW+oV2n/7XYz
|
22
|
+
/7SEkHrudhniQz9GrFbE7jMgfaHv2pCzi2UB2ssh4YbdPe5sDXtBABNbFTQo/bWz
|
23
|
+
rT8sVXakv1S6sZ+uAlFSm9OvH7ECAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
|
24
|
+
DwQEAwIEsDAdBgNVHQ4EFgQUvDYnvLRHUdPIf09r6+DKQqFF64YwJgYDVR0RBB8w
|
25
|
+
HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
|
26
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAs+GquBfM
|
27
|
+
PO50eiyyTIVmS5e3T4FYo5dkZApv29XNZVXlXq1EqfSewUBnY8pFWP9nAAK1YovM
|
28
|
+
qlhMQKnE4Kp7qyFeO5cf3tqexHZc74yKJIfWFhaWuVIeuzCk9AbIIMGpuRkWP91n
|
29
|
+
s8VVpJvwfiaLOJb1jz0HnbyVcoWyk69lEChNbFP3CEwBfHzdvCrY2KGXWuJ5DqKK
|
30
|
+
PwKejFX8uh+KLGMAy/5jAWD4hFf+VRnuOEIOWdzB1co4qh2BrtKA0YqyPypCTEzg
|
31
|
+
YOnzNtrwBEUtQxg8y0VuWiI77NcAHKXkOXqEnzCKwrqZBSa9m/iEFF/BSTWBKKsu
|
32
|
+
WamZuCq/UXvRMA==
|
31
33
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
34
|
+
date: 2015-04-30 00:00:00.000000000 Z
|
33
35
|
dependencies: []
|
34
36
|
description:
|
35
37
|
email: james@r0bertson.co.uk
|
@@ -50,7 +52,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
50
52
|
requirements:
|
51
53
|
- - ">="
|
52
54
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
55
|
+
version: 2.1.2
|
54
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
57
|
requirements:
|
56
58
|
- - ">="
|
@@ -58,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
60
|
version: '0'
|
59
61
|
requirements: []
|
60
62
|
rubyforge_project:
|
61
|
-
rubygems_version: 2.
|
63
|
+
rubygems_version: 2.4.6
|
62
64
|
signing_key:
|
63
65
|
specification_version: 4
|
64
66
|
summary: backtrack-xpath accepts a REXML::Element and returns the full XPath back
|
metadata.gz.sig
CHANGED
Binary file
|