saxy 0.2.2 → 0.2.3
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.
- checksums.yaml +4 -4
- data/.travis.yml +8 -2
- data/README.md +1 -1
- data/gemfiles/gemfile-1.8 +6 -0
- data/lib/saxy/element.rb +1 -0
- data/lib/saxy/version.rb +1 -1
- data/spec/saxy/element_spec.rb +9 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 923e7d1c218d9e304ee18fb87f6f2a1a9d06d384
|
4
|
+
data.tar.gz: 79b769b7699aee8503635fdfdc10b09afb9665a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edc331020d4c82df9b1d84656699b1060a6a9ee2324032a4a792208b1a991dadfc23c1668db1f2719c30afe967dd2f57f06bf2eafc61e410808a62bcbef44f8d
|
7
|
+
data.tar.gz: e140b6138c76e6fa602f4ce4a5a284b0b0213235057ea78da5202871bd85fce1e0df0441010eea5b1aee915c188b8520885a66fa9aa518c595e65a5d61ee502d
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -50,7 +50,7 @@ Tag attributes become object attributes and attributes' name are underscored.
|
|
50
50
|
|
51
51
|
Saxy.parse("filename.xml", "product").each do |product|
|
52
52
|
puts product.name
|
53
|
-
puts product.images.thumb_size
|
53
|
+
puts product.images.thumb_size.contents
|
54
54
|
puts "#{product.images.thumb_size.width}x#{product.images.thumb_size.height}"
|
55
55
|
end
|
56
56
|
|
data/lib/saxy/element.rb
CHANGED
data/lib/saxy/version.rb
CHANGED
data/spec/saxy/element_spec.rb
CHANGED
@@ -27,6 +27,15 @@ describe Saxy::Element do
|
|
27
27
|
object.bar.should == 2
|
28
28
|
end
|
29
29
|
|
30
|
+
it "should dump as object with value when attributes and contents are set" do
|
31
|
+
element.set_attribute("foo", "bar")
|
32
|
+
element.append_value("value")
|
33
|
+
object = element.as_object
|
34
|
+
|
35
|
+
object.foo.should == "bar"
|
36
|
+
object.contents.should == "value"
|
37
|
+
end
|
38
|
+
|
30
39
|
it "should add attributes under underscored names" do
|
31
40
|
element.set_attribute("FooBar", "baz")
|
32
41
|
element.as_object.foo_bar.should == "baz"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michał Szajbe
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- LICENSE
|
70
70
|
- README.md
|
71
71
|
- Rakefile
|
72
|
+
- gemfiles/gemfile-1.8
|
72
73
|
- lib/saxy.rb
|
73
74
|
- lib/saxy/element.rb
|
74
75
|
- lib/saxy/ostruct.rb
|