xml_data_extractor 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +2 -0
- data/lib/src/extract/string_value.rb +1 -1
- data/lib/xml_data_extractor.rb +2 -2
- data/xml_data_extractor.gemspec +4 -4
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21ef4204276c596f08edff5fb07c1d0051689b53ea3bf4fcf41de37f628cb252
|
4
|
+
data.tar.gz: a87768a08c45efc330ce3bc923362dca785dbdafed724901dff93dfdfa5e6a53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 289c619761c851ed228bbefb81613a14d42e789d725bf4d95cb0f1c71ad621e09b36457ced6f85ec4296c84798da3e9f23ea066a64bc7bb4ebc32fe32fcb26dc
|
7
|
+
data.tar.gz: b2993f4ddc34601ab776d37223c2047870167bae34a5621ef6c06255a21019a5a9a4c0a5c376b32ff28480eddb1412bd5d8e4c761c43bfd2ddca74a2e54bf0c4
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
xml_data_extractor (0.
|
5
|
-
activesupport
|
6
|
-
nokogiri
|
4
|
+
xml_data_extractor (0.2.0)
|
5
|
+
activesupport (~> 6.0)
|
6
|
+
nokogiri (~> 1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (6.0.3.
|
11
|
+
activesupport (6.0.3.3)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (>= 0.7, < 2)
|
14
14
|
minitest (~> 5.1)
|
@@ -19,7 +19,7 @@ GEM
|
|
19
19
|
i18n (1.8.5)
|
20
20
|
concurrent-ruby (~> 1.0)
|
21
21
|
mini_portile2 (2.4.0)
|
22
|
-
minitest (5.14.
|
22
|
+
minitest (5.14.2)
|
23
23
|
nokogiri (1.10.10)
|
24
24
|
mini_portile2 (~> 2.4.0)
|
25
25
|
rake (12.3.3)
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ module Extract
|
|
22
22
|
|
23
23
|
paths.map do |inner|
|
24
24
|
if inner.is_a?(String)
|
25
|
-
extract_value(Node.new({ path: inner }, node_path))
|
25
|
+
extract_value(Node.new({ path: inner, link: node[:props][:link] }, node_path))
|
26
26
|
else
|
27
27
|
StringValue.new(Node.new(inner, node_path), extractor).value
|
28
28
|
end
|
data/lib/xml_data_extractor.rb
CHANGED
@@ -5,7 +5,7 @@ require_relative "src/extract/value_builder"
|
|
5
5
|
|
6
6
|
class XmlDataExtractor
|
7
7
|
def initialize(config, modifiers = nil)
|
8
|
-
@config = config
|
8
|
+
@config = config
|
9
9
|
@modifiers = modifiers
|
10
10
|
end
|
11
11
|
|
@@ -18,7 +18,7 @@ class XmlDataExtractor
|
|
18
18
|
value = Extract::ValueBuilder.new(Node.new(val), extractor).value
|
19
19
|
hash[key] = value if value.present?
|
20
20
|
end
|
21
|
-
end
|
21
|
+
end
|
22
22
|
end
|
23
23
|
|
24
24
|
private
|
data/xml_data_extractor.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "xml_data_extractor"
|
3
|
-
spec.version = "0.
|
3
|
+
spec.version = "0.2.0"
|
4
4
|
spec.authors = ["Fernando Almeida"]
|
5
5
|
spec.email = ["fernandoprsbr@gmail.com"]
|
6
6
|
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.add_dependency "nokogiri"
|
26
|
-
spec.add_dependency "activesupport"
|
27
|
-
spec.add_development_dependency "rspec"
|
25
|
+
spec.add_dependency "nokogiri", "~> 1.0"
|
26
|
+
spec.add_dependency "activesupport", "~> 6.0"
|
27
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
28
28
|
end
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xml_data_extractor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Almeida
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '6.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '6.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '3.0'
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- fernandoprsbr@gmail.com
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
|
-
rubygems_version: 3.
|
109
|
+
rubygems_version: 3.1.4
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Provides a simples DSL for extracting data from XML documents
|