rexle 1.4.10 → 1.4.11

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: bb551e9cf6a92e8f75ac9067fad4c2afaf5f7dd9
4
- data.tar.gz: 5e73ba3a1bae02aa5ce2385d43d4dd6bf131f3c8
3
+ metadata.gz: 94bf2d647560e258a0b9595450e5a60f9aea7e20
4
+ data.tar.gz: a9f1eca3a3071070e3743b973b525b6e61ca144c
5
5
  SHA512:
6
- metadata.gz: 4cd6f197d50eb6a4f8c9e5f5813b718daef95691d4e3ecd76673a0b3df73483f4fb1a5b8ac4bbf3609757c3e97338fca2810f5c83444197354d99bf5db403026
7
- data.tar.gz: ce54a10d2f5371009657ace6951f2504a58ad12a7a02ead2077b1cdcd3a1fd9dd0f16199fa90dfa13e58be3224469289be200b1a247f8d3e0a0441fdd8dc548b
6
+ metadata.gz: 7477045dcdb02552d37c7841e6ed6a47547ee2e7345a78c7c8cb41514cab7f3ae73bf0464201d6ae53f94e958f5f976194425f9822ed502ec775f1452231861e
7
+ data.tar.gz: b7104a97b004094aa5d0b049c3a84c70d4afe6468c2a03ce581949521e6ef7d087c1202dba2d6626519d3f4cbaa0df7eee37059804be652c2d9f7e7da27e3e5c
checksums.yaml.gz.sig CHANGED
@@ -1 +1,3 @@
1
- ��'6��1nI@��K) 8Y%p�����T zٰ�y�ن-��"���|;�Q�a���.�¬�4��c7t%
1
+ O1c�u=��a��c���s�.dZ��
2
+ �M�CZ�$m���U�s9U(��sp2
3
+ ��a�5M�y]P����R�7"T4Q`�sAn�n<��[5�8BnX��+��&����A�O �D�����b��"����a� Ŏ�Ռ,����P$@��� �D�fo�L6o�ق�J�SD@ۀ���`��(E+�i���( Ƣ~$�u5�=�����PÑ� ���Ĩl>�Dk�]�V���
4
+ Uׁ4����z��J�Y����O�!T�L�
data.tar.gz.sig CHANGED
Binary file
data/lib/rexle.rb CHANGED
@@ -11,6 +11,7 @@ require 'backtrack-xpath'
11
11
 
12
12
 
13
13
  # modifications:
14
+ # 18-Jan-2018: bug fix: An Element's attributes are now cloned too
14
15
  # 16-Sep-2017: improvement: Multiple results are now returned if the
15
16
  # xpath contains an *and* operator
16
17
  # 14-Sep-2017: improvement: An *and* operator can now be
@@ -26,55 +27,6 @@ require 'backtrack-xpath'
26
27
  # An input rexle array can now have an empty array for
27
28
  # children e.g. doc = Rexle.new(["records", {}, "", []])
28
29
  # 25-Dec-2016: revision for Ruby 2.4: Replaced Fixnum with Integer
29
- # 11-Dec-2016: backtrack improvement: The usage of attributes (ID, or class) in the returned XPath is now optional
30
- # 11-Nov-2016: bug fix: escaped string using double quotes instead regarding
31
- # attr_search
32
- # 24-Aug-2016: bug fix: Replaced the Dynarex parser with the native parser
33
- # 08-Jul-2016: bug fix: Dynarex#css will no longer return the Rexle
34
- # object in the results e.g. doc.css '*'
35
- # 21-May-2016: bug fix: If an xpath containing and attribute only is passed
36
- # into method Rexle::Element#text it will now call the
37
- # attribute's value
38
- # design fix: When an attribute is specified within an XPath, a
39
- # Rexle::Element::Attribute object is now returned
40
- # 15-May-2016: bug fix: Rexle::Element::add_attribute can now handle the
41
- # object Attribute::Value
42
- # 06-May-2016: feature: Rexle::Element.text now returns a
43
- # Rexle::Element::Value object which is a kind of
44
- # String which be used for comparing numbers
45
- # 25-Apr-2016: bug fix: Rexle::Element#to_a no longer returns a
46
- # duplicate text value
47
- # 24-Apr-2016: bug fix: The element text is now enclosed within quotes when
48
- # evaluating an xpath condition. see xpath improvement 23-apr-2016
49
- # 23-Apr-2016: xpath improvement: Better predicate support
50
- # e.g. e.xpath("node != ''")
51
- # revision: The previous feature can now include simple
52
- # predicate logic e.g. 2 < 5
53
- # 22-Apr-2016: feature: Using an XPath A pure logic predicate can now be
54
- # processed e.g. (4 % 1) != 1
55
- # 21-Apr-2016: feature: The xpath() method now returns a Rexle::Recordset object
56
- # which itself can be treat as a Rexle document
57
- # An xpath predicate can now contain the mod operator as well as
58
- # containing nested logic e.g. [(position() mod 2) == 1]
59
- # 16-Apr-2016: improvement: The HTML element div is no longer printed as
60
- # a self-closing tag if empty
61
- # 04-Apr-2016: bug fix: modified the bug fix from the 15-Mar-2016 to
62
- # validate on a function name only within the variable attr_search
63
- # minor improvement: Added a new line character between
64
- # XML processing instructions
65
- # 28-Mar-2016: minor feature: the name of an attribute can now be
66
- # passed into Rexle::Element#text
67
- # 15-Mar-2016: bug fix: Reapplied a select case statement (which had
68
- # subsequently been deleted) from method attribute_search()
69
- # 13-Mar-2016: bug fix: Reapplied a statement that was commented out in
70
- # the previous gem release
71
- # bug fix: Removed a redundant statement from
72
- # method attribute_search()
73
- # 12-Mar-2016: A predicate can now handle position() with the
74
- # equality operator e.g. b[position() = 2]
75
- # 09-Mar-2016: bug fix: '.' now returns the current element
76
- # 02-Mar-2016: improvement: When handling the HTML element iframe, it
77
- # is no longer printed as a self-closing tag
78
30
 
79
31
 
80
32
  module XMLhelper
@@ -396,7 +348,12 @@ class Rexle
396
348
 
397
349
  selector.split(',')\
398
350
  .flat_map{|x| self.root.xpath RexleCSS.new(x).to_xpath}
399
- end
351
+ end
352
+
353
+ # not yet implemented
354
+ def lowercase(s)
355
+
356
+ end
400
357
 
401
358
  def max(path)
402
359
  a = query_xpath(path).flatten.select{|x| x.is_a? String or x.is_a? Rexle::Element::Attribute}.map(&:to_i)
@@ -979,7 +936,7 @@ class Rexle
979
936
  def deep_clone() Rexle.new(self.xml).root end
980
937
 
981
938
  def clone()
982
- Element.new(@name, attributes: @attributes)
939
+ Element.new(@name, attributes: @attributes.clone)
983
940
  end
984
941
 
985
942
  def delete(obj=nil)
@@ -1159,6 +1116,7 @@ class Rexle
1159
1116
  elsif raw_items[0][/^not\(/]
1160
1117
 
1161
1118
  return raw_items[0]
1119
+
1162
1120
  else
1163
1121
 
1164
1122
  andor_items = raw_items.map.with_index\
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.4.10
4
+ version: 1.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  CqFh6U4iXSHeN7EtB+IaYwj0O7/uQThVBDM+MzSHp5u25hrVs7KrKap0f6rdAVcF
32
32
  1V8kvBbe/enp7g==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-09-16 00:00:00.000000000 Z
34
+ date: 2018-01-18 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rexleparser
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.6.8
143
+ rubygems_version: 2.6.13
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Rexle is an XML parser written purely in Ruby
metadata.gz.sig CHANGED
Binary file