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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 171b32b032bbce5608ae3bc62979fd748cfa9baf
4
- data.tar.gz: 07b15e3269758bba8603dfb22133c980b65b5698
3
+ metadata.gz: 01ab878972b759bca2fcf2db8c0a6cdf617799aa
4
+ data.tar.gz: 30611daf3fc5f7fb9d91244124427f2397762535
5
5
  SHA512:
6
- metadata.gz: 35491e81367e8a56180c16f89f5301fe9f942c94f557f86f19e86923bc8e344e5b2c3b9ffbb5d69309cd0a2ae40e43a49d5c7f8bfc1c0e4894cf6371462b1a91
7
- data.tar.gz: 211b70808bf834c3ba3326102f69a75a7c71883e75f798c86155d0da92f12cf59ff8c7bc5fa49e52de100008e814d4b904f3e3e3b67ae418a8803198422dac68
6
+ metadata.gz: bf3135f289f738cfd45d8d282425d3692fa89b2e1f4d77c9dfad2c0653e6aed986b39c38659cbf4e5615e61742090a3a8fd5781fac0ccc68567dabed14d845ba
7
+ data.tar.gz: 8d68032892e9c465da8bf96be4ed3d58c0ca069b5637e5f54beac5403d01245fa2f3831315aa8af5d494c2810146919c4cdda2b96170c7cf7e1c9297206cee24
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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 = %w(id class).detect {|x| node.attributes.has_key? x}
24
+ attr = %i(id class).detect {|x| node.attributes.has_key? x}
25
+
23
26
  if attr then
24
- value = node.attribute(attr).value
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.5
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
- MIIDRDCCAiygAwIBAgIBADANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
13
+ MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
14
  YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTEzMDIwNjIwNTM0NVoXDTE0MDIwNjIwNTM0NVowSDESMBAG
15
+ 8ixkARkWAmV1MB4XDTE1MDQzMDIxNDAxMVoXDTE2MDQyOTIxNDAxMVowSDESMBAG
16
16
  A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
17
  EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
- ggEBAMF83KZLW/AqbNzjFAd+h5ggr48fNkQBN+Zb40zRryOSrqKQ5CF9sOWHWB/n
19
- UIn5L2pGwcfl2BweSfa2PYJElrcLw1eLDqtLRDTbzG6guGsSrK4hR5cq1tS90XXb
20
- eBE4Rx3b2pQsl4yiwM1FNSqI7jt7x2/Rp8qDoYhCJcmmSH1Y3acf5Sj6wQsKqN+z
21
- Op1jb/tF06kMWIgiLwzOgRD71oXSH6QOOlepWJFdhxRbq1p4tEg7NJjQgiEpCgnu
22
- ECNtIuTnEH4FK+Sllp7WvZNWBT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yQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
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: 2013-10-09 00:00:00.000000000 Z
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: '0'
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.0.0.rc.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