rexle 1.0.33 → 1.0.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +1 -1
- data/lib/rexle.rb +12 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66fbc225c0d02896b6d418d0ec6a982513108c36
|
|
4
|
+
data.tar.gz: 0bd1814fdfe1109a3cdfe2d9fbf91cbccd8f33ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2ce98866752e6bcb22a50d1407d31ccf2294f18ba90eb8f3e4a814af8e8cc8b04ed3d5c4fabc86bc51fe3b209d1746fcf30fb682ed6c9c2db39f1693e437a6d
|
|
7
|
+
data.tar.gz: 93aa15cc820fb639ad1dc41393543110532b541c046edb3e041f858cd062e62f2dfa8e2a5fad90821c59ab1accb224a53d0245bc792905c50ae24b9100b25387
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
�%�{b��I��ny��p[��k%��ͷ�]xJf�-�N7D�R�����[�q�Mu���x��lm��r�p�vgq%C��|�̣���Jz�����=�X!�;��l^���5�}��0b�C+|j�[i[�6c)�j4��&�Т�{d�B�0��<�BȞFD�?�ϘK���b.��e�s��(�}=���V�,br�^/��.�U& \W�e��"v�G=��+��|���h�.�0������o�
|
data/lib/rexle.rb
CHANGED
|
@@ -12,6 +12,7 @@ include REXML
|
|
|
12
12
|
|
|
13
13
|
# modifications:
|
|
14
14
|
|
|
15
|
+
# 21-Nov-2014: feature: Added at_css() to select a single element
|
|
15
16
|
# 27-Oct-2014: bug fix: Now Checks for an array instead of a string when
|
|
16
17
|
# outputting xml attribute values to get
|
|
17
18
|
# around nil values
|
|
@@ -250,7 +251,7 @@ end
|
|
|
250
251
|
class Rexle
|
|
251
252
|
include XMLhelper
|
|
252
253
|
|
|
253
|
-
attr_reader :prefixes
|
|
254
|
+
attr_reader :prefixes, :doctype
|
|
254
255
|
attr_accessor :instructions
|
|
255
256
|
|
|
256
257
|
def initialize(x=nil)
|
|
@@ -258,6 +259,7 @@ class Rexle
|
|
|
258
259
|
super()
|
|
259
260
|
|
|
260
261
|
@instructions = [["xml", "version='1.0' encoding='UTF-8'"]]
|
|
262
|
+
@doctype = :xml
|
|
261
263
|
|
|
262
264
|
# what type of input is it? Is it a string, array, or REXML doc?
|
|
263
265
|
if x then
|
|
@@ -288,6 +290,11 @@ class Rexle
|
|
|
288
290
|
def clone()
|
|
289
291
|
Rexle.new self.to_a
|
|
290
292
|
end
|
|
293
|
+
|
|
294
|
+
def at_css(selector)
|
|
295
|
+
@doc.root.element RexleCSS.new(selector).to_xpath
|
|
296
|
+
end
|
|
297
|
+
|
|
291
298
|
def css(selector)
|
|
292
299
|
@doc.root.xpath RexleCSS.new(selector).to_xpath
|
|
293
300
|
end
|
|
@@ -330,6 +337,10 @@ class Rexle
|
|
|
330
337
|
length
|
|
331
338
|
end
|
|
332
339
|
|
|
340
|
+
def at_css(selector)
|
|
341
|
+
self.root.element RexleCSS.new(selector).to_xpath
|
|
342
|
+
end
|
|
343
|
+
|
|
333
344
|
def css(selector)
|
|
334
345
|
self.root.xpath RexleCSS.new(selector).to_xpath
|
|
335
346
|
end
|
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.
|
|
4
|
+
version: 1.0.34
|
|
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-
|
|
34
|
+
date: 2014-11-21 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rexleparser
|
metadata.gz.sig
CHANGED
|
Binary file
|