rexle 1.2.10 → 1.2.12
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.tar.gz.sig +0 -0
- data/lib/rexle.rb +9 -2
- 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: 8ed2ed53b5637e514647b46d12331c94677dcbb5
|
4
|
+
data.tar.gz: 7295c6daea955bf19b41524cf8432a0b68fd2fcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adf7e17d46a1ed9c20babf4c33390d6b5b6cc196ddfe19ab463e57b8b118c0e4fb140a38efd88c402409c3b30439b464cb22dbbbf65d21caaaba540a2590500d
|
7
|
+
data.tar.gz: f211152fe92685a5a2fc23852aa823a17b2654ce3563e389f65641d060506197136bf7c330576819763ae69d393d9e84e2487852c4666b909830b6739dbc7a1c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle.rb
CHANGED
@@ -11,6 +11,10 @@ require 'cgi'
|
|
11
11
|
|
12
12
|
# modifications:
|
13
13
|
|
14
|
+
# 08-Feb-2015: bug fix: Within method filter_xpath(), a new String is created
|
15
|
+
# from raw_path to workaround a frozen string when slice! is called.
|
16
|
+
# bug fix: A Rexle::Element#value will now only return an
|
17
|
+
# object if the 1st child item is a String
|
14
18
|
# 07-Feb-2015: Implemented XPath function last() e.g.
|
15
19
|
# doc.root.xpath('records/item[last()]')
|
16
20
|
# 05-Feb=2015: bug fix:
|
@@ -238,7 +242,7 @@ module XMLhelper
|
|
238
242
|
if (x.value and x.value.length > 0) \
|
239
243
|
or (x.children and x.children.length > 0 \
|
240
244
|
and not x.children.is_an_empty_string?) or x.name == 'script' then
|
241
|
-
|
245
|
+
|
242
246
|
ind1 = (x.children and x.children.grep(Rexle::Element).length > 0) ?
|
243
247
|
("\n" + ' ' * indent) : ''
|
244
248
|
|
@@ -412,8 +416,10 @@ class Rexle
|
|
412
416
|
r.is_a?(Array) ? r.compact : r
|
413
417
|
end
|
414
418
|
|
415
|
-
def filter_xpath(
|
419
|
+
def filter_xpath(raw_path, rlist=[], &blk)
|
416
420
|
|
421
|
+
path = String.new raw_path
|
422
|
+
|
417
423
|
# is it a function
|
418
424
|
fn_match = path.match(/^(\w+)\(["']?([^\)]*)["']?\)(?:\[(.*)\])?$/)
|
419
425
|
end_fn_match = path.slice!(/\[\w+\(\)\]$/)
|
@@ -846,6 +852,7 @@ class Rexle
|
|
846
852
|
def value()
|
847
853
|
|
848
854
|
r = @child_elements.first
|
855
|
+
return nil unless r.is_a? String
|
849
856
|
|
850
857
|
def r.unescape()
|
851
858
|
s = self.clone
|
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.2.
|
4
|
+
version: 1.2.12
|
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: 2015-02-
|
34
|
+
date: 2015-02-08 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rexleparser
|
metadata.gz.sig
CHANGED
Binary file
|