rexle 1.3.33 → 1.3.34

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: 5899147c749d52b55c59a05f23362124f8bf5329
4
- data.tar.gz: 3892313cc7233de726f0af7d2913349c23940142
3
+ metadata.gz: 5fdf88c793c8d5124a317111590bf0d147aced15
4
+ data.tar.gz: 8288d7cc45c890c02471d1f0084acf714c470eff
5
5
  SHA512:
6
- metadata.gz: bd74fa531c3b64e3a69af97d4537e4165a1611ff54c6891922b9b9b4a6dcd59874a5c9295df8228c97b164878db29363f960237f4f9b27742efce0863537200c
7
- data.tar.gz: ca34918f9e079187d46548c96f55bd12acdef54498e44cab10138bcfb13787a840729fe7f57c4c072dffdd90d93c62501458e19177d090a11fa398a130616c9c
6
+ metadata.gz: ca9664b3c23eda1cc0a7ad4b4ea5dfb8014fd5e784e0da53086815485ca1e4e01b1ca8c486e6c6e750b9e72d50bd55266a71d34e95efdf584217b5e9d5c2700a
7
+ data.tar.gz: 888325db38fba0b2a29dd255d3ad16d5871ca021f8f0ef0a511a7bcdf5b676aed1cf12f079074cf29a4f7f9f658adb52d64c0fe3861975be13b3a4ca30579dec
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rexle.rb CHANGED
@@ -12,7 +12,10 @@ require 'backtrack-xpath'
12
12
 
13
13
  # modifications:
14
14
 
15
- # 21-May-2016: design fix: When an attribute is specified within an XPath, a
15
+ # 21-May-2016: bug fix: If an xpath containing and attribute only is passed
16
+ # into method Rexle::Element#text it will now call the
17
+ # attribute's value
18
+ # design fix: When an attribute is specified within an XPath, a
16
19
  # Rexle::Element::Attribute object is now returned
17
20
  # 15-May-2016: bug fix: Rexle::Element::add_attribute can now handle the
18
21
  # object Attribute::Value
@@ -593,8 +596,11 @@ class Rexle
593
596
  attribute = xpath_value[/^(attribute::|@)(.*)/,2]
594
597
 
595
598
  return @attributes if attribute == '*'
596
- return [Attribute.new(@attributes[attribute.to_sym])] if attribute \
597
- and @attributes and @attributes.has_key?(attribute.to_sym)
599
+
600
+ if attribute and @attributes and \
601
+ @attributes.has_key?(attribute.to_sym) then
602
+ return [Attribute.new(@attributes[attribute.to_sym])]
603
+ end
598
604
  s = a_path.shift
599
605
  end
600
606
 
@@ -976,12 +982,6 @@ class Rexle
976
982
  def last(a) a.last end
977
983
  def map(&blk) self.children.map(&blk) end
978
984
  def root() self end
979
-
980
- # Reserved for future use in Rexle 2.0
981
- #
982
- def select(name)
983
- elements.select {|x| x.name == name}
984
- end
985
985
 
986
986
  def text(s='')
987
987
 
@@ -990,7 +990,7 @@ class Rexle
990
990
  e = self.element(s)
991
991
  return e if e.is_a? String
992
992
 
993
- e.text if e
993
+ e.value if e
994
994
  end
995
995
 
996
996
  def texts()
data.tar.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- ��-���aO���b(��d�/�+;�mv���rC����|y�%r4��]�[��ubN���w@���RC�I�2tLG�Hf�i��Kͺ*�v��E���N�*�r��9�`���4Ǎ�q�$?pSښ=ڨE��nj 7,e"}� ���,����
2
- ��Q ��S
3
- !�Z������)�ȳT]dXH�>9���G�oG:�.=xƀ�3:�-ޮ���ɫ�0a�\�:�����~�,��\�c@�".q�/o8xC��4,�綘�~
1
+ �jN�
2
+ #�:�&�q�b��eJY�d#ͻ���=Z����jɡ��wV��.t԰�-�hnCf>�̬�n@N���͹R��
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.3.33
4
+ version: 1.3.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  version: '0'
181
181
  requirements: []
182
182
  rubyforge_project:
183
- rubygems_version: 2.4.8
183
+ rubygems_version: 2.5.1
184
184
  signing_key:
185
185
  specification_version: 4
186
186
  summary: Rexle is an XML parser written purely in Ruby
metadata.gz.sig CHANGED
Binary file