backtrack-xpath 0.1.7 → 0.1.8
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 +6 -2
- metadata +18 -18
- 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: e0f8e22d0aace3fc4761f3d93a0d282000fd00fa
|
4
|
+
data.tar.gz: c202ba3f54f1c16b55cae93914588fdd68a02344
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de7ff1507d0153d14ad0cc3a7e1b5c1afaaff001703330b15c1a3988f0f3675601470915d287fde9c10adbfae906426f3f1a000be9650943769fdbfdcd8e0aef
|
7
|
+
data.tar.gz: 0a2c8f6860a67feba3fd0f9b1874aec5003b95631a83b1f79f42102d6e66f68d35269d56823ebdb2b380999d4760194ac3e68a3c2b0ba1e9c5727d00c6e5d1f1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/backtrack-xpath.rb
CHANGED
@@ -6,8 +6,11 @@
|
|
6
6
|
|
7
7
|
class BacktrackXPath
|
8
8
|
|
9
|
-
def initialize(node)
|
9
|
+
def initialize(node, use_attributes: true)
|
10
|
+
|
11
|
+
@use_attributes = use_attributes
|
10
12
|
@xpath = doc_scan(node).flatten.compact.join('/')
|
13
|
+
|
11
14
|
end
|
12
15
|
|
13
16
|
def to_s
|
@@ -37,7 +40,8 @@ class BacktrackXPath
|
|
37
40
|
return unless node.parent
|
38
41
|
|
39
42
|
name = node.name
|
40
|
-
|
43
|
+
|
44
|
+
attribute = (@use_attributes and node.attributes) ? attribute_scan(node) : ''
|
41
45
|
result = doc_scan(node.parent)
|
42
46
|
|
43
47
|
[result, name + attribute]
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -12,26 +12,26 @@ cert_chain:
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTE2MTIwODE2MDkyM1oXDTE3MTIwODE2MDkyM1owSDESMBAG
|
16
16
|
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
17
|
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
ggEBAM5383oWQ7kOf40MPDkh2fIGh4U6frctIQzkhWQtO5SYSvAwWfila8DGv/gw
|
19
|
+
ZJFREEg6PZP7dMXpU7hZqlS7TVbhTS1AV9JuemIuwUOz5woXd6oDqZ5FnBJ9Wi8M
|
20
|
+
VltpYBT/hW38qvHVhasifUm5B4KeGKJc526pTSRRm224D8Kuy7tXGMxjv3U+1iii
|
21
|
+
1SaVz0qAlHaF38DnHBwZSRfoSJ5TZIYyIXEhwY2CrFfEZkRR9+cT6ssd8UI0VnBK
|
22
|
+
+9we5BStJBhaQGbrIxVQaQLnRtFnkueHypWc+2E8YwBl95ZsSqwEWWtziXIEnmWV
|
23
|
+
bnrT+Qhe0Lmqu1QJhpIcGTg8iHUCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
|
24
|
+
DwQEAwIEsDAdBgNVHQ4EFgQUlf1nTzBCNrVz4kX2GSwavDuFf70wJgYDVR0RBB8w
|
25
25
|
HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAnyWl+DwQ
|
27
|
+
WV93ttfo/zFDrm24SbOgK9syPMFmPedNbtcFRAKLCOW/C3OhoZCfxVZXQ1Rivybl
|
28
|
+
MfXjldlQPf7YC8etXwGj8l0cvm08qkDhc5BfdsX+yxtVXmiiaaZ7mv27UgirV7uM
|
29
|
+
tur+oSDQ93TcIDgydnqbnuaTiaid4lH/F3bZKLR4uH2ijD5QT01ldHxw/G9fOPT9
|
30
|
+
Bn3DgBuysS/d1uBDmRUyqaaJvMWerChnJ1tFQv6ZAlQkoeR93XBa7VIdlIhCUVHA
|
31
|
+
A7TzatLN8vxbOyi9T+aWOJcauolQ7ypJ1q8/hoDQfU2XjY0LtEN2wi8SX1xcLRrx
|
32
|
+
SNPKPPTL/Tyh6w==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2016-12-08 00:00:00.000000000 Z
|
35
35
|
dependencies: []
|
36
36
|
description:
|
37
37
|
email: james@r0bertson.co.uk
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
62
|
rubyforge_project:
|
63
|
-
rubygems_version: 2.
|
63
|
+
rubygems_version: 2.5.1
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: backtrack-xpath accepts a REXML::Element and returns the full XPath back
|
metadata.gz.sig
CHANGED
Binary file
|