xml-smart 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/xml/smart.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'nokogiri'
3
3
  require 'lockfile'
4
+ require 'tempfile'
4
5
 
5
6
  require File.expand_path(File.dirname(__FILE__) + '/smart_qname')
6
7
  require File.expand_path(File.dirname(__FILE__) + '/smart_dom')
@@ -89,7 +90,7 @@ module Nokogiri
89
90
  end
90
91
 
91
92
  module XML
92
- VERSION = '0.3.0'
93
+ VERSION = '0.3.2'
93
94
  LIBXML_VERSION = Nokogiri::VERSION_INFO['libxml']['loaded']
94
95
  LOCKFILE = {
95
96
  :min_sleep => 0.25,
@@ -105,7 +106,7 @@ module XML
105
106
  def initialize(name,default=nil); open(name,default); end
106
107
 
107
108
  def self::modify(name,default=nil,&block)
108
- raise Error, 'first parameter has to be a filename or filehandle' unless name.is_a?(String) || name.is_a?(IO)
109
+ raise Error, 'first parameter has to be a filename or filehandle' unless name.is_a?(String) || name.is_a?(IO) || name.is_a?(Tempfile)
109
110
  raise Error, 'a block is mandatory' unless block_given?
110
111
  lfname = name.is_a?(String) ? name : name.fileno.to_s
111
112
  lockfile = Lockfile.new(lfname + '.lock',LOCKFILE)
data/test/EXAMPLE.xml CHANGED
@@ -1,6 +1,6 @@
1
1
  <test xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xml:lang="de">
2
2
  <names>
3
- <name team="0" a="3">2012-10-18 01:00:26 +0200</name>
3
+ <name team="0" a="3">2012-12-12 16:43:40 +0100</name>
4
4
  <name team="1">Jürgen</name>
5
5
  <name team="1">Michel</name>
6
6
  <name team="1">Raphi</name>
data/xml-smart.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "xml-smart"
3
- s.version = "0.3.1"
3
+ s.version = "0.3.2"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.summary = "An xml library that doesn't suck - since 2004."
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xml-smart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-17 00:00:00.000000000 Z
12
+ date: 2013-01-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70618930 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
24
+ version_requirements: *70618930
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: lockfile
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70618300 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ! '>='
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: '0'
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
35
+ version_requirements: *70618300
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: term-ansicolor
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &70618000 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ! '>='
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: '0'
54
44
  type: :runtime
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
46
+ version_requirements: *70618000
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: minitest
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &70617680 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ! '>='
@@ -69,12 +54,7 @@ dependencies:
69
54
  version: '0'
70
55
  type: :runtime
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
57
+ version_requirements: *70617680
78
58
  description: An xml library that doesn't suck (since 2004). Based on Nokogiri since
79
59
  2012. For more info check out the Documentation link below.
80
60
  email: juergen.mangler@gmail.com
@@ -83,63 +63,63 @@ extensions: []
83
63
  extra_rdoc_files:
84
64
  - README.rdoc
85
65
  files:
66
+ - lib/xml/smart_domnamespaceset.rb
67
+ - lib/xml/smart_domattribute.rb
68
+ - lib/xml/smart_domnamespace.rb
86
69
  - lib/xml/smart_domnodeset.rb
70
+ - lib/xml/smart_domtext.rb
87
71
  - lib/xml/smart_dom.rb
88
- - lib/xml/smart_qname.rb
72
+ - lib/xml/smart_domelement.rb
89
73
  - lib/xml/smart_domother.rb
90
- - lib/xml/smart_domattribute.rb
74
+ - lib/xml/smart_qname.rb
91
75
  - lib/xml/XSDtoRNG.xsl
92
- - lib/xml/smart.rb
93
- - lib/xml/smart_domelement.rb
94
- - lib/xml/smart_domnamespaceset.rb
95
- - lib/xml/smart_domtext.rb
96
76
  - lib/xml/smart_domattributeset.rb
97
- - lib/xml/smart_domnamespace.rb
98
- - example/xpath_visual.rb
77
+ - lib/xml/smart.rb
99
78
  - example/EXAMPLE.xml
79
+ - example/xpath_visual.rb
100
80
  - COPYING
101
81
  - Rakefile
102
82
  - xml-smart.gemspec
103
83
  - README.rdoc
104
84
  - AUTHORS
105
- - test/tc_xpath.rb
85
+ - test/tc_delete.rb
86
+ - test/tc_xpath_attrs.rb
87
+ - test/tc_xpath_functions.rb
88
+ - test/tc_sort.rb
89
+ - test/tc_xmlschema.rb
90
+ - test/tc_move_elements.rb
91
+ - test/tc_add.rb
92
+ - test/tc_namespace_detailed.rb
106
93
  - test/tc_copy.rb
107
- - test/tc_set_or_replace.rb
108
- - test/tc_nested.rb
109
- - test/tc_todoc.rb
110
- - test/tc_namespace_find.rb
94
+ - test/tc_namespace_default.rb
111
95
  - test/tc_string.rb
112
- - test/tc_namespace_detailed.rb
96
+ - test/tc_set_or_replace.rb
113
97
  - test/tc_write.rb
114
- - test/tc_basic.rb
98
+ - test/tc_xsl.rb
115
99
  - test/tc_create.rb
116
- - test/tc_move_elements.rb
117
- - test/tc_xpath_attrs.rb
118
- - test/tc_sort.rb
119
- - test/tc_qname.rb
100
+ - test/tc_nested.rb
120
101
  - test/tc_xpath_root.rb
121
- - test/tc_namespace_default.rb
122
- - test/tc_xsl.rb
123
- - test/tc_xmlschema.rb
124
- - test/tc_relaxng.rb
125
- - test/tc_xpath_functions.rb
102
+ - test/tc_qname.rb
103
+ - test/tc_todoc.rb
126
104
  - test/tc_concurrent.rb
127
- - test/tc_add.rb
128
- - test/tc_delete.rb
105
+ - test/tc_basic.rb
106
+ - test/tc_namespace_find.rb
107
+ - test/tc_relaxng.rb
129
108
  - test/tc_xinclude.rb
109
+ - test/tc_xpath.rb
110
+ - test/HELLO.xml
130
111
  - test/EXAMPLE.tmp.xml
131
- - test/3.xml
112
+ - test/2.xml
113
+ - test/HELLO-MORE.xml
132
114
  - test/EXAMPLE-NSE.xml
115
+ - test/EXAMPLE.xml
133
116
  - test/EXAMPLE.str.xml
134
- - test/2.xml
135
117
  - test/concurrent.xml
136
- - test/HELLO.xml
118
+ - test/EXAMPLE-NS.xml
119
+ - test/XSL_DOCUMENT.xml
137
120
  - test/1.xml
138
121
  - test/XSL_BASE.xml
139
- - test/HELLO-MORE.xml
140
- - test/XSL_DOCUMENT.xml
141
- - test/EXAMPLE.xml
142
- - test/EXAMPLE-NS.xml
122
+ - test/3.xml
143
123
  - test/HELLO.rng
144
124
  - test/HELLO.xsd
145
125
  - test/XSL_BASE.xml.test
@@ -166,49 +146,49 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
146
  version: '0'
167
147
  requirements: []
168
148
  rubyforge_project:
169
- rubygems_version: 1.8.23
149
+ rubygems_version: 1.8.11
170
150
  signing_key:
171
151
  specification_version: 3
172
152
  summary: An xml library that doesn't suck - since 2004.
173
153
  test_files:
174
- - test/tc_xpath.rb
154
+ - test/tc_delete.rb
155
+ - test/tc_xpath_attrs.rb
156
+ - test/tc_xpath_functions.rb
157
+ - test/tc_sort.rb
158
+ - test/tc_xmlschema.rb
159
+ - test/tc_move_elements.rb
160
+ - test/tc_add.rb
161
+ - test/tc_namespace_detailed.rb
175
162
  - test/tc_copy.rb
176
- - test/tc_set_or_replace.rb
177
- - test/tc_nested.rb
178
- - test/tc_todoc.rb
179
- - test/tc_namespace_find.rb
163
+ - test/tc_namespace_default.rb
180
164
  - test/tc_string.rb
181
- - test/tc_namespace_detailed.rb
165
+ - test/tc_set_or_replace.rb
182
166
  - test/tc_write.rb
183
- - test/tc_basic.rb
167
+ - test/tc_xsl.rb
184
168
  - test/tc_create.rb
185
- - test/tc_move_elements.rb
186
- - test/tc_xpath_attrs.rb
187
- - test/tc_sort.rb
188
- - test/tc_qname.rb
169
+ - test/tc_nested.rb
189
170
  - test/tc_xpath_root.rb
190
- - test/tc_namespace_default.rb
191
- - test/tc_xsl.rb
192
- - test/tc_xmlschema.rb
193
- - test/tc_relaxng.rb
194
- - test/tc_xpath_functions.rb
171
+ - test/tc_qname.rb
172
+ - test/tc_todoc.rb
195
173
  - test/tc_concurrent.rb
196
- - test/tc_add.rb
197
- - test/tc_delete.rb
174
+ - test/tc_basic.rb
175
+ - test/tc_namespace_find.rb
176
+ - test/tc_relaxng.rb
198
177
  - test/tc_xinclude.rb
178
+ - test/tc_xpath.rb
179
+ - test/HELLO.xml
199
180
  - test/EXAMPLE.tmp.xml
200
- - test/3.xml
181
+ - test/2.xml
182
+ - test/HELLO-MORE.xml
201
183
  - test/EXAMPLE-NSE.xml
184
+ - test/EXAMPLE.xml
202
185
  - test/EXAMPLE.str.xml
203
- - test/2.xml
204
186
  - test/concurrent.xml
205
- - test/HELLO.xml
187
+ - test/EXAMPLE-NS.xml
188
+ - test/XSL_DOCUMENT.xml
206
189
  - test/1.xml
207
190
  - test/XSL_BASE.xml
208
- - test/HELLO-MORE.xml
209
- - test/XSL_DOCUMENT.xml
210
- - test/EXAMPLE.xml
211
- - test/EXAMPLE-NS.xml
191
+ - test/3.xml
212
192
  - test/HELLO.rng
213
193
  - test/HELLO.xsd
214
194
  - test/XSL_BASE.xml.test