rexle 1.0.13 → 1.0.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87fabd5a5c3fc2e0ca885909a0a91eb9c1bb8781
4
- data.tar.gz: 0a6c2189fe2b6fa4fa5f03c1515fe0219319808c
3
+ metadata.gz: a1650e726f4b4ffa2a54966e1d1a11a0b78f51cb
4
+ data.tar.gz: 9f42e3580e0196dc4aade2e6977943f7afc3dc4e
5
5
  SHA512:
6
- metadata.gz: 02610190029c87269077edd8c6272ac53b0f3a9e8c90339fbb244c5d57776a604d66c4a93785119123dbb10cf911c970d400dfd0f6e81951e252a8f6e46274af
7
- data.tar.gz: 9bd343d803c0ac7daf853e28111171949f1cea9de6d5548b15349ae0d023d2857c4abc3b239287515aef67dd1bd525920e8e223ae20ba7ec87aef6978c952613
6
+ metadata.gz: ef3ae38642ddf71b4c0ee1c6564d5c881f78875a7c6271d786fc8992124bbb5b54740e3136097390a0429ecbd4ea7b1bd240f3ebd0a292eb058d9024a2aadedb
7
+ data.tar.gz: db6441d1306c6dd112b00f820a5ba41d90728a806866afc4726378bc18dc3764273d69f82c1e74bceec14cd5137802d48c513d51b33980c40e44321d33c626a6
checksums.yaml.gz.sig CHANGED
@@ -1 +1 @@
1
- �:@Sg����f���J���_�d�4z���8C{�� RM]����f{P����}q,��!h�:�U���d
1
+ �.���±C�\lB����+UC�Ip�N�Q��՗��L�J�]�La���."�+�\��)����s��d� �r�c����s��˧;B&�:�U���`���;9ط��3ݹ����G�rYP��At�<)��G�C��r���B�� 4��ןƻ2"��#�0�b>��D�ൗG�=D@x 5N���J���w0?(sEmN���~��ܾ���̽���E��DAҝ�7f��^5ϵ��F)1.+>U��{���:�%$3]
data/lib/rexle.rb CHANGED
@@ -11,6 +11,8 @@ include REXML
11
11
 
12
12
  # modifications:
13
13
 
14
+ # 07-Jun-2014: bug fix: An XPath nested within an XPath (using a selector)
15
+ # should now wok properly e.g. record/abc[item/xyz="red"]
14
16
  # 04-Jun-2014: bug fix: If XPath contains /text(), only valid
15
17
  # text elements are returned
16
18
  # 03-Jun-2014: bug fix: Text elements are now nil by default
@@ -753,7 +755,7 @@ class Rexle
753
755
  if x[0][/\//] then
754
756
  path, value = x.values_at(0,-1)
755
757
 
756
- "e.xpath('#{path}').first.value == #{value}"
758
+ "r = e.xpath('#{path}').first; r and r.value == #{value}"
757
759
  else
758
760
  "(name == '%s' and value %s '%s')" % [x[0], x[1], x[2].sub(/^['"](.*)['"]$/,'\1')]
759
761
  end
@@ -827,6 +829,8 @@ class Rexle
827
829
 
828
830
  def attribute_search(attr_search, e, h, i=nil, &blk)
829
831
 
832
+ r2 = e.xpath('records/dependency/summary/title')
833
+
830
834
  if attr_search.is_a? Fixnum then
831
835
  block_given? ? blk.call(e) : e if i == attr_search
832
836
  elsif attr_search[/i\s[<>\=]\s\d+/] and eval(attr_search) then
@@ -838,7 +842,6 @@ class Rexle
838
842
  elsif attr_search[/^\(name ==/] and eval(attr_search)
839
843
  block_given? ? blk.call(e) : e
840
844
  elsif attr_search[/^e\.value/]
841
-
842
845
  v = attr_search[/[^\s]+$/]
843
846
  duck_type = %w(to_f to_i to_s).detect {|x| v == v.send(x).to_s}
844
847
  attr_search.sub!(/^e.value/,'e.value.' + duck_type)
@@ -846,7 +849,7 @@ class Rexle
846
849
  if eval(attr_search) then
847
850
  block_given? ? blk.call(e) : e
848
851
  end
849
- elsif attr_search[/^e\.xpath/] and eval(attr_search)
852
+ elsif attr_search[/e\.xpath/] and eval(attr_search)
850
853
  block_given? ? blk.call(e) : e
851
854
  end
852
855
  end
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- O���sͦE���\M��)Jf���Ps�v�R�\�~�#�2 &���bข<�Ӿ!��s�O]a2�qL�A�O,\��@�� o ��Zd[RD_%�^0D�#��d���臺��B#��H�d8iDubgD��Е��kkqX��dn0|kr�)N2�(��t����W'���a#ֈ^,�8��H��
2
- ��+>���d]��T�mڑ��Iֽ~�s��4Ri|5��D��V���;�w
1
+ o4H��̮g6`\S����'�2�!��5{"�s8G�5t~�]�쨨1I7��vu6T��OP��+����Uz��,K�;8L�a?rJ%��PMY��@�)����'꺣�Fs`ȋJ759ǎZJ_z�
2
+ �T=�O^@F �\�؝�����#fDQ6ZJt�,��i��!�r�A��g���F����8�zo0��9 �͢ � )���Y��.U��
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  UOGKUMV5RApHDnC0ywMYNe0HK7qMSTP5YLKs8JUjNxpc5jl8+o3D3sHkNN4DzbQm
32
32
  jVfzDZ+niKvAUA==
33
33
  -----END CERTIFICATE-----
34
- date: 2014-06-05 00:00:00.000000000 Z
34
+ date: 2014-06-07 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rexleparser
@@ -132,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
133
  - - ">="
134
134
  - !ruby/object:Gem::Version
135
- version: '0'
135
+ version: 2.1.2
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ">="
metadata.gz.sig CHANGED
Binary file