rexle 0.9.71 → 0.9.72
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rexle.rb +11 -3
- metadata +70 -68
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ac4a2361354435208ff38599428f22f5ed56e50e
|
4
|
+
data.tar.gz: dc547a0e5341ca5f29e270d591cf3eb78df18f3d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 37163a7b96a8d4fef2d26c421f14fd82e509fdf7d41409399b0ab29c573f3a6b4238dab7fca309d062b278c9fcd5025fe55f82f5ea8afdc795c54066c33c9729
|
7
|
+
data.tar.gz: fd79b4ef11066c26ba17d8dfa01788fbd689081762bf4b2644073d2364cbc24e76fa73080cfaef56c944ba86d65fa0bc57cca23843c3dab2fb0b897e216117b5
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle.rb
CHANGED
@@ -10,6 +10,7 @@ require 'cgi'
|
|
10
10
|
include REXML
|
11
11
|
|
12
12
|
# modifications:
|
13
|
+
# 25-jun-2013: bug fix: doc.root.delete(xpath) fixed
|
13
14
|
# 10-Nov-2012: Elements can now be added starting from an empty document
|
14
15
|
# 06-Nov-2012: additional xpath predicate now implemented e.g.
|
15
16
|
# fun/. > 200 => [false, false, true, true]
|
@@ -353,7 +354,7 @@ class Rexle
|
|
353
354
|
attr_search = format_condition(condition) if condition and condition.length > 0
|
354
355
|
attr_search2 = xpath_value[/^\[(.*)\]$/,1]
|
355
356
|
|
356
|
-
if attr_search2 then
|
357
|
+
if attr_search2 then
|
357
358
|
r4 = attribute_search(attr_search, self, self.attributes)
|
358
359
|
return r4
|
359
360
|
end
|
@@ -384,8 +385,10 @@ class Rexle
|
|
384
385
|
if return_elements.length > 0 then
|
385
386
|
|
386
387
|
if (a_path + [remaining_path]).join.empty? then
|
388
|
+
|
387
389
|
rlist = return_elements.map.with_index {|x,i| filter(x, i+1, attr_search, &blk)}.compact
|
388
390
|
rlist = rlist[0] if rlist.length == 1
|
391
|
+
|
389
392
|
else
|
390
393
|
|
391
394
|
rlist << return_elements.map.with_index do |x,i|
|
@@ -499,8 +502,13 @@ class Rexle
|
|
499
502
|
|
500
503
|
def delete(obj=nil)
|
501
504
|
if obj then
|
502
|
-
|
503
|
-
|
505
|
+
if obj.is_a? String then
|
506
|
+
e = self.element obj
|
507
|
+
e.delete if e
|
508
|
+
else
|
509
|
+
i = @child_elements.index(obj)
|
510
|
+
[@child_elements, @child_lookup].each{|x| x.delete_at i} if i
|
511
|
+
end
|
504
512
|
else
|
505
513
|
self.parent.delete self
|
506
514
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rexle
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.9.71
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.72
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- James Robertson
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
|
-
cert_chain:
|
10
|
+
cert_chain:
|
12
11
|
- |
|
13
12
|
-----BEGIN CERTIFICATE-----
|
14
13
|
MIIDRDCCAiygAwIBAgIBADANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
@@ -30,89 +29,92 @@ cert_chain:
|
|
30
29
|
EgghkUCgC30KsgaYheoN5ILHCE52JXCfr1Qto26qUSdC49xWkxnQz2yrSq8z085Q
|
31
30
|
h0bKDk/qqjLsNUnSPxhypj3wTgJNdHKX
|
32
31
|
-----END CERTIFICATE-----
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
32
|
+
date: 2013-06-25 00:00:00.000000000 Z
|
33
|
+
dependencies:
|
34
|
+
- !ruby/object:Gem::Dependency
|
37
35
|
name: rexleparser
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: "0"
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
45
41
|
type: :runtime
|
46
|
-
version_requirements: *id001
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: dynarex-parser
|
49
42
|
prerelease: false
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: dynarex-parser
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
56
55
|
type: :runtime
|
57
|
-
version_requirements: *id002
|
58
|
-
- !ruby/object:Gem::Dependency
|
59
|
-
name: polyrex-parser
|
60
56
|
prerelease: false
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: polyrex-parser
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
67
69
|
type: :runtime
|
68
|
-
version_requirements: *id003
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rexle-builder
|
71
70
|
prerelease: false
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rexle-builder
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
78
83
|
type: :runtime
|
79
|
-
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
80
90
|
description:
|
81
91
|
email:
|
82
92
|
executables: []
|
83
|
-
|
84
93
|
extensions: []
|
85
|
-
|
86
94
|
extra_rdoc_files: []
|
87
|
-
|
88
|
-
files:
|
95
|
+
files:
|
89
96
|
- lib/rexle.rb
|
90
97
|
homepage:
|
91
98
|
licenses: []
|
92
|
-
|
99
|
+
metadata: {}
|
93
100
|
post_install_message:
|
94
101
|
rdoc_options: []
|
95
|
-
|
96
|
-
require_paths:
|
102
|
+
require_paths:
|
97
103
|
- lib
|
98
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: "0"
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - '>='
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - '>='
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
110
114
|
requirements: []
|
111
|
-
|
112
115
|
rubyforge_project:
|
113
|
-
rubygems_version:
|
116
|
+
rubygems_version: 2.0.0.rc.2
|
114
117
|
signing_key:
|
115
|
-
specification_version:
|
118
|
+
specification_version: 4
|
116
119
|
summary: Rexle is a simple XML parser written purely in Ruby
|
117
120
|
test_files: []
|
118
|
-
|
metadata.gz.sig
CHANGED
Binary file
|