saxy 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/saxy.rb +2 -2
- data/lib/saxy/version.rb +1 -1
- data/spec/saxy_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 071f31e0e4239d7aa2206cddd8d0bbab99982896
|
4
|
+
data.tar.gz: 9314c5c857ffa12cd30ba32f473a34c01bbfdaca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db0123c050ea39667f55e1e2569d5bdd8649a94a3650ec1d73f8c317b42d4c17270e40796a0c58a50fbbaf4be43468941d85473a7164390166db7ee4df96acf8
|
7
|
+
data.tar.gz: 5fb5c951cf06dff3b7b3385b8ac19a59887a91e8b70f790c4d8e698964551327328900508c7d8a1547bd27aabdcaca7304b2ec823c9d59afd408ba591f97eed4
|
data/CHANGELOG.md
CHANGED
data/lib/saxy.rb
CHANGED
@@ -2,8 +2,8 @@ require 'saxy/version'
|
|
2
2
|
|
3
3
|
module Saxy
|
4
4
|
class << self
|
5
|
-
def parse(object, object_tag, &blk)
|
6
|
-
parser = Parser.new(object, object_tag)
|
5
|
+
def parse(object, object_tag, options={}, &blk)
|
6
|
+
parser = Parser.new(object, object_tag, options)
|
7
7
|
|
8
8
|
if blk
|
9
9
|
parser.each(blk)
|
data/lib/saxy/version.rb
CHANGED
data/spec/saxy_spec.rb
CHANGED
@@ -34,4 +34,9 @@ describe Saxy do
|
|
34
34
|
it "should return Enumerator when calling #parse without a block" do
|
35
35
|
expect(Saxy.parse(fixture_file("webstore.xml"), "product").each).to be_an(Enumerator)
|
36
36
|
end
|
37
|
+
|
38
|
+
it "should pass options to Parser's initializer" do
|
39
|
+
expect(Saxy::Parser).to receive(:new).with("filename", "object_tag", { foo: 'bar' }).and_call_original
|
40
|
+
Saxy.parse("filename", "object_tag", { foo: 'bar' })
|
41
|
+
end
|
37
42
|
end
|