rexle 1.0.24 → 1.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/rexle.rb +13 -3
- data.tar.gz.sig +0 -0
- metadata +23 -3
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 715d2e245bd5e1c9ea26b95839ce1463bd5bf3d0
|
4
|
+
data.tar.gz: 525c6638fb8db26c2430649a7d3ae43161c753f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 687aca22ffbc999432b2e1733e00e84c07fa78bc4c08ef84a61ce9e3cfccf78b987d412dd85dd185ae4994aaa773032959a3c674880ef37aa505c9a59c4a6034
|
7
|
+
data.tar.gz: aec7ef2a5e47e9e6b7b6bc294f6b405c7a5aa89deba913245c9c417cf7a0a7f617bdef8d7e5588aca53452aaae5181479c98d48ee4c69f4615da2aa93dbdc910
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/rexle.rb
CHANGED
@@ -6,11 +6,13 @@ require 'rexml/document'
|
|
6
6
|
require 'rexleparser'
|
7
7
|
require 'dynarex-parser'
|
8
8
|
require 'polyrex-parser'
|
9
|
+
require 'rexle-css'
|
9
10
|
require 'cgi'
|
10
11
|
include REXML
|
11
12
|
|
12
13
|
# modifications:
|
13
14
|
|
15
|
+
# 12-Oct-2014: feature: Implemented CSS style element selection
|
14
16
|
# 27-Sep-2014: bug fix: ELement values are now explicitly transformed to string
|
15
17
|
# 16-Sep-2014: Feature: Impelemented Rexle::Element#each_recursive
|
16
18
|
# 07-Aug-2014: feature: Rexle::CData can now be used to create CDATA
|
@@ -246,7 +248,11 @@ class Rexle
|
|
246
248
|
|
247
249
|
end
|
248
250
|
|
249
|
-
end
|
251
|
+
end
|
252
|
+
|
253
|
+
def css(selector)
|
254
|
+
@doc.root.xpath RexleCSS.new(selector).to_xpath
|
255
|
+
end
|
250
256
|
|
251
257
|
def xpath(path, &blk)
|
252
258
|
@doc.xpath(path, &blk)
|
@@ -285,6 +291,10 @@ class Rexle
|
|
285
291
|
length = query_xpath(path).flatten.compact.length
|
286
292
|
length
|
287
293
|
end
|
294
|
+
|
295
|
+
def css(selector)
|
296
|
+
self.root.xpath RexleCSS.new(selector).to_xpath
|
297
|
+
end
|
288
298
|
|
289
299
|
def max(path)
|
290
300
|
a = query_xpath(path).flatten.select{|x| x.is_a? String}.map(&:to_i)
|
@@ -1030,7 +1040,7 @@ class Rexle
|
|
1030
1040
|
|
1031
1041
|
def scan_element(name, value=nil, attributes=nil, *children)
|
1032
1042
|
|
1033
|
-
element = Element.new(name, value.to_s, attributes, self)
|
1043
|
+
element = Element.new(name, (value ? value.to_s : value), attributes, self)
|
1034
1044
|
|
1035
1045
|
if children then
|
1036
1046
|
children.each do |x|
|
@@ -1053,4 +1063,4 @@ class Rexle
|
|
1053
1063
|
[node.name, node.text.to_s, attributes, *children]
|
1054
1064
|
end
|
1055
1065
|
|
1056
|
-
end
|
1066
|
+
end
|
data.tar.gz.sig
CHANGED
Binary file
|
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.25
|
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-10-12 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rexleparser
|
@@ -113,6 +113,26 @@ dependencies:
|
|
113
113
|
- - ">="
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: 0.1.9
|
116
|
+
- !ruby/object:Gem::Dependency
|
117
|
+
name: rexle-css
|
118
|
+
requirement: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0.1'
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 0.1.0
|
126
|
+
type: :runtime
|
127
|
+
prerelease: false
|
128
|
+
version_requirements: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0.1'
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: 0.1.0
|
116
136
|
description:
|
117
137
|
email: james@r0bertson.co.uk
|
118
138
|
executables: []
|
@@ -143,5 +163,5 @@ rubyforge_project:
|
|
143
163
|
rubygems_version: 2.2.2
|
144
164
|
signing_key:
|
145
165
|
specification_version: 4
|
146
|
-
summary: Rexle is
|
166
|
+
summary: Rexle is an XML parser written purely in Ruby
|
147
167
|
test_files: []
|
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
oc�t��46O�.䗗8��qM��V\��M��)0����5|��;�$-o���ҩ���Sc��$nN� UF����I+���ټ�l(P.�}p�Qfn�+��DD��6�I��pv
|
2
|
+
6�p�f�����=�����hB�ŗoR��2⊄<����]��5�S^?㾎?d��R���<�;��P�W#�c�+���N���.[Ci��,� ]yj��%g�@�sB�d����j�.�HZ���N�-�{:����{
|