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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54c15de823bf909834521b9197f4bea862593e6a
4
- data.tar.gz: 26cf5c798886c964423b4bb9a30af6e7e37f367d
3
+ metadata.gz: e0f8e22d0aace3fc4761f3d93a0d282000fd00fa
4
+ data.tar.gz: c202ba3f54f1c16b55cae93914588fdd68a02344
5
5
  SHA512:
6
- metadata.gz: aaae0e7c4d29d83b7ef9b0edf17653b6d8cefd775dfdddc02205ece6ef09db0aaa356fb2db2c9d85facc7dcf302503d36feee10a9b88a3110dd54c1d944d8d23
7
- data.tar.gz: d248afed848e0a8a61ab3631f956d8779cd814559b9db346f863333dabb2e6cf12b57b682f52fd12cee1cb457a690ae2376a12cce1e726adea9b79c4c9403304
6
+ metadata.gz: de7ff1507d0153d14ad0cc3a7e1b5c1afaaff001703330b15c1a3988f0f3675601470915d287fde9c10adbfae906426f3f1a000be9650943769fdbfdcd8e0aef
7
+ data.tar.gz: 0a2c8f6860a67feba3fd0f9b1874aec5003b95631a83b1f79f42102d6e66f68d35269d56823ebdb2b380999d4760194ac3e68a3c2b0ba1e9c5727d00c6e5d1f1
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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
- attribute = node.attributes ? attribute_scan(node) : ''
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.7
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
- 8ixkARkWAmV1MB4XDTE1MDQzMDIxNDAxMVoXDTE2MDQyOTIxNDAxMVowSDESMBAG
15
+ 8ixkARkWAmV1MB4XDTE2MTIwODE2MDkyM1oXDTE3MTIwODE2MDkyM1owSDESMBAG
16
16
  A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
17
  EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
- ggEBAM8PN7VICemdhhCQzJA2jivDLpDvG9ZRglO7WfGlZuhVYvw5t+ZuauDgNduV
19
- oE2TU/HItCUwWbunHfICDipxASS9PDHa0s5Cccr+u3cVRu6rmMbUxH8QsWRRYd3P
20
- WPVmECc2aYHwywDDHSudjhLef81YYKroGDTvU6+NIlyapnnbfriFWhS56A9b4rvL
21
- 5PYt3ZZMpI5gIU93lzLNWWfnRicVt5bv+bgKm9RUOtyo6tOPpt9oTW+oV2n/7XYz
22
- /7SEkHrudhniQz9GrFbE7jMgfaHv2pCzi2UB2ssh4YbdPe5sDXtBABNbFTQo/bWz
23
- rT8sVXakv1S6sZ+uAlFSm9OvH7ECAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
- DwQEAwIEsDAdBgNVHQ4EFgQUvDYnvLRHUdPIf09r6+DKQqFF64YwJgYDVR0RBB8w
18
+ ggEBAM5383oWQ7k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mPedNbtcFRAKLCOW/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: 2015-10-11 00:00:00.000000000 Z
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.4.8
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