xml_data_extractor 0.4.0 → 0.5.0
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 +4 -4
- data/.github/dependabot.yml +25 -0
- data/.github/workflows/ci.yml +31 -0
- data/.kodiak.toml +14 -0
- data/.ruby-version +1 -0
- data/Gemfile +0 -3
- data/Gemfile.lock +28 -27
- data/bin/rspec +29 -0
- data/lib/src/extract/expression.rb +2 -3
- data/xml_data_extractor.gemspec +2 -1
- metadata +22 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8705267e58445a552f2821a726e431ca93259e0782be80f2d47c2bcf1603aad
|
|
4
|
+
data.tar.gz: bd59596a4a0d554b055920a09891efeecc8589532b7d02e9e7b4715c54294eee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 736fa4908c03918c71417b73e519fcfc658f65a1d7b4b2762ff00e73854e4f0a6f7495963ae68081403e52b50a26aae5dc9393dad66df9f366bd89c4e9af6ba9
|
|
7
|
+
data.tar.gz: 4ae406899d4538f2f92ec470502b1905a80bbda13273521a2b8d0d94207401cd9c0495ff20bc4c69351d2f4dc34aa21b4606504f716e019148734fe3d45f4f49
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: bundler
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: daily
|
|
7
|
+
time: "08:00"
|
|
8
|
+
timezone: America/Sao_Paulo
|
|
9
|
+
open-pull-requests-limit: 10
|
|
10
|
+
versioning-strategy: lockfile-only
|
|
11
|
+
labels:
|
|
12
|
+
- dependencies
|
|
13
|
+
- ruby
|
|
14
|
+
- automerge
|
|
15
|
+
- package-ecosystem: "github-actions"
|
|
16
|
+
directory: "/"
|
|
17
|
+
schedule:
|
|
18
|
+
interval: daily
|
|
19
|
+
time: "08:00"
|
|
20
|
+
timezone: America/Sao_Paulo
|
|
21
|
+
open-pull-requests-limit: 10
|
|
22
|
+
labels:
|
|
23
|
+
- dependencies
|
|
24
|
+
- github-actions
|
|
25
|
+
- automerge
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
qa:
|
|
7
|
+
timeout-minutes: 5
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- name: Checkout code
|
|
11
|
+
uses: actions/checkout@v2.3.4
|
|
12
|
+
|
|
13
|
+
- name: Freeze autogenerated files
|
|
14
|
+
run: |
|
|
15
|
+
chmod 0444 Gemfile.lock
|
|
16
|
+
|
|
17
|
+
- name: Setup Ruby
|
|
18
|
+
uses: ruby/setup-ruby@v1
|
|
19
|
+
|
|
20
|
+
- name: Cache Ruby Dependencies
|
|
21
|
+
uses: actions/cache@v2.1.4
|
|
22
|
+
with:
|
|
23
|
+
path: vendor/bundle
|
|
24
|
+
key: ${{ runner.os }}-gem-${{ hashFiles('.ruby-version') }}-${{ hashFiles('**/Gemfile.lock') }}
|
|
25
|
+
|
|
26
|
+
- name: Setup project
|
|
27
|
+
run: bin/setup
|
|
28
|
+
|
|
29
|
+
- name: Run tests
|
|
30
|
+
run: |
|
|
31
|
+
bin/rspec
|
data/.kodiak.toml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# https://github.com/chdsbd/kodiak
|
|
2
|
+
version = 1
|
|
3
|
+
|
|
4
|
+
[approve]
|
|
5
|
+
auto_approve_usernames = ["dependabot"]
|
|
6
|
+
|
|
7
|
+
[merge]
|
|
8
|
+
method = "squash"
|
|
9
|
+
delete_branch_on_merge = true
|
|
10
|
+
|
|
11
|
+
[merge.message]
|
|
12
|
+
title = "pull_request_title"
|
|
13
|
+
include_pr_number = true
|
|
14
|
+
body = "pull_request_body"
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.7.2
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -8,38 +8,39 @@ PATH
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activesupport (6.
|
|
11
|
+
activesupport (6.1.3)
|
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
13
|
-
i18n (>=
|
|
14
|
-
minitest (
|
|
15
|
-
tzinfo (~>
|
|
16
|
-
zeitwerk (~> 2.
|
|
17
|
-
concurrent-ruby (1.1.
|
|
18
|
-
diff-lcs (1.
|
|
19
|
-
i18n (1.8.
|
|
13
|
+
i18n (>= 1.6, < 2)
|
|
14
|
+
minitest (>= 5.1)
|
|
15
|
+
tzinfo (~> 2.0)
|
|
16
|
+
zeitwerk (~> 2.3)
|
|
17
|
+
concurrent-ruby (1.1.8)
|
|
18
|
+
diff-lcs (1.4.4)
|
|
19
|
+
i18n (1.8.9)
|
|
20
20
|
concurrent-ruby (~> 1.0)
|
|
21
|
-
mini_portile2 (2.
|
|
22
|
-
minitest (5.14.
|
|
23
|
-
nokogiri (1.
|
|
24
|
-
mini_portile2 (~> 2.
|
|
21
|
+
mini_portile2 (2.5.0)
|
|
22
|
+
minitest (5.14.3)
|
|
23
|
+
nokogiri (1.11.2)
|
|
24
|
+
mini_portile2 (~> 2.5.0)
|
|
25
|
+
racc (~> 1.4)
|
|
26
|
+
racc (1.5.2)
|
|
25
27
|
rake (12.3.3)
|
|
26
|
-
rspec (3.
|
|
27
|
-
rspec-core (~> 3.
|
|
28
|
-
rspec-expectations (~> 3.
|
|
29
|
-
rspec-mocks (~> 3.
|
|
30
|
-
rspec-core (3.
|
|
31
|
-
rspec-support (~> 3.
|
|
32
|
-
rspec-expectations (3.
|
|
28
|
+
rspec (3.10.0)
|
|
29
|
+
rspec-core (~> 3.10.0)
|
|
30
|
+
rspec-expectations (~> 3.10.0)
|
|
31
|
+
rspec-mocks (~> 3.10.0)
|
|
32
|
+
rspec-core (3.10.1)
|
|
33
|
+
rspec-support (~> 3.10.0)
|
|
34
|
+
rspec-expectations (3.10.1)
|
|
33
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
34
|
-
rspec-support (~> 3.
|
|
35
|
-
rspec-mocks (3.
|
|
36
|
+
rspec-support (~> 3.10.0)
|
|
37
|
+
rspec-mocks (3.10.1)
|
|
36
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
37
|
-
rspec-support (~> 3.
|
|
38
|
-
rspec-support (3.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
zeitwerk (2.4.1)
|
|
39
|
+
rspec-support (~> 3.10.0)
|
|
40
|
+
rspec-support (3.10.1)
|
|
41
|
+
tzinfo (2.0.4)
|
|
42
|
+
concurrent-ruby (~> 1.0)
|
|
43
|
+
zeitwerk (2.4.2)
|
|
43
44
|
|
|
44
45
|
PLATFORMS
|
|
45
46
|
ruby
|
data/bin/rspec
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'rspec' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require "pathname"
|
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
13
|
+
Pathname.new(__FILE__).realpath)
|
|
14
|
+
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
require "rubygems"
|
|
27
|
+
require "bundler/setup"
|
|
28
|
+
|
|
29
|
+
load Gem.bin_path("rspec-core", "rspec")
|
|
@@ -6,9 +6,8 @@ module Extract
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
def evaluate
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
condition = expression.gsub(field_name, field_value.to_s)
|
|
9
|
+
keys = Regexp.union(hash.keys.map(&:to_s))
|
|
10
|
+
condition = expression.gsub(keys, hash.stringify_keys)
|
|
12
11
|
|
|
13
12
|
eval(condition)
|
|
14
13
|
end
|
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.5.0"
|
|
4
4
|
spec.authors = ["Fernando Almeida"]
|
|
5
5
|
spec.email = ["fernandoprsbr@gmail.com"]
|
|
6
6
|
|
|
@@ -24,5 +24,6 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
|
|
25
25
|
spec.add_dependency "nokogiri", "~> 1.0"
|
|
26
26
|
spec.add_dependency "activesupport", "~> 6.0"
|
|
27
|
+
spec.add_development_dependency "rake", "~> 12.0"
|
|
27
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
28
29
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.5.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:
|
|
11
|
+
date: 2021-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -38,6 +38,20 @@ dependencies:
|
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '6.0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '12.0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '12.0'
|
|
41
55
|
- !ruby/object:Gem::Dependency
|
|
42
56
|
name: rspec
|
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -59,8 +73,12 @@ executables: []
|
|
|
59
73
|
extensions: []
|
|
60
74
|
extra_rdoc_files: []
|
|
61
75
|
files:
|
|
76
|
+
- ".github/dependabot.yml"
|
|
77
|
+
- ".github/workflows/ci.yml"
|
|
62
78
|
- ".gitignore"
|
|
79
|
+
- ".kodiak.toml"
|
|
63
80
|
- ".rspec"
|
|
81
|
+
- ".ruby-version"
|
|
64
82
|
- ".travis.yml"
|
|
65
83
|
- Gemfile
|
|
66
84
|
- Gemfile.lock
|
|
@@ -68,6 +86,7 @@ files:
|
|
|
68
86
|
- README.md
|
|
69
87
|
- Rakefile
|
|
70
88
|
- bin/console
|
|
89
|
+
- bin/rspec
|
|
71
90
|
- bin/setup
|
|
72
91
|
- lib/src/extract/array_of.rb
|
|
73
92
|
- lib/src/extract/array_value.rb
|
|
@@ -107,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
107
126
|
- !ruby/object:Gem::Version
|
|
108
127
|
version: '0'
|
|
109
128
|
requirements: []
|
|
110
|
-
rubygems_version: 3.
|
|
129
|
+
rubygems_version: 3.2.3
|
|
111
130
|
signing_key:
|
|
112
131
|
specification_version: 4
|
|
113
132
|
summary: Provides a simples DSL for extracting data from XML documents
|