xml_dsl 0.3.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8039a8956aa2ed81f448ceb371bf92523f9f1a3c
4
+ data.tar.gz: 5d8486f335d6a3fc412ce09ebe312a6738b187fe
5
+ SHA512:
6
+ metadata.gz: f24e74b53fb2e66b325c032c749ff1795a6268fbc79f1ad2cb9a0c0c392266d774027ab0cb6d5a4b86951813b52d3f6cc8ea87720b57714dd29f4cf7787178e0
7
+ data.tar.gz: 3981133746da9191c4b25555f65915257a3204772204a1289efb52e77e10e2f96d075b1e264a3d1721ced396bae67cd0c754e9c64fd041a97872e99fbdf69dc3
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2014 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,111 @@
1
+ # Xml Dsl
2
+
3
+ Xml Dsl adds DSL for defining easy parsers (or mappers) for XML via nokogiri XML objects.
4
+
5
+ ## Install
6
+
7
+ Add `xml_dsl` gem to `Gemfile`:
8
+ ```
9
+ gem 'xml_dsl', '~> 0.1.1'
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ Let's pretend we have an XML output of a following structure
15
+ ```
16
+ <root>
17
+ <offer>
18
+ <id>703134</id>
19
+ <distance>10</distance>
20
+ <house>38a</house>
21
+ <rooms>
22
+ <room>1</room>
23
+ </rooms>
24
+ <prices>
25
+ <price>2200000</price>
26
+ </prices>
27
+ <currency>RUR</currency>
28
+ <floor>7</floor>
29
+ <nfloor>17</nfloor>
30
+ <areas>
31
+ <area type="total">37</area>
32
+ <area type="live">0</area>
33
+ <area type="kitchen">10</area>
34
+ </areas>
35
+ </offer>
36
+ <offer>
37
+ <id>703102</id>
38
+ <distance>25</distance>
39
+ <house>7</house>
40
+ <rooms>
41
+ <room>1</room>
42
+ </rooms>
43
+ <prices>
44
+ <price>2650000</price>
45
+ </prices>
46
+ <currency>RUR</currency>
47
+ <floor>1</floor>
48
+ <nfloor>5</nfloor>
49
+ <areas>
50
+ <area type="total">30</area>
51
+ <area type="live">17</area>
52
+ <area type="kitchen">7</area>
53
+ </areas>
54
+ <magick>woodoo</magick>
55
+ </offer>
56
+ </root>
57
+ ```
58
+
59
+ Then we can define our mapper as following
60
+ ```
61
+ class Parser
62
+ attr_accessor :xml, :external
63
+ def initialize(xml, external)
64
+ # Normal iteration goes from xml instance_variable
65
+ self.xml = xml
66
+ self.external = external
67
+ end
68
+
69
+ # Here we definig parser, which will put attributes to Hash, and look for <offer> nodes inside <root>
70
+ # any length of root path can be provided
71
+ define_xml_parser Hash, :root, :offer do
72
+
73
+ # We can define a block to call every time an XmlDsl::ParseError os raised
74
+ # it is raised if null: true is passed to field declaration, or manually via raise XmlDsl::ParseError
75
+ error_handle do |e, node|
76
+ external.notify node
77
+ end
78
+
79
+ # Field declaration
80
+ field :id, :id, matcher: :to_i
81
+
82
+ # We can pass getter to call on Nokogiri::Xml::Element (default :text) and matcher (default :to_s)
83
+ field :minutes, :distance, matcher: :to_i
84
+
85
+ # If null: true (default false) is passed then if field is empty - it will raise XmlDsl::ParseError
86
+ # and then triggers error_handle blocks
87
+ field :magick, :magick, null: true
88
+
89
+ # We can pass long xpath to find proper node inside our XML
90
+ # like this:
91
+ field :amount, [:prices, :price], matcher: :to_i
92
+ # or even like this:
93
+ field :total_area, [:areas, 'area[type=total]'], matcher: :to_i
94
+
95
+ # If our logic is more complex we can define it inside block
96
+ field :full_area, null: true do |instance, node|
97
+ if !instance[:area]
98
+ node.search('areas').reduce(0) { |acc,n| acc + n.text.to_i }
99
+ else
100
+ 0
101
+ end
102
+ end
103
+ end
104
+ end
105
+ ```
106
+
107
+ ## Contributing
108
+
109
+ Feel free to request for some features or fork - implement - pul request.
110
+
111
+
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+ Bundler::GemHelper.install_tasks
7
+ Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rake')].each {|f| load f }
8
+ require 'rspec/core'
9
+ require 'rspec/core/rake_task'
10
+
11
+ desc "Run all specs in spec directory (excluding plugin specs)"
12
+ RSpec::Core::RakeTask.new
13
+
14
+ task :default => :spec
@@ -0,0 +1,43 @@
1
+ module XmlDsl
2
+ class BlockMethod
3
+ attr_reader :method, :args, :block
4
+ def initialize(method, *args, &block)
5
+ @method = method
6
+ @args = args
7
+ @block = block if block_given?
8
+ end
9
+
10
+ def call(instance, node, parser)
11
+ if block
12
+ self.send method, *[instance, node, parser] + args, &block
13
+ else
14
+ self.send method, *[instance, node, parser] + args
15
+ end
16
+ end
17
+
18
+ def field(instance, node, parser, target, source = nil, getter: :text, matcher: :to_s, null: false, &block)
19
+ raise ArgumentError, 'Wrong target' unless target.is_a? Symbol
20
+ if block_given?
21
+ instance[target] = parser.instance_exec instance, node, &block
22
+ else
23
+ raise ArgumentError, 'No source specified' if source.nil?
24
+ source = case [source.class]
25
+ when [Symbol]
26
+ source.to_s
27
+ when [Array]
28
+ source.join('/')
29
+ else
30
+ source.to_s
31
+ end
32
+ instance[target] = node.search(source).send(getter).send(matcher)
33
+ end
34
+ if null
35
+ raise XmlDsl::ParseError, "#{target} is empty. Node: #{node}" if instance[target].nil? || instance[target] == ""
36
+ end
37
+ end
38
+
39
+ def error_handle(exception, node, parser, &block)
40
+ parser.instance_exec exception, node, &block
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,4 @@
1
+ require 'xml_dsl/macro_methods'
2
+ Class.class_eval do
3
+ include XmlDsl::MacroMethods
4
+ end
@@ -0,0 +1,6 @@
1
+ module XmlDsl
2
+ class Error < StandardError
3
+ end
4
+ class ParseError < StandardError
5
+ end
6
+ end
@@ -0,0 +1,42 @@
1
+ module XmlDsl
2
+ module Extensions
3
+ def self.included(base)
4
+ base.send :include, InstanceMethods
5
+ base.send :extend, ClassMethods
6
+ base.class_eval do
7
+ attr_reader :_xml_parse_callbacks, :_xml_root_path, :_xml_target_class
8
+
9
+ alias_method :original_initialize, :initialize
10
+ def initialize(*args, &block)
11
+ self.class.instance_variable_get(:@xml_parser).setup_parser_instance(self)
12
+ original_initialize(*args, &block)
13
+ end
14
+ end
15
+ end
16
+
17
+ module ClassMethods
18
+ end
19
+
20
+ module InstanceMethods
21
+ def iterate(xml_obj = nil, acc: nil, &block)
22
+ xml_obj ||= xml
23
+ raise ArgumentError, "If there is no @xml in parser, pass it to iterate" if xml_obj.nil?
24
+ xml_obj.search(_xml_root_path).each do |node|
25
+ begin
26
+ instance = _xml_target_class.new
27
+ _xml_parse_callbacks[:readers].each do |bm|
28
+ bm.call instance, node, self
29
+ end
30
+ yield instance if block_given?
31
+ acc << instance if acc
32
+ rescue XmlDsl::ParseError => e
33
+ _xml_parse_callbacks[:error_handlers].each do |bm|
34
+ bm.call e, node, self
35
+ end
36
+ end
37
+ end
38
+ acc
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,9 @@
1
+ require 'xml_dsl/xml_parser'
2
+
3
+ module XmlDsl
4
+ module MacroMethods
5
+ def define_xml_parser(*args, &block)
6
+ XmlDsl::XmlParser.create(self, *args, &block)
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module XmlDsl
2
+ VERSION = "0.3.1"
3
+ end
@@ -0,0 +1,51 @@
1
+ require 'xml_dsl/block_method'
2
+ require 'xml_dsl/extensions'
3
+ require 'xml_dsl/errors'
4
+
5
+ module XmlDsl
6
+ class XmlParser
7
+ class << self
8
+ def create(owner, *args, &block)
9
+ new(owner, *args, &block)
10
+ end
11
+ end
12
+
13
+ attr_reader :owner, :target_class, :state_lock, :callbacks
14
+
15
+ def initialize(owner, target_class, *args, &block)
16
+ raise XmlDsl::Error, 'No block given for parser' unless block_given?
17
+ @target_class = target_class
18
+ @root_path = args
19
+ @state_lock = Mutex.new
20
+ self.owner = owner
21
+ @callbacks = Hash.new { |h,k| h[k] = [] }
22
+ self.instance_eval &block
23
+ end
24
+
25
+ def owner=(klazz)
26
+ @owner = klazz
27
+ @owner.send :include, XmlDsl::Extensions
28
+ @owner.instance_variable_set :@xml_parser, self
29
+ end
30
+
31
+ def field(*args, &block)
32
+ callbacks[:readers] << XmlDsl::BlockMethod.new(:field, *args, &block)
33
+ end
34
+
35
+ def error_handle(*args, &block)
36
+ callbacks[:error_handlers] << XmlDsl::BlockMethod.new(:error_handle, *args, &block)
37
+ end
38
+
39
+ def setup_parser_instance(instance)
40
+ state_lock.synchronize do
41
+ instance.instance_variable_set :@_xml_root_path, root_path
42
+ instance.instance_variable_set :@_xml_parse_callbacks, callbacks.dup
43
+ instance.instance_variable_set :@_xml_target_class, target_class
44
+ end
45
+ end
46
+
47
+ def root_path
48
+ @root_path.join('/').prepend('//')
49
+ end
50
+ end
51
+ end
data/lib/xml_dsl.rb ADDED
@@ -0,0 +1,3 @@
1
+ require 'xml_dsl/core'
2
+ module XmlDsl
3
+ end
@@ -0,0 +1,41 @@
1
+ <root>
2
+ <offer>
3
+ <id>703134</id>
4
+ <distance>10</distance>
5
+ <house>38a</house>
6
+ <rooms>
7
+ <room>1</room>
8
+ </rooms>
9
+ <prices>
10
+ <price>2200000</price>
11
+ </prices>
12
+ <currency>RUR</currency>
13
+ <floor>7</floor>
14
+ <nfloor>17</nfloor>
15
+ <areas>
16
+ <area type="total">37</area>
17
+ <area type="live">0</area>
18
+ <area type="kitchen">10</area>
19
+ </areas>
20
+ </offer>
21
+ <offer>
22
+ <id>703102</id>
23
+ <distance>25</distance>
24
+ <house>7</house>
25
+ <rooms>
26
+ <room>1</room>
27
+ </rooms>
28
+ <prices>
29
+ <price>2650000</price>
30
+ </prices>
31
+ <currency>RUR</currency>
32
+ <floor>1</floor>
33
+ <nfloor>5</nfloor>
34
+ <areas>
35
+ <area type="total">30</area>
36
+ <area type="live">17</area>
37
+ <area type="kitchen">7</area>
38
+ </areas>
39
+ <magick>woodoo</magick>
40
+ </offer>
41
+ </root>
@@ -0,0 +1,105 @@
1
+ require 'spec_helper'
2
+ require 'support/xml'
3
+
4
+ describe 'Example Xml Mapper Spec' do
5
+ context 'normal parser' do
6
+ before(:each) do
7
+ clazz = Class.new
8
+ clazz.class_eval do
9
+ attr_accessor :xml
10
+ def initialize(xml)
11
+ self.xml = xml
12
+ end
13
+
14
+ define_xml_parser Hash, :root, :offer do
15
+ field :id, :id, matcher: :to_i
16
+ field :minutes, :distance, matcher: :to_i
17
+ field :amount, [:prices, :price], matcher: :to_i
18
+ field :currency, :currency
19
+ field :total_area, [:areas, 'area[type=total]'], matcher: :to_i
20
+ field :full_area, null: true do |_, node|
21
+ node.search('areas').reduce(0) { |acc,n| acc + n.text.to_i }
22
+ end
23
+ field :magick, :magick
24
+ end
25
+ end
26
+ @parser = clazz.new some_xml
27
+ end
28
+
29
+ it 'responds to iterate' do
30
+ expect(@parser).to respond_to(:iterate)
31
+ end
32
+
33
+ it 'puts one Hash obj to acc' do
34
+ expect(@parser.iterate(acc: []).first).to be_instance_of(Hash)
35
+ end
36
+
37
+ it 'iterates over nodes and call block twice in outer context' do
38
+ some_obj = double
39
+ expect(some_obj).to receive(:notify).twice
40
+ @parser.iterate do |item|
41
+ some_obj.notify item
42
+ end
43
+ end
44
+
45
+ context 'Parser results' do
46
+ let(:result) { @parser.iterate(acc: []).first }
47
+
48
+ it 'has amount of kind Numeric' do
49
+ expect(result[:amount]).to be_instance_of(Fixnum)
50
+ end
51
+
52
+ it 'has id of kind Fixnum' do
53
+ expect(result[:id]).to be_instance_of(Fixnum)
54
+ end
55
+
56
+ it 'has currency of kind String' do
57
+ expect(result[:currency]).to be_instance_of(String)
58
+ end
59
+
60
+ it 'has full area of kind Fixnum' do
61
+ expect(result[:full_area]).to be_instance_of(Fixnum)
62
+ end
63
+
64
+ it 'has total area equal 37' do
65
+ expect(result[:total_area]).to eql(37)
66
+ end
67
+
68
+ it 'has empty magick' do
69
+ expect(result[:magick]).to be_empty
70
+ end
71
+ end
72
+ end
73
+
74
+ context 'parser for different errors' do
75
+ before(:each) do
76
+ clazz = Class.new
77
+ @external_obj = double
78
+ clazz.class_eval do
79
+ attr_accessor :xml, :external
80
+ def initialize(xml, external)
81
+ self.xml = xml
82
+ self.external = external
83
+ end
84
+
85
+ define_xml_parser Hash, :root, :offer do
86
+
87
+ error_handle do |e, node|
88
+ external.notify node
89
+ end
90
+
91
+ field :id, :id, matcher: :to_i
92
+ field :minutes, :distance, matcher: :to_i
93
+ field :magick, :magick, null: true
94
+ end
95
+ end
96
+ @parser = clazz.new some_xml, @external_obj
97
+ end
98
+
99
+ it 'calls error_handler on parse error if null: true' do
100
+ expect(@external_obj).to receive(:notify).with(kind_of(Nokogiri::XML::Element)).once
101
+ @parser.iterate
102
+ end
103
+
104
+ end
105
+ end
@@ -0,0 +1,11 @@
1
+ require 'bundler/setup'
2
+ require 'nokogiri'
3
+ require 'pry'
4
+ Bundler.setup
5
+
6
+ require 'xml_dsl' # and any other gems you need
7
+
8
+ RSpec.configure do |config|
9
+ config.mock_with :rspec
10
+ config.order = "random"
11
+ end
@@ -0,0 +1,3 @@
1
+ def some_xml
2
+ Nokogiri::XML(open('spec/fixtures/some.xml') { |f| f.read })
3
+ end
@@ -0,0 +1,61 @@
1
+ require 'spec_helper'
2
+
3
+ describe XmlDsl do
4
+ context 'Within class' do
5
+ let(:clazz) { Class.new }
6
+
7
+ it 'added :define_xml_parser to class_methods' do
8
+ expect(clazz).to respond_to(:define_xml_parser)
9
+ end
10
+
11
+ it 'has no :define_xml_parser on instance' do
12
+ expect { clazz.new.instance_eval { define_xml_parser Hash, :root }}.to raise_error(NoMethodError)
13
+ end
14
+
15
+ it 'but no :iterate on instance before definition' do
16
+ expect { clazz.new.iterate }.to raise_error(NoMethodError)
17
+ end
18
+
19
+ context 'on instance after empty parser definition' do
20
+ before(:all) do
21
+ clazz.instance_eval do
22
+ define_xml_parser Hash, :root, :item do
23
+ end
24
+ end
25
+ @parser = clazz.new
26
+ end
27
+
28
+ it 'has no :iterate on class after defenition' do
29
+ expect { clazz.iterate }.to raise_error(NoMethodError)
30
+ end
31
+ it 'has :iterate method on instance' do
32
+ expect(@parser).to respond_to(:iterate)
33
+ end
34
+ it 'has xml_parser on class' do
35
+ expect(clazz.instance_variable_get(:@xml_parser)).to be_instance_of(XmlDsl::XmlParser)
36
+ end
37
+ it 'doesn\'t have xml_parser on instance' do
38
+ expect(@parser.instance_variable_get(:@xml_parser)).to be_nil
39
+ end
40
+ it 'have callbacks stack on instance' do
41
+ expect(@parser.instance_variable_get(:@_xml_parse_callbacks)).to be_instance_of(Hash)
42
+ end
43
+
44
+ context 'defining different callbacks' do
45
+ let(:xml_parser) { clazz.instance_variable_get(:@xml_parser) }
46
+
47
+ it 'defining field callback is put inside :readers' do
48
+ expect { in_definition { field :name, :ext_name } }.to change(xml_parser.callbacks[:readers], :length).by(1)
49
+ end
50
+
51
+ it 'defining error_handler is put inside error_handlers' do
52
+ expect { in_definition { error_handle } }.to change(xml_parser.callbacks[:error_handlers], :length).by(1)
53
+ end
54
+
55
+ def in_definition(&block)
56
+ xml_parser.instance_eval &block
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
metadata ADDED
@@ -0,0 +1,163 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: xml_dsl
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.1
5
+ platform: ruby
6
+ authors:
7
+ - Vladislav Bogomolov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: nokogiri
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.4'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.4'
41
+ - !ruby/object:Gem::Dependency
42
+ name: guard
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.8'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.8'
55
+ - !ruby/object:Gem::Dependency
56
+ name: guard-rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '4.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '4.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.1'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry-remote
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.1'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.1'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry-nav
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.2'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.2'
111
+ description: DSL designed for easily create XML mappers
112
+ email:
113
+ - vladson4ik@gmail.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - MIT-LICENSE
119
+ - README.md
120
+ - Rakefile
121
+ - lib/xml_dsl.rb
122
+ - lib/xml_dsl/block_method.rb
123
+ - lib/xml_dsl/core.rb
124
+ - lib/xml_dsl/errors.rb
125
+ - lib/xml_dsl/extensions.rb
126
+ - lib/xml_dsl/macro_methods.rb
127
+ - lib/xml_dsl/version.rb
128
+ - lib/xml_dsl/xml_parser.rb
129
+ - spec/fixtures/some.xml
130
+ - spec/integrational/example_parser_spec.rb
131
+ - spec/spec_helper.rb
132
+ - spec/support/xml.rb
133
+ - spec/unit/xml_dsl_spec.rb
134
+ homepage: https://github.com/vladson/xml_dsl
135
+ licenses:
136
+ - MIT
137
+ metadata: {}
138
+ post_install_message:
139
+ rdoc_options: []
140
+ require_paths:
141
+ - lib
142
+ required_ruby_version: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ required_rubygems_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ requirements: []
153
+ rubyforge_project:
154
+ rubygems_version: 2.2.2
155
+ signing_key:
156
+ specification_version: 4
157
+ summary: Create easy xml mappers to hash via Nokogiri::XML
158
+ test_files:
159
+ - spec/fixtures/some.xml
160
+ - spec/integrational/example_parser_spec.rb
161
+ - spec/spec_helper.rb
162
+ - spec/support/xml.rb
163
+ - spec/unit/xml_dsl_spec.rb