rixml 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/Gemfile.lock +3 -1
- data/lib/rixml.rb +9 -7
- data/rixml.gemspec +3 -2
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fab589e31372623e5526eb41754db09abb35da0
|
4
|
+
data.tar.gz: 175d32461bab5796ce2f57a3033a94efdaf6a923
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e9412870a57c0d5ecc3faea33efe0f927672239cfca4083432655452dbc4acc641408d5404d31f0f15ef13344d3f8346c7b56f667f8e6509afe68509458a6f
|
7
|
+
data.tar.gz: 8036e218d6571e3857c11d9a4d56150f6b6ce565568b9715447ad253803639fe0438d16054593bd8f590daa09c3eb05c0f6712ea933402cf229689d404f994df
|
data/.gitignore
ADDED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rixml (0.1.
|
4
|
+
rixml (0.1.3)
|
5
5
|
activesupport (>= 4.0.0)
|
6
6
|
nokogiri (~> 1.5)
|
7
7
|
|
@@ -14,6 +14,7 @@ GEM
|
|
14
14
|
minitest (~> 5.1)
|
15
15
|
tzinfo (~> 1.1)
|
16
16
|
ast (2.3.0)
|
17
|
+
byebug (9.0.6)
|
17
18
|
concurrent-ruby (1.0.2)
|
18
19
|
i18n (0.7.0)
|
19
20
|
mini_portile2 (2.1.0)
|
@@ -42,6 +43,7 @@ PLATFORMS
|
|
42
43
|
|
43
44
|
DEPENDENCIES
|
44
45
|
bundler (~> 1.12)
|
46
|
+
byebug
|
45
47
|
minitest (~> 5.1)
|
46
48
|
rake (~> 11.3)
|
47
49
|
rixml!
|
data/lib/rixml.rb
CHANGED
@@ -6,17 +6,15 @@ require 'active_support/inflector/inflections'
|
|
6
6
|
|
7
7
|
class RIXML
|
8
8
|
class << self
|
9
|
-
def parse(data)
|
10
|
-
RIXML.new(Nokogiri::XML(data).root)
|
11
|
-
end
|
12
|
-
|
13
9
|
def parse_from_file(filename)
|
14
|
-
|
10
|
+
RIXML.new(File.read(filename))
|
15
11
|
end
|
16
12
|
end
|
17
13
|
|
18
|
-
def initialize(
|
19
|
-
@
|
14
|
+
def initialize(data)
|
15
|
+
@document = Nokogiri::XML(data)
|
16
|
+
@attrs = Hash.from_xml(@document.root.to_s)
|
17
|
+
@document.remove_namespaces!
|
20
18
|
end
|
21
19
|
|
22
20
|
def product_id
|
@@ -63,6 +61,10 @@ class RIXML
|
|
63
61
|
}
|
64
62
|
end
|
65
63
|
|
64
|
+
def xpath(path)
|
65
|
+
@document.xpath(path)
|
66
|
+
end
|
67
|
+
|
66
68
|
private
|
67
69
|
|
68
70
|
def parse_info_from_author(author)
|
data/rixml.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'rixml'
|
4
|
-
s.version = '0.1.
|
5
|
-
s.date = '2016-12-
|
4
|
+
s.version = '0.1.3'
|
5
|
+
s.date = '2016-12-07'
|
6
6
|
s.summary = 'RIXML Parser'
|
7
7
|
s.description = 'Parse RIXML files'
|
8
8
|
s.homepage = 'https://github.com/AlphaExchange/rixml'
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_development_dependency 'minitest', '~> 5.1'
|
19
19
|
s.add_development_dependency 'rake', '~> 11.3'
|
20
20
|
s.add_development_dependency 'rubocop', '~> 0.45.0'
|
21
|
+
s.add_development_dependency 'byebug'
|
21
22
|
|
22
23
|
s.add_runtime_dependency 'nokogiri', '~> 1.5'
|
23
24
|
s.add_runtime_dependency 'activesupport', '>= 4.0.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rixml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Correia Santos
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-12-
|
12
|
+
date: 2016-12-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -67,6 +67,20 @@ dependencies:
|
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: 0.45.0
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: byebug
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
70
84
|
- !ruby/object:Gem::Dependency
|
71
85
|
name: nokogiri
|
72
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,6 +117,7 @@ executables: []
|
|
103
117
|
extensions: []
|
104
118
|
extra_rdoc_files: []
|
105
119
|
files:
|
120
|
+
- ".gitignore"
|
106
121
|
- ".rubocop.yml"
|
107
122
|
- ".travis.yml"
|
108
123
|
- Gemfile
|