reforge 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +17 -27
- data/.gitignore +8 -0
- data/.rubocop.yml +6 -4
- data/CHANGELOG.md +7 -0
- data/README.md +2 -0
- data/lib/reforge/configuration.rb +1 -1
- data/lib/reforge/transformation/tree.rb +2 -1
- data/reforge.gemspec +2 -2
- metadata +8 -8
- data/.ruby-version +0 -1
- data/.tool-versions +0 -1
- data/Gemfile.lock +0 -89
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5043b004196b6eea8970691206e58071cb7e163f873b8df95b074c89e90bda4e
|
4
|
+
data.tar.gz: 57a3da6af3f516a81f0f2a824c87f4ab6f8e6347ad1a1233505542db3d247cf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 749f62c6f7603435d13c25e4f812c401933bfbad52c12cd2d1be065229ed1715874ac49adb7f9bf7363f75a3f2402099b77a3f5a62834341623e742e7cc7b003
|
7
|
+
data.tar.gz: f6690ec22417b415fcc3bb8c9515a6c29f3e689ff6960e184df978ea06b8645dfda4658b0eb6031d2fe284c0b7770f8814ccc0050f958df777d04e53415f0f47
|
data/.github/workflows/ci.yml
CHANGED
@@ -10,54 +10,44 @@ env:
|
|
10
10
|
BUNDLE_PATH: vendor/bundle
|
11
11
|
|
12
12
|
jobs:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- name: Cache dependencies
|
21
|
-
id: cache-dependencies
|
22
|
-
uses: actions/cache@v2
|
23
|
-
with:
|
24
|
-
path: ${{ env.BUNDLE_PATH }}
|
25
|
-
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
26
|
-
restore-keys: ${{ runner.os }}-gems-
|
27
|
-
- name: Install dependencies
|
28
|
-
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
29
|
-
run: bundle install --jobs 20 --retry 5
|
30
|
-
- name: Lint files
|
31
|
-
run: bundle exec rake rubocop
|
32
|
-
|
33
|
-
test:
|
34
|
-
runs-on: ubuntu-latest
|
13
|
+
ci:
|
14
|
+
strategy:
|
15
|
+
fail-fast: false
|
16
|
+
matrix:
|
17
|
+
os: ['macos', 'ubuntu', 'windows']
|
18
|
+
ruby: ['2.5', '2.6', '2.7']
|
19
|
+
runs-on: ${{ matrix.os }}-latest
|
35
20
|
steps:
|
36
21
|
- uses: actions/checkout@v2
|
37
22
|
with:
|
38
23
|
fetch-depth: 2
|
39
24
|
- uses: ruby/setup-ruby@v1
|
40
25
|
with:
|
41
|
-
ruby-version:
|
26
|
+
ruby-version: ${{ matrix.ruby }}
|
42
27
|
- name: Cache dependencies
|
43
28
|
id: cache-dependencies
|
44
29
|
uses: actions/cache@v2
|
45
30
|
with:
|
46
31
|
path: ${{ env.BUNDLE_PATH }}
|
47
|
-
key: ${{
|
48
|
-
restore-keys:
|
32
|
+
key: ${{ matrix.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile', '**/*.gemspec') }}
|
33
|
+
restore-keys: ${{ matrix.os }}-${{ matrix.ruby }}-gems-
|
49
34
|
- name: Download test reporter
|
35
|
+
if: ${{ matrix.os == 'ubuntu' && matrix.ruby == '2.7' }}
|
50
36
|
run: |
|
51
37
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
52
38
|
chmod +x ./cc-test-reporter
|
53
|
-
- name: Notify of pending report
|
54
|
-
run: ./cc-test-reporter before-build
|
55
39
|
- name: Install dependencies
|
56
40
|
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
57
41
|
run: bundle install --jobs 20 --retry 5
|
42
|
+
- name: Lint files
|
43
|
+
run: bundle exec rake rubocop
|
44
|
+
- name: Notify of pending report
|
45
|
+
if: ${{ matrix.os == 'ubuntu' && matrix.ruby == '2.7' }}
|
46
|
+
run: ./cc-test-reporter before-build
|
58
47
|
- name: Run tests
|
59
48
|
run: bundle exec rake rspec
|
60
49
|
- name: Publish code coverage
|
50
|
+
if: ${{ matrix.os == 'ubuntu' && matrix.ruby == '2.7' }}
|
61
51
|
# TRICKY: We need to manually set the env vars required by Code Climate. GIT_BRANCH is simple to determine, but
|
62
52
|
# GIT_COMMIT_SHA is context dependent:
|
63
53
|
# - When running actions on main when it is pushed we can simply use GITHUB_SHA
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
require: rubocop-performance
|
2
2
|
|
3
|
+
AllCops:
|
4
|
+
TargetRubyVersion: 2.5
|
5
|
+
|
6
|
+
# opt-in new cops
|
7
|
+
NewCops: enable
|
8
|
+
|
3
9
|
# overrides
|
4
10
|
Style/Documentation:
|
5
11
|
Enabled: false
|
@@ -7,7 +13,3 @@ Style/MutableConstant:
|
|
7
13
|
EnforcedStyle: strict
|
8
14
|
Style/StringLiterals:
|
9
15
|
EnforcedStyle: double_quotes
|
10
|
-
|
11
|
-
# opt-in new cops
|
12
|
-
AllCops:
|
13
|
-
NewCops: enable
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -27,6 +27,8 @@ Or install it yourself as:
|
|
27
27
|
|
28
28
|
See the [introduction](INTRODUCTION.md) for information on how to create transformations.
|
29
29
|
|
30
|
+
Changes for each version are noted in the [changelog](CHANGELOG.md)
|
31
|
+
|
30
32
|
## License
|
31
33
|
|
32
34
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -4,6 +4,7 @@ module Reforge
|
|
4
4
|
class Transformation
|
5
5
|
class Tree
|
6
6
|
class NodeRedefinitionError < StandardError; end
|
7
|
+
|
7
8
|
class PathPartError < StandardError; end
|
8
9
|
|
9
10
|
attr_reader :root
|
@@ -66,7 +67,7 @@ module Reforge
|
|
66
67
|
# of ||= is inappropriate during TransformNode attachment because it will not attempt to create and attach the
|
67
68
|
# node if a child with the same key already exists, so we just use = below
|
68
69
|
parent_path_parts = path[0..-2]
|
69
|
-
child_path_parts = path[1
|
70
|
+
child_path_parts = path[1..-1]
|
70
71
|
parent_path_parts.zip(child_path_parts).each do |parent_path_part, child_path_part|
|
71
72
|
node = node[parent_path_part] ||= create_node(child_path_part)
|
72
73
|
end
|
data/reforge.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "reforge"
|
5
|
-
spec.version = "0.1.
|
5
|
+
spec.version = "0.1.1"
|
6
6
|
spec.authors = ["Nate Eizenga"]
|
7
7
|
spec.email = ["eizengan@gmail.com"]
|
8
8
|
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
33
33
|
spec.require_paths = ["lib"]
|
34
34
|
|
35
|
-
spec.required_ruby_version = "
|
35
|
+
spec.required_ruby_version = [">= 2.5", "< 3"]
|
36
36
|
|
37
37
|
spec.add_dependency "zeitwerk", "~> 2.4"
|
38
38
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reforge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Eizenga
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|
@@ -147,12 +147,9 @@ files:
|
|
147
147
|
- ".gitignore"
|
148
148
|
- ".rspec"
|
149
149
|
- ".rubocop.yml"
|
150
|
-
- ".ruby-version"
|
151
|
-
- ".tool-versions"
|
152
150
|
- CHANGELOG.md
|
153
151
|
- CODE_OF_CONDUCT.md
|
154
152
|
- Gemfile
|
155
|
-
- Gemfile.lock
|
156
153
|
- INTRODUCTION.md
|
157
154
|
- LICENSE.txt
|
158
155
|
- README.md
|
@@ -187,16 +184,19 @@ require_paths:
|
|
187
184
|
- lib
|
188
185
|
required_ruby_version: !ruby/object:Gem::Requirement
|
189
186
|
requirements:
|
190
|
-
- - "
|
187
|
+
- - ">="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '2.5'
|
190
|
+
- - "<"
|
191
191
|
- !ruby/object:Gem::Version
|
192
|
-
version:
|
192
|
+
version: '3'
|
193
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
194
|
requirements:
|
195
195
|
- - ">="
|
196
196
|
- !ruby/object:Gem::Version
|
197
197
|
version: '0'
|
198
198
|
requirements: []
|
199
|
-
rubygems_version: 3.
|
199
|
+
rubygems_version: 3.1.4
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: Simple DSL-driven data transformation for Ruby
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.6.6
|
data/.tool-versions
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby 2.6.6
|
data/Gemfile.lock
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
reforge (0.1.0)
|
5
|
-
zeitwerk (~> 2.4)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
ast (2.4.1)
|
11
|
-
attr_extras (6.2.4)
|
12
|
-
byebug (11.1.3)
|
13
|
-
coderay (1.1.3)
|
14
|
-
diff-lcs (1.3)
|
15
|
-
docile (1.3.2)
|
16
|
-
json (2.3.1)
|
17
|
-
method_source (1.0.0)
|
18
|
-
parallel (1.19.2)
|
19
|
-
parser (2.7.2.0)
|
20
|
-
ast (~> 2.4.1)
|
21
|
-
patience_diff (1.1.0)
|
22
|
-
trollop (~> 1.16)
|
23
|
-
pry (0.13.1)
|
24
|
-
coderay (~> 1.1)
|
25
|
-
method_source (~> 1.0)
|
26
|
-
pry-byebug (3.9.0)
|
27
|
-
byebug (~> 11.0)
|
28
|
-
pry (~> 0.13.0)
|
29
|
-
rainbow (3.0.0)
|
30
|
-
rake (12.3.3)
|
31
|
-
regexp_parser (1.8.2)
|
32
|
-
rexml (3.2.4)
|
33
|
-
rspec (3.9.0)
|
34
|
-
rspec-core (~> 3.9.0)
|
35
|
-
rspec-expectations (~> 3.9.0)
|
36
|
-
rspec-mocks (~> 3.9.0)
|
37
|
-
rspec-core (3.9.2)
|
38
|
-
rspec-support (~> 3.9.3)
|
39
|
-
rspec-expectations (3.9.2)
|
40
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.9.0)
|
42
|
-
rspec-mocks (3.9.1)
|
43
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.9.0)
|
45
|
-
rspec-support (3.9.3)
|
46
|
-
rubocop (1.1.0)
|
47
|
-
parallel (~> 1.10)
|
48
|
-
parser (>= 2.7.1.5)
|
49
|
-
rainbow (>= 2.2.2, < 4.0)
|
50
|
-
regexp_parser (>= 1.8)
|
51
|
-
rexml
|
52
|
-
rubocop-ast (>= 1.0.1)
|
53
|
-
ruby-progressbar (~> 1.7)
|
54
|
-
unicode-display_width (>= 1.4.0, < 2.0)
|
55
|
-
rubocop-ast (1.1.0)
|
56
|
-
parser (>= 2.7.1.5)
|
57
|
-
rubocop-performance (1.8.1)
|
58
|
-
rubocop (>= 0.87.0)
|
59
|
-
rubocop-ast (>= 0.4.0)
|
60
|
-
ruby-progressbar (1.10.1)
|
61
|
-
simplecov (0.17.1)
|
62
|
-
docile (~> 1.1)
|
63
|
-
json (>= 1.8, < 3)
|
64
|
-
simplecov-html (~> 0.10.0)
|
65
|
-
simplecov-html (0.10.2)
|
66
|
-
super_diff (0.5.2)
|
67
|
-
attr_extras (>= 6.2.4)
|
68
|
-
diff-lcs
|
69
|
-
patience_diff
|
70
|
-
trollop (1.16.2)
|
71
|
-
unicode-display_width (1.7.0)
|
72
|
-
zeitwerk (2.4.0)
|
73
|
-
|
74
|
-
PLATFORMS
|
75
|
-
ruby
|
76
|
-
|
77
|
-
DEPENDENCIES
|
78
|
-
bundler (~> 2.0)
|
79
|
-
pry-byebug (~> 3.9)
|
80
|
-
rake (~> 12.0)
|
81
|
-
reforge!
|
82
|
-
rspec (~> 3.0)
|
83
|
-
rubocop (~> 1.0)
|
84
|
-
rubocop-performance (~> 1.8)
|
85
|
-
simplecov (~> 0.17.1)
|
86
|
-
super_diff (~> 0.5)
|
87
|
-
|
88
|
-
BUNDLED WITH
|
89
|
-
2.1.4
|