reforge 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3954966aa5b1027a05381e015a54986920c1e08af4f92ea4cbbee550ec9547e
4
- data.tar.gz: e9fd17106ca7608a4e1ee47a0b19e9d22e8fe300b098e5edac9b6f4a47451ae8
3
+ metadata.gz: 5043b004196b6eea8970691206e58071cb7e163f873b8df95b074c89e90bda4e
4
+ data.tar.gz: 57a3da6af3f516a81f0f2a824c87f4ab6f8e6347ad1a1233505542db3d247cf9
5
5
  SHA512:
6
- metadata.gz: 5c287390d5e5016dae3b0f30d0251c3b91ee8690b2f067674d550a156e8725b9c3c0b5b902794cda7d170fd6ce2e929c20dd2a273103b15af5dbd0d87637c119
7
- data.tar.gz: 438364630d684abe90326e6aadd263687b504ccbd9b09f741849b5fd3462a0af6a77033902a1d4321b20c4b70c1196f85da3ff7ad61f1762365afad5cb3579eb
6
+ metadata.gz: 749f62c6f7603435d13c25e4f812c401933bfbad52c12cd2d1be065229ed1715874ac49adb7f9bf7363f75a3f2402099b77a3f5a62834341623e742e7cc7b003
7
+ data.tar.gz: f6690ec22417b415fcc3bb8c9515a6c29f3e689ff6960e184df978ea06b8645dfda4658b0eb6031d2fe284c0b7770f8814ccc0050f958df777d04e53415f0f47
@@ -10,54 +10,44 @@ env:
10
10
  BUNDLE_PATH: vendor/bundle
11
11
 
12
12
  jobs:
13
- lint:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - uses: actions/checkout@v2
17
- - uses: ruby/setup-ruby@v1
18
- with:
19
- ruby-version: 2.6.6
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: 2.6.6
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: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
48
- restore-keys: ${{ runner.os }}-gems-
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
@@ -10,4 +10,12 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
 
13
+ # built gems
13
14
  reforge-*.gem
15
+
16
+ # lock should vary by version
17
+ Gemfile.lock
18
+
19
+ # support multiple versions
20
+ .ruby-version
21
+ .tool-versions
@@ -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
@@ -0,0 +1,7 @@
1
+ # 0.1.1
2
+
3
+ - Extend support to Ruby 2.5, 2.6, and 2.7
4
+
5
+ # 0.1.0
6
+
7
+ - Initial release!
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).
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Reforge
4
- class Configuration
4
+ class Configuration # rubocop:disable Lint/EmptyClass
5
5
  end
6
6
  end
@@ -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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "reforge"
5
- spec.version = "0.1.0"
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 = "~> 2.6.6"
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.0
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-10 00:00:00.000000000 Z
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: 2.6.6
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.0.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
@@ -1 +0,0 @@
1
- 2.6.6
@@ -1 +0,0 @@
1
- ruby 2.6.6
@@ -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