cosm-rb 0.0.9 → 0.0.10
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.
- data/.gitignore +1 -0
- data/lib/cosm-rb/parsers/xml/datastream_defaults.rb +1 -2
- data/lib/cosm-rb/parsers/xml/feed_defaults.rb +2 -2
- data/lib/cosm-rb/version.rb +1 -1
- data/spec/cosm-rb/parsers/xml/datastream_defaults_spec.rb +10 -0
- data/spec/cosm-rb/parsers/xml/feed_defaults_spec.rb +10 -0
- data/spec/support/datastream_helper.rb +11 -11
- data/spec/support/feed_helper.rb +12 -12
- metadata +4 -4
data/.gitignore
CHANGED
@@ -7,8 +7,7 @@ module Cosm
|
|
7
7
|
xml = Nokogiri::XML(xml) do |config|
|
8
8
|
config.strict.nonet
|
9
9
|
end
|
10
|
-
|
11
|
-
when "5"
|
10
|
+
if xml.root.attributes["version"].value == "5" || xml.collect_namespaces["xmlns"] == "http://www.eeml.org/xsd/005"
|
12
11
|
transform_5(xml)
|
13
12
|
else
|
14
13
|
transform_0_5_1(xml)
|
@@ -8,8 +8,8 @@ module Cosm
|
|
8
8
|
xml = Nokogiri::XML(xml) do |config|
|
9
9
|
config.strict.nonet
|
10
10
|
end
|
11
|
-
|
12
|
-
|
11
|
+
if xml.root.attributes["version"].value == "5" ||
|
12
|
+
xml.collect_namespaces["xmlns"] == "http://www.eeml.org/xsd/005"
|
13
13
|
transform_5(xml)
|
14
14
|
else
|
15
15
|
transform_0_5_1(xml)
|
data/lib/cosm-rb/version.rb
CHANGED
@@ -7,6 +7,11 @@ describe "default datastream xml parser" do
|
|
7
7
|
Cosm::Datastream.new(@xml).should fully_represent_datastream(:xml, @xml)
|
8
8
|
end
|
9
9
|
|
10
|
+
it "should convert into attributes hash when no version string but correct xmlns" do
|
11
|
+
xml = datastream_as_(:xml, :omit_version => true)
|
12
|
+
Cosm::Datastream.new(xml).should fully_represent_datastream(:xml, datastream_as_(:xml))
|
13
|
+
end
|
14
|
+
|
10
15
|
it "should handle blank tags" do
|
11
16
|
@xml = datastream_as_(:xml, :except_node => :tag)
|
12
17
|
Cosm::Datastream.new(@xml).should fully_represent_datastream(:xml, @xml)
|
@@ -34,6 +39,11 @@ describe "default datastream xml parser" do
|
|
34
39
|
Cosm::Datastream.new(@xml).should fully_represent_datastream(:xml, @xml)
|
35
40
|
end
|
36
41
|
|
42
|
+
it "should convert into attributes hash even when no version attribute if correct xmlns" do
|
43
|
+
xml = datastream_as_(:xml, :version => "5", :omit_version => true)
|
44
|
+
Cosm::Datastream.new(xml).should fully_represent_datastream(:xml, datastream_as_(:xml, :version => "5"))
|
45
|
+
end
|
46
|
+
|
37
47
|
it "should handle blank tags" do
|
38
48
|
@xml = datastream_as_(:xml, :version => "5", :except_node => :tag)
|
39
49
|
Cosm::Datastream.new(@xml).should fully_represent_datastream(:xml, @xml)
|
@@ -77,6 +77,11 @@ EOXML
|
|
77
77
|
feed.datastreams.size.should == 1
|
78
78
|
feed.datastreams.first.tags.should == "freakin lasers,humidity,Temperature"
|
79
79
|
end
|
80
|
+
|
81
|
+
it "should parse xml missing the version attribute, but with the correct 0.5.1 xmlns" do
|
82
|
+
xml = feed_as_(:xml, :omit_version => true)
|
83
|
+
Cosm::Feed.new(xml).should fully_represent_feed(:xml, feed_as_(:xml))
|
84
|
+
end
|
80
85
|
end
|
81
86
|
|
82
87
|
context "5 (used by API v1)" do
|
@@ -85,6 +90,11 @@ EOXML
|
|
85
90
|
Cosm::Feed.new(@xml).should fully_represent_feed(:xml, @xml)
|
86
91
|
end
|
87
92
|
|
93
|
+
it "should convert into attributes hash if missing version attribute, but with correct xmlns" do
|
94
|
+
xml = feed_as_(:xml, :version => "5", :omit_version => true)
|
95
|
+
Cosm::Feed.new(xml).should fully_represent_feed(:xml, feed_as_(:xml, :version => "5"))
|
96
|
+
end
|
97
|
+
|
88
98
|
it "should handle blank tags" do
|
89
99
|
@xml = feed_as_(:xml, :version => "5", :except_node => :tag)
|
90
100
|
Cosm::Feed.new(@xml).should fully_represent_feed(:xml, @xml)
|
@@ -29,7 +29,7 @@ def datastream_as_(format, options = {})
|
|
29
29
|
when 'json'
|
30
30
|
data = datastream_as_json(options[:version] || "1.0.0")
|
31
31
|
when 'xml'
|
32
|
-
data = datastream_as_xml(options[:version] || "0.5.1", options[:except_node])
|
32
|
+
data = datastream_as_xml(options[:version] || "0.5.1", options[:except_node], options[:omit_version])
|
33
33
|
when 'csv'
|
34
34
|
data = datastream_as_csv(options[:version] || "plain")
|
35
35
|
end
|
@@ -131,13 +131,13 @@ def datastream_as_json(version)
|
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
134
|
-
def datastream_as_xml(version, except_node = nil)
|
134
|
+
def datastream_as_xml(version, except_node = nil, omit_version = true)
|
135
135
|
case version
|
136
136
|
when "0.5.1"
|
137
137
|
if except_node == :tag
|
138
138
|
xml = <<XML
|
139
139
|
<?xml version="1.0" encoding="UTF-8"?>
|
140
|
-
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
140
|
+
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="0.5.1"'} xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
141
141
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://appdev.loc:3000/users/occaecati">
|
142
142
|
<data id="0">
|
143
143
|
<current_value at="2011-02-16T16:21:01.834174Z">14</current_value>
|
@@ -151,7 +151,7 @@ XML
|
|
151
151
|
elsif except_node == :unit
|
152
152
|
xml = <<XML
|
153
153
|
<?xml version="1.0" encoding="UTF-8"?>
|
154
|
-
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
154
|
+
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="0.5.1"'} xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
155
155
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://appdev.loc:3000/users/occaecati">
|
156
156
|
<data id="0">
|
157
157
|
<tag>freakin lasers</tag>
|
@@ -167,7 +167,7 @@ XML
|
|
167
167
|
elsif except_node == :unit_attributes
|
168
168
|
xml = <<XML
|
169
169
|
<?xml version="1.0" encoding="UTF-8"?>
|
170
|
-
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
170
|
+
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="0.5.1"'} xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
171
171
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://appdev.loc:3000/users/occaecati">
|
172
172
|
<data id="0">
|
173
173
|
<tag>freakin lasers</tag>
|
@@ -184,7 +184,7 @@ XML
|
|
184
184
|
elsif except_node == :timestamps
|
185
185
|
xml = <<XML
|
186
186
|
<?xml version="1.0" encoding="UTF-8"?>
|
187
|
-
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
187
|
+
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="0.5.1"'} xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
188
188
|
<environment id="504" creator="http://appdev.loc:3000/users/occaecati">
|
189
189
|
<data id="0">
|
190
190
|
<tag>freakin lasers</tag>
|
@@ -201,7 +201,7 @@ XML
|
|
201
201
|
else
|
202
202
|
xml = <<XML
|
203
203
|
<?xml version="1.0" encoding="UTF-8"?>
|
204
|
-
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
204
|
+
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="0.5.1"'} xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
205
205
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://appdev.loc:3000/users/occaecati">
|
206
206
|
<data id="0">
|
207
207
|
<tag>freakin lasers</tag>
|
@@ -225,7 +225,7 @@ XML
|
|
225
225
|
if except_node == :tag
|
226
226
|
xml = <<XML
|
227
227
|
<?xml version="1.0" encoding="UTF-8"?>
|
228
|
-
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
228
|
+
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="5"'} xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
229
229
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://appdev.loc:3000/users/occaecati">
|
230
230
|
<data id="0">
|
231
231
|
<value maxValue="658.0" minValue="658">14</value>
|
@@ -251,7 +251,7 @@ XML
|
|
251
251
|
elsif except_node == :unit_attributes
|
252
252
|
xml = <<XML
|
253
253
|
<?xml version="1.0" encoding="UTF-8"?>
|
254
|
-
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
254
|
+
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="5"'} xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
255
255
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://appdev.loc:3000/users/occaecati">
|
256
256
|
<data id="0">
|
257
257
|
<tag>freakin lasers</tag>
|
@@ -281,7 +281,7 @@ XML
|
|
281
281
|
elsif except_node == :timestamps
|
282
282
|
xml = <<XML
|
283
283
|
<?xml version="1.0" encoding="UTF-8"?>
|
284
|
-
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
284
|
+
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="5"'} xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
285
285
|
<environment id="504" creator="http://appdev.loc:3000/users/occaecati">
|
286
286
|
<data id="0">
|
287
287
|
<tag>freakin lasers</tag>
|
@@ -296,7 +296,7 @@ XML
|
|
296
296
|
else
|
297
297
|
xml = <<XML
|
298
298
|
<?xml version="1.0" encoding="UTF-8"?>
|
299
|
-
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
299
|
+
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="5"'} xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
300
300
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://appdev.loc:3000/users/occaecati">
|
301
301
|
<data id="0">
|
302
302
|
<tag>freakin lasers</tag>
|
data/spec/support/feed_helper.rb
CHANGED
@@ -112,7 +112,7 @@ def feed_as_(format, options = {})
|
|
112
112
|
when 'json'
|
113
113
|
data = feed_as_json(options[:version] || "1.0.0")
|
114
114
|
when 'xml'
|
115
|
-
data = feed_as_xml(options[:version] || "0.5.1", options[:except_node])
|
115
|
+
data = feed_as_xml(options[:version] || "0.5.1", options[:except_node], options[:omit_version])
|
116
116
|
when 'csv'
|
117
117
|
data = feed_as_csv(options[:version] || "v2")
|
118
118
|
end
|
@@ -376,14 +376,14 @@ def feed_as_json(version)
|
|
376
376
|
end
|
377
377
|
end
|
378
378
|
|
379
|
-
def feed_as_xml(version, except_node = nil)
|
379
|
+
def feed_as_xml(version, except_node = nil, omit_version = false)
|
380
380
|
|
381
381
|
case version
|
382
382
|
when "0.5.1"
|
383
383
|
if except_node == :location
|
384
384
|
xml = <<XML
|
385
385
|
<?xml version="1.0" encoding="UTF-8"?>
|
386
|
-
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
386
|
+
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="0.5.1"'} xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
387
387
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://test.host/users/fred">
|
388
388
|
<title>Cosm Office environment</title>
|
389
389
|
<feed>http://test.host/v2/feeds/2357.xml</feed>
|
@@ -432,7 +432,7 @@ XML
|
|
432
432
|
elsif except_node == :unit
|
433
433
|
xml = <<XML
|
434
434
|
<?xml version="1.0" encoding="UTF-8"?>
|
435
|
-
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
435
|
+
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="0.5.1"'} xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
436
436
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://test.host/users/fred">
|
437
437
|
<title>Cosm Office environment</title>
|
438
438
|
<feed>http://test.host/v2/feeds/2357.xml</feed>
|
@@ -480,7 +480,7 @@ XML
|
|
480
480
|
elsif except_node == :tag
|
481
481
|
xml = <<XML
|
482
482
|
<?xml version="1.0" encoding="UTF-8"?>
|
483
|
-
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
483
|
+
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="0.5.1"'} xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
484
484
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://test.host/users/fred">
|
485
485
|
<title>Cosm Office environment</title>
|
486
486
|
<feed>http://test.host/v2/feeds/2357.xml</feed>
|
@@ -525,7 +525,7 @@ XML
|
|
525
525
|
else
|
526
526
|
xml = <<XML
|
527
527
|
<?xml version="1.0" encoding="UTF-8"?>
|
528
|
-
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
528
|
+
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="0.5.1"'} xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
|
529
529
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://test.host/users/fred">
|
530
530
|
<title>Cosm Office environment</title>
|
531
531
|
<feed>http://test.host/v2/feeds/2357.xml</feed>
|
@@ -578,7 +578,7 @@ XML
|
|
578
578
|
if except_node == :location
|
579
579
|
xml = <<XML
|
580
580
|
<?xml version="1.0" encoding="UTF-8"?>
|
581
|
-
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
581
|
+
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="5"'} xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
582
582
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://test.host/users/fred">
|
583
583
|
<title>Cosm Office environment</title>
|
584
584
|
<feed>http://test.host/v2/feeds/2357.xml</feed>
|
@@ -607,7 +607,7 @@ XML
|
|
607
607
|
elsif except_node == :unit
|
608
608
|
xml = <<XML
|
609
609
|
<?xml version="1.0" encoding="UTF-8"?>
|
610
|
-
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
610
|
+
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="5"'} xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
611
611
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://test.host/users/fred">
|
612
612
|
<title>Cosm Office environment</title>
|
613
613
|
<feed>http://test.host/v2/feeds/2357.xml</feed>
|
@@ -639,7 +639,7 @@ XML
|
|
639
639
|
elsif except_node == :unit_attributes
|
640
640
|
xml = <<XML
|
641
641
|
<?xml version="1.0" encoding="UTF-8"?>
|
642
|
-
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
642
|
+
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="5"'} xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
643
643
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://test.host/users/fred">
|
644
644
|
<title>Cosm Office environment</title>
|
645
645
|
<feed>http://test.host/v2/feeds/2357.xml</feed>
|
@@ -674,7 +674,7 @@ XML
|
|
674
674
|
elsif except_node == :value_attributes
|
675
675
|
xml = <<XML
|
676
676
|
<?xml version="1.0" encoding="UTF-8"?>
|
677
|
-
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
677
|
+
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="5"'} xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
678
678
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://test.host/users/fred">
|
679
679
|
<title>Cosm Office environment</title>
|
680
680
|
<feed>http://test.host/v2/feeds/2357.xml</feed>
|
@@ -709,7 +709,7 @@ XML
|
|
709
709
|
elsif except_node == :tag
|
710
710
|
xml = <<XML
|
711
711
|
<?xml version="1.0" encoding="UTF-8"?>
|
712
|
-
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
712
|
+
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="5"'} xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
713
713
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://test.host/users/fred">
|
714
714
|
<title>Cosm Office environment</title>
|
715
715
|
<feed>http://test.host/v2/feeds/2357.xml</feed>
|
@@ -741,7 +741,7 @@ XML
|
|
741
741
|
else
|
742
742
|
xml = <<XML
|
743
743
|
<?xml version="1.0" encoding="UTF-8"?>
|
744
|
-
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
744
|
+
<eeml xmlns="http://www.eeml.org/xsd/005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" #{omit_version ? '' : 'version="5"'} xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd">
|
745
745
|
<environment updated="2011-02-16T16:21:01.834174Z" id="504" creator="http://test.host/users/fred">
|
746
746
|
<title>Cosm Office environment</title>
|
747
747
|
<feed>http://test.host/v2/feeds/2357.xml</feed>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cosm-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 10
|
10
|
+
version: 0.0.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Paul Bellamy
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2012-08-
|
20
|
+
date: 2012-08-07 00:00:00 +00:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|