hashid-rails 1.4.0 → 1.4.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: a031cc6356d93f71fa6d698df56e16ca80cc618f48124bc2d96f280f0d377b7c
4
- data.tar.gz: 0e1fae45b1e6398f270dc537809c66f194b46b66c45b517c9f3fbb4c836e7a92
3
+ metadata.gz: fd185250fd0af5aafc4c16778f0c75caa5a6d9e40e66a9f7cb4d80f72abbd695
4
+ data.tar.gz: 5cbf59b9d08b71d217b1fafac1259bc039997a7df1a71e0050df1b192e2a1b4a
5
5
  SHA512:
6
- metadata.gz: 6192fcc1bc64d6fd20eaa2fd57c382327a47b52dc2511d69db6611a610b8ff940c45962223e2aff4336467454937145bfb58944d305041972605f69b470d092d
7
- data.tar.gz: 88a4be52b6b208d3d858eb37d9a97255f064476639a3d80add4e19ba0bff39d9cb2024edaa156625de6509d386e341850efdf20f3d03c663854bccef2668dc6d
6
+ metadata.gz: c8ee16a2e88d3efeca25e40e62215d95525e0f2e37428a3c6ae04bc19ff8977f1a8e48483ff4482467b43cf0cdc801bdacb12c9c6fe6790515633730b38e1661
7
+ data.tar.gz: 363076602dac93a35124cef3e5519a5e3544abdf97e35f8de67e245d04f213a0b4119b47cfe0cdb01cfcad17b2aebbc3cb8e08a9acce8e407661f583a19c4e9a
@@ -4,32 +4,48 @@ on: [push, pull_request]
4
4
 
5
5
  jobs:
6
6
  build:
7
+ name: Ruby ${{ matrix.ruby }} on Rails ${{ matrix.rails }}
7
8
  runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby: ["2.5", "2.6"]
12
+ rails: ["4.2", "5.0", "5.1", "5.2", "6.0"]
13
+ include:
14
+ - ruby: "2.7"
15
+ rails: "6.0"
8
16
 
9
17
  steps:
10
- - uses: actions/checkout@v1
18
+ - uses: actions/checkout@v2
11
19
 
12
- - name: Install Ruby (2.6)
20
+ - name: Install Ruby (${{ matrix.ruby }})
13
21
  uses: actions/setup-ruby@v1
14
22
  with:
15
- ruby-version: 2.6.x
23
+ ruby-version: ${{ matrix.ruby }}
16
24
 
17
25
  - name: Install SQLite
18
26
  run: sudo apt install -y libsqlite3-dev
19
27
 
20
- - name: Setup Code Climate test-reporter
21
- run: |
22
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
23
- chmod +x ./cc-test-reporter
24
- ./cc-test-reporter before-build
25
-
26
- - name: Build and test with RSpec
27
- run: |
28
- gem install bundler
29
- bundle install --jobs 4 --retry 3
30
- bundle exec rspec
28
+ - name: Cache Ruby Gems
29
+ uses: actions/cache@v2
30
+ with:
31
+ path: vendor/bundle
32
+ key: ruby-${{ matrix.ruby }}-rails-${{ matrix.rails }}-gems-${{ hashFiles('hashid-rails.gemspec', 'Appraisals') }}
33
+ restore-keys: |
34
+ ruby-${{ matrix.ruby }}-rails-${{ matrix.rails }}-gems-
31
35
 
32
- - name: Publish code coverage
36
+ - name: Install Ruby dependencies
33
37
  run: |
34
- export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
35
- ./cc-test-reporter after-build -r ${{secrets.CC_TEST_REPORTER_ID}}
38
+ bundle config set path ../vendor/bundle
39
+ bundle install --gemfile gemfiles/rails_${{ matrix.rails }}.gemfile --jobs 4 --retry 3
40
+
41
+ - name: Test with RSpec
42
+ env:
43
+ BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.gemfile
44
+ run: bundle exec appraisal rails-${{ matrix.rails }} rspec
45
+
46
+ - name: Publish Test Coverage
47
+ uses: paambaati/codeclimate-action@v2.6.0
48
+ env:
49
+ CC_TEST_REPORTER_ID: 37aee70bb2e818f3bf4d2af88ea4a4355393901ba98b3876c244d42ed20fdbe1
50
+ with:
51
+ coverageCommand: true
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  /.ruby-version
11
+ *.gemfile.lock
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise "rails-4.2" do
4
+ gem "activerecord", "~> 4.2.0"
5
+ gem "sqlite3", "< 1.4"
6
+ end
7
+
8
+ appraise "rails-5.0" do
9
+ gem "activerecord", "~> 5.0.0"
10
+ gem "sqlite3", "< 1.4"
11
+ end
12
+
13
+ appraise "rails-5.1" do
14
+ gem "activerecord", "~> 5.1.0"
15
+ end
16
+
17
+ appraise "rails-5.2" do
18
+ gem "activerecord", "~> 5.2.0"
19
+ end
20
+
21
+ appraise "rails-6.0" do
22
+ gem "activerecord", "~> 6.0.0"
23
+ end
@@ -1,9 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.1 (2020-08-09)
4
+
5
+ - Use ** splat operator to address deprecation warning in Ruby 2.7 ([#72](https://github.com/jcypret/hashid-rails/pull/72)) by [alexford](https://github.com/alexford)
6
+ - Use codeclimate-action to improve edge-case handling ([#73](https://github.com/jcypret/hashid-rails/pull/73))
7
+ - Add matrix testing for supported Ruby ([#74](https://github.com/jcypret/hashid-rails/pull/74)) and Rails ([#75](https://github.com/jcypret/hashid-rails/pull/75)) versions.
8
+
3
9
  ## 1.4.0 (2019-10-30)
4
10
  - Add support for disabling the overriding of `to_param` ([#68](https://github.com/jcypret/hashid-rails/pull/68))
5
11
  - Fix exception raised when calling `hashid` on an model with a `nil` id
6
- ([#63](https://github.com/jcypret/hashid-rails/pull/63) by [fauxparse](https://github.com/fauxparse))
12
+ ([#63](https://github.com/jcypret/hashid-rails/pull/63)) by [fauxparse](https://github.com/fauxparse)
7
13
 
8
14
  ## 1.3.0 (2019-10-29)
9
15
  - Add support for model-level config ([#67](https://github.com/jcypret/hashid-rails/pull/67))
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 4.2.0"
6
+ gem "sqlite3", "< 1.4"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.0.0"
6
+ gem "sqlite3", "< 1.4"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.1.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.2.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 6.0.0"
6
+
7
+ gemspec path: "../"
@@ -28,12 +28,13 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
30
 
31
+ spec.add_development_dependency "appraisal"
31
32
  spec.add_development_dependency "bundler"
32
33
  spec.add_development_dependency "byebug"
33
34
  spec.add_development_dependency "rake"
34
35
  spec.add_development_dependency "rspec", "~> 3.4.0"
35
36
  spec.add_development_dependency "rubocop"
36
- spec.add_development_dependency "simplecov"
37
+ spec.add_development_dependency "simplecov", "~> 0.17.1"
37
38
  spec.add_development_dependency "sqlite3"
38
39
 
39
40
  spec.add_runtime_dependency "activerecord", ">= 4.0"
@@ -63,7 +63,7 @@ module Hashid
63
63
  def has_many(*args, &block)
64
64
  options = args.extract_options!
65
65
  options[:extend] = Array(options[:extend]).push(ClassMethods)
66
- super(*args, options, &block)
66
+ super(*args, **options, &block)
67
67
  end
68
68
 
69
69
  def encode_id(ids)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Hashid
4
4
  module Rails
5
- VERSION = "1.4.0"
5
+ VERSION = "1.4.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashid-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Cypret
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-31 00:00:00.000000000 Z
11
+ date: 2020-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: appraisal
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +98,16 @@ dependencies:
84
98
  name: simplecov
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ">="
101
+ - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '0'
103
+ version: 0.17.1
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ">="
108
+ - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '0'
110
+ version: 0.17.1
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: sqlite3
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -152,7 +166,7 @@ files:
152
166
  - ".gitignore"
153
167
  - ".rspec"
154
168
  - ".rubocop.yml"
155
- - ".travis.yml"
169
+ - Appraisals
156
170
  - CHANGELOG.md
157
171
  - Gemfile
158
172
  - LICENSE.txt
@@ -160,6 +174,11 @@ files:
160
174
  - Rakefile
161
175
  - bin/console
162
176
  - bin/setup
177
+ - gemfiles/rails_4.2.gemfile
178
+ - gemfiles/rails_5.0.gemfile
179
+ - gemfiles/rails_5.1.gemfile
180
+ - gemfiles/rails_5.2.gemfile
181
+ - gemfiles/rails_6.0.gemfile
163
182
  - hashid-rails.gemspec
164
183
  - lib/hashid/rails.rb
165
184
  - lib/hashid/rails/configuration.rb
@@ -168,7 +187,7 @@ homepage: https://github.com/jcypret/hashid-rails
168
187
  licenses:
169
188
  - MIT
170
189
  metadata: {}
171
- post_install_message:
190
+ post_install_message:
172
191
  rdoc_options: []
173
192
  require_paths:
174
193
  - lib
@@ -184,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
203
  version: '0'
185
204
  requirements: []
186
205
  rubygems_version: 3.0.3
187
- signing_key:
206
+ signing_key:
188
207
  specification_version: 4
189
208
  summary: Use Hashids in your Rails app models.
190
209
  test_files: []
@@ -1,15 +0,0 @@
1
- env:
2
- global:
3
- - CC_TEST_REPORTER_ID=37aee70bb2e818f3bf4d2af88ea4a4355393901ba98b3876c244d42ed20fdbe1
4
- language: ruby
5
- cache: bundler
6
- rvm:
7
- - 2.3.0
8
- before_script:
9
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
10
- - chmod +x ./cc-test-reporter
11
- - ./cc-test-reporter before-build
12
- script:
13
- - bundle exec rspec
14
- after_script:
15
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT