rexle 1.0.35 → 1.0.36

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: dda89926370f5a1b5312d4bf4572a73b51756087
4
- data.tar.gz: b1353620bab763e726578a2c6e7138bf47d8a370
3
+ metadata.gz: 4967f26b63bcfada703395e8d5ff04b652671185
4
+ data.tar.gz: a1ad04fe5257358c2713c918fb7429392c1ce1e6
5
5
  SHA512:
6
- metadata.gz: 7e0af2828ca5917c322f699c66093f214eaa09d55db35a107467829b6729735a75b0c07376ce45457413402897b234f6ed9a474db02227d5f021180a16356001
7
- data.tar.gz: bfadb7996db8c7accf95ca59e65ec05c00d04cd35554baf26ef2c67cb8bd351df3fbff181406ed033842fab5bfeb1e6ef963c6473772b568a913243dcaa33ae9
6
+ metadata.gz: e446a0360e03d39a8f0a2d1669616eca65ab13b1c2a9b9ed708eaa1f06d62bbfb389c356d71f8f591693e0fd452d4caec6b5ab36105b57a041930222022879ed
7
+ data.tar.gz: 3fc8dc811e3f2c9ce738ae3c03823e9094f45505f460595f19950b4d8fc3c001c7f03d7f6429ff62a1be91a76b8140e3438922a63e935b249e5188fc329d9dbe
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/rexle.rb CHANGED
@@ -12,6 +12,8 @@ include REXML
12
12
 
13
13
  # modifications:
14
14
 
15
+ # 07-Dec-2014: featureL The Rexle::Element#Css() parameter can now contain
16
+ # multiple css paths within the string e.g. '.abc, div'
15
17
  # 30-Nov-2014: feature: XPath now supports parent (..) traversal e.g. b/../b2
16
18
  # 21-Nov-2014: feature: Added at_css() to select a single element
17
19
  # 27-Oct-2014: bug fix: Now Checks for an array instead of a string when
@@ -297,7 +299,7 @@ class Rexle
297
299
  end
298
300
 
299
301
  def css(selector)
300
- @doc.root.xpath RexleCSS.new(selector).to_xpath
302
+ selector.split(',').flat_map{|x| @doc.root.xpath RexleCSS.new(x).to_xpath}
301
303
  end
302
304
 
303
305
  def xpath(path, &blk)
@@ -343,7 +345,9 @@ class Rexle
343
345
  end
344
346
 
345
347
  def css(selector)
346
- self.root.xpath RexleCSS.new(selector).to_xpath
348
+
349
+ selector.split(',')\
350
+ .flat_map{|x| self.root.xpath RexleCSS.new(x).to_xpath}
347
351
  end
348
352
 
349
353
  def max(path)
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.35
4
+ version: 1.0.36
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-11-30 00:00:00.000000000 Z
34
+ date: 2014-12-07 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rexleparser
metadata.gz.sig CHANGED
Binary file