xmlhasher 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,22 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+
4
+ require 'simplecov'
5
+ require 'coveralls'
6
+
7
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
8
+ SimpleCov::Formatter::HTMLFormatter,
9
+ Coveralls::SimpleCov::Formatter
10
+ ]
11
+ SimpleCov.start
12
+
13
+ require 'test/unit'
14
+ require 'xmlhasher'
15
+
16
+ def fixture_path
17
+ File.expand_path('../fixtures', __FILE__)
18
+ end
19
+
20
+ def fixture(file)
21
+ File.new(fixture_path + '/' + file)
22
+ end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ class XmlhasherTest < Test::Unit::TestCase
4
+
5
+ def test_configure
6
+ configurable = XmlHasher.configure do |config|
7
+ config.snakecase = true
8
+ config.ignore_namespaces = true
9
+ end
10
+ assert_equal true, configurable.instance_variable_get(:'@snakecase')
11
+ assert_equal true, configurable.instance_variable_get(:'@ignore_namespaces')
12
+ end
13
+ end
data/xmlhasher.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'xmlhasher/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'xmlhasher'
8
+ spec.version = XmlHasher::VERSION
9
+ spec.authors = ['Gene Drabkin']
10
+ spec.email = ['gene.drabkin@gmail.com']
11
+ spec.description = %q{XmlHasher converts XML to Ruby Hash}
12
+ spec.summary = %q{XmlHasher converts XML to Ruby Hash}
13
+ spec.homepage = 'https://github.com/cloocher/xmlhasher'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.required_ruby_version = '>= 1.8.7'
22
+ spec.required_rubygems_version = '>= 1.3.6'
23
+
24
+ spec.add_dependency 'ox', '>= 2.0'
25
+
26
+ spec.add_development_dependency 'rake'
27
+ spec.add_development_dependency 'bundler'
28
+ end
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: xmlhasher
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Gene Drabkin
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-04-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: ox
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '2.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '2.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: bundler
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: XmlHasher converts XML to Ruby Hash
63
+ email:
64
+ - gene.drabkin@gmail.com
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - .gitignore
70
+ - .travis.yml
71
+ - Gemfile
72
+ - LICENSE.txt
73
+ - README.md
74
+ - Rakefile
75
+ - lib/xmlhasher.rb
76
+ - lib/xmlhasher/configurable.rb
77
+ - lib/xmlhasher/handler.rb
78
+ - lib/xmlhasher/node.rb
79
+ - lib/xmlhasher/parser.rb
80
+ - lib/xmlhasher/util.rb
81
+ - lib/xmlhasher/version.rb
82
+ - test/fixures/institution.xml
83
+ - test/fixures/institutions.xml
84
+ - test/test_helper.rb
85
+ - test/xmlhasher/xmlhasher_test.rb
86
+ - xmlhasher.gemspec
87
+ homepage: https://github.com/cloocher/xmlhasher
88
+ licenses:
89
+ - MIT
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: 1.8.7
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: 1.3.6
106
+ requirements: []
107
+ rubyforge_project:
108
+ rubygems_version: 1.8.25
109
+ signing_key:
110
+ specification_version: 3
111
+ summary: XmlHasher converts XML to Ruby Hash
112
+ test_files:
113
+ - test/fixures/institution.xml
114
+ - test/fixures/institutions.xml
115
+ - test/test_helper.rb
116
+ - test/xmlhasher/xmlhasher_test.rb