acts_as_hashids 0.1.4 → 0.1.9

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
- SHA1:
3
- metadata.gz: 7e73bc8dc01050b7cd4e73c8f66d41f9490505dc
4
- data.tar.gz: e45de056b6215bfcf51ff03872a15468430f08da
2
+ SHA256:
3
+ metadata.gz: 3596c432648776928bf2fe96c990526a1e19b11f044944c0a79685f29b5e8265
4
+ data.tar.gz: 5cffe582bcdc4e4e24f003d60ac1628027663e37e05762206e734763b63ed524
5
5
  SHA512:
6
- metadata.gz: 418e43334a2518847872d4cfa12ddae479d26d6a604edf65ea4b042bdde73150dd732d17fd5112b8d1b3657870f66c7364157c48566113e09dc42d674d5c800f
7
- data.tar.gz: 2304ac53bd1c53ce1f00f8eb2fb16d5f172dd64e7f4cceaf73974af0057312b836499089aca832f2ff5824210062c076ceb0d820bba1e150c7f56c4cbf728ee8
6
+ metadata.gz: 77c7368b389110f15973ab0de7023ac2b3d5aa263ba1e3ca09ebbf1528ac10c047697a9f37b5fea84301fe4639be99d214fce2ab996a003651cde8d32eca0736
7
+ data.tar.gz: d2d6098dad02a66f9c1c3c8b973d06383bb108a3f302a39f5ac8262926ae1da7cb2299c6a0c49e0edf898df55ac892c0bc0b5bcf3849463ea0cc67ca4879ddf0
data/.gem_release.yml ADDED
@@ -0,0 +1,2 @@
1
+ bump:
2
+ tag: true
data/.rubocop.yml CHANGED
@@ -19,17 +19,32 @@ Metrics/CyclomaticComplexity:
19
19
  Max: 10
20
20
  Metrics/PerceivedComplexity:
21
21
  Max: 10
22
+ Metrics/BlockLength:
23
+ Enabled: false
22
24
  Documentation:
23
25
  Enabled: false
24
26
  Style/SignalException:
25
27
  EnforcedStyle: only_raise
26
- Style/IndentHash:
28
+ Layout/IndentHash:
27
29
  EnforcedStyle: consistent
28
- Style/IndentArray:
30
+ Layout/IndentArray:
29
31
  EnforcedStyle: consistent
30
- Lint/EndAlignment:
31
- AlignWith: variable
32
+ Layout/EndAlignment:
33
+ EnforcedStyleAlignWith: variable
34
+ Lint/InheritException:
35
+ Enabled: false
32
36
  Style/FrozenStringLiteralComment:
33
37
  Enabled: false
34
38
  RSpec/AnyInstance:
35
39
  Enabled: false
40
+ RSpec/NestedGroups:
41
+ Max: 4
42
+ RSpec/ContextWording:
43
+ Prefixes:
44
+ - when
45
+ - with
46
+ - without
47
+ - for
48
+ - as
49
+ RSpec/MultipleExpectations:
50
+ Max: 2
data/.travis.yml CHANGED
@@ -1,27 +1,47 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  rvm:
4
- - 2.2.6
5
- - 2.3.3
6
- - 2.4.0
4
+ - 2.4
5
+ - 2.5
6
+ - 2.6
7
+ - 2.7
7
8
  env:
9
+ jobs:
8
10
  -
9
- - ACTIVE_RECORD_VERSION=4.0.0
10
- - ACTIVE_RECORD_VERSION=4.1.0
11
- - ACTIVE_RECORD_VERSION=4.2.0
12
- - ACTIVE_RECORD_VERSION=5.0.0
11
+ - ACTIVE_RECORD_VERSION=4.0.0 SQLITE3_VERSION=1.3.13
12
+ - ACTIVE_RECORD_VERSION=4.1.0 SQLITE3_VERSION=1.3.13
13
+ - ACTIVE_RECORD_VERSION=4.2.0 SQLITE3_VERSION=1.3.13
14
+ - ACTIVE_RECORD_VERSION=5.0.0 SQLITE3_VERSION=1.3.13
15
+ - ACTIVE_RECORD_VERSION=6.0.0
13
16
  matrix:
14
17
  allow_failures:
15
- - rvm: 2.4.0
16
- env: ACTIVE_RECORD_VERSION=4.0.0
17
- - rvm: 2.4.0
18
- env: ACTIVE_RECORD_VERSION=4.1.0
19
- cache: bundler
18
+ - rvm: 2.4
19
+ env: ACTIVE_RECORD_VERSION=4.0.0 SQLITE3_VERSION=1.3.13
20
+ - rvm: 2.4
21
+ env: ACTIVE_RECORD_VERSION=4.1.0 SQLITE3_VERSION=1.3.13
22
+ - rvm: 2.5
23
+ env: ACTIVE_RECORD_VERSION=4.0.0 SQLITE3_VERSION=1.3.13
24
+ - rvm: 2.5
25
+ env: ACTIVE_RECORD_VERSION=4.1.0 SQLITE3_VERSION=1.3.13
26
+ - rvm: 2.6
27
+ env: ACTIVE_RECORD_VERSION=4.0.0 SQLITE3_VERSION=1.3.13
28
+ - rvm: 2.6
29
+ env: ACTIVE_RECORD_VERSION=4.1.0 SQLITE3_VERSION=1.3.13
30
+ - rvm: 2.7
31
+ env: ACTIVE_RECORD_VERSION=4.0.0 SQLITE3_VERSION=1.3.13
32
+ - rvm: 2.7
33
+ env: ACTIVE_RECORD_VERSION=4.1.0 SQLITE3_VERSION=1.3.13
34
+ - rvm: 2.7
35
+ env: ACTIVE_RECORD_VERSION=4.2.0 SQLITE3_VERSION=1.3.13
36
+ - rvm: 2.4
37
+ env: ACTIVE_RECORD_VERSION=6.0.0
20
38
  before_install:
21
39
  - gem update --system
22
40
  - gem --version
23
- - gem update bundler
24
- - bundler --version
41
+ install:
42
+ - gem install bundler
43
+ - bundle --version
44
+ - bundle install --jobs=3 --retry=3
25
45
  script:
26
46
  - 'bundle exec rake'
27
47
  notifications:
data/Gemfile CHANGED
@@ -6,3 +6,4 @@ gem 'gem-release'
6
6
  gem 'pry'
7
7
 
8
8
  gem 'activerecord', "~> #{ENV['ACTIVE_RECORD_VERSION']}" if ENV['ACTIVE_RECORD_VERSION'].to_s != ''
9
+ gem 'sqlite3', "~> #{ENV['SQLITE3_VERSION']}" if ENV['SQLITE3_VERSION'].to_s != ''
data/README.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # acts_as_hashids
2
2
 
3
3
  [![Gem Version][gem-image]][gem-link]
4
+ [![Download][download-image]][download-link]
4
5
  [![Build Status][build-image]][build-link]
5
6
  [![Coverage Status][cov-image]][cov-link]
6
7
  [![Code Climate][gpa-image]][gpa-link]
7
8
 
8
- Use [Hashids](https://github.com/peterhellberg/hashids.rb) (a.k.a. Youtube-Like ID) in ActiveRecord effectively.
9
+ Use [Hashids](https://github.com/peterhellberg/hashids.rb) (a.k.a. Youtube-Like ID) in ActiveRecord seamlessly.
9
10
 
10
11
  ## Installation
11
12
 
@@ -81,6 +82,19 @@ Foo2.create.to_param
81
82
  # => "RxQce3a2"
82
83
  ```
83
84
 
85
+ ### alphabet
86
+
87
+ Specify which characters you use to generate hashids.
88
+
89
+ ```rb
90
+ class Foo < ActiveRecord::Base
91
+ acts_as_hashids alphabet: '0123456789uvwxyz'
92
+ end
93
+
94
+ Foo.create(id: 1).to_param
95
+ # => "4xw8zwyv"
96
+ ```
97
+
84
98
  ## Test
85
99
 
86
100
  Execute the command below to run rspec and rubocop.
@@ -106,8 +120,10 @@ Copyright (c) 2014 Daisuke Taniwaki. See [LICENSE](LICENSE) for details.
106
120
 
107
121
  [gem-image]: https://badge.fury.io/rb/acts_as_hashids.svg
108
122
  [gem-link]: http://badge.fury.io/rb/acts_as_hashids
109
- [build-image]: https://secure.travis-ci.org/dtaniwaki/acts_as_hashids.png
110
- [build-link]: http://travis-ci.org/dtaniwaki/acts_as_hashids
123
+ [download-image]:https://img.shields.io/gem/dt/acts_as_hashids.svg
124
+ [download-link]:https://rubygems.org/gems/acts_as_hashids
125
+ [build-image]: https://www.travis-ci.com/dtaniwaki/acts_as_hashids.svg
126
+ [build-link]: http://travis-ci.com/dtaniwaki/acts_as_hashids
111
127
  [cov-image]: https://coveralls.io/repos/dtaniwaki/acts_as_hashids/badge.png
112
128
  [cov-link]: https://coveralls.io/r/dtaniwaki/acts_as_hashids
113
129
  [gpa-image]: https://codeclimate.com/github/dtaniwaki/acts_as_hashids.png
data/Rakefile CHANGED
@@ -7,4 +7,4 @@ require 'rubocop/rake_task'
7
7
  RuboCop::RakeTask.new
8
8
 
9
9
  task(:default).clear
10
- task default: [:spec, :rubocop]
10
+ task default: %i[spec rubocop]
@@ -1,5 +1,4 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'acts_as_hashids/version'
5
4
 
@@ -10,8 +9,8 @@ Gem::Specification.new do |spec|
10
9
  spec.authors = ['dtaniwaki']
11
10
  spec.email = ['daisuketaniwaki@gmail.com']
12
11
 
13
- spec.summary = 'Hashids in ActiveRecord effectively.'
14
- spec.description = 'Use Hashids in ActiveRecord effectively.'
12
+ spec.summary = 'Use Youtube-Like ID in ActiveRecord seamlessly.'
13
+ spec.description = 'Use Youtube-Like ID in ActiveRecord seamlessly.'
15
14
  spec.homepage = 'https://github.com/dtaniwaki/acts_as_hashids'
16
15
  spec.license = 'MIT'
17
16
 
@@ -20,17 +19,17 @@ Gem::Specification.new do |spec|
20
19
  spec.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
21
20
  spec.require_paths = ['lib']
22
21
 
23
- spec.required_ruby_version = ['>= 2.2.2', '< 2.5']
22
+ spec.required_ruby_version = ['>= 2.2.2', '< 3.0']
24
23
 
24
+ spec.add_runtime_dependency 'activerecord', '>= 4.0', '< 6.1'
25
25
  spec.add_runtime_dependency 'hashids', '~> 1.0'
26
- spec.add_runtime_dependency 'activerecord', '>= 4.0', '< 6.0'
27
26
 
27
+ spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.5'
28
+ spec.add_development_dependency 'coveralls', '~> 0.8'
28
29
  spec.add_development_dependency 'rake', '~> 10.0'
29
30
  spec.add_development_dependency 'rspec', '~> 3.0'
30
- spec.add_development_dependency 'sqlite3', '~> 1.3'
31
- spec.add_development_dependency 'rubocop', '= 0.37.2'
32
- spec.add_development_dependency 'rubocop-rspec', '= 1.4.0'
31
+ spec.add_development_dependency 'rubocop', '~> 0.54.0'
32
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.24.0'
33
33
  spec.add_development_dependency 'simplecov', '~> 0.11'
34
- spec.add_development_dependency 'coveralls', '~> 0.8'
35
- spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.5'
34
+ spec.add_development_dependency 'sqlite3', '~> 1.3'
36
35
  end
@@ -13,7 +13,17 @@ module ActsAsHashids
13
13
  def find(ids = nil, &block)
14
14
  return detect(&block) if block.present? && respond_to?(:detect)
15
15
 
16
- encoded_ids = Array(ids).map { |id| id.is_a?(String) ? id : hashids.encode(id) }.flatten
16
+ encoded_ids = Array(ids).map do |id|
17
+ begin
18
+ id = id.to_i if Integer(id)
19
+ hashids.encode(id)
20
+ rescue TypeError, ArgumentError
21
+ id
22
+ end
23
+ end
24
+
25
+ encoded_ids = encoded_ids.flatten
26
+
17
27
  res = with_hashids(encoded_ids).all
18
28
  if ids.is_a?(Array)
19
29
  raise_record_not_found_exception! encoded_ids, res.size, encoded_ids.size if res.size != encoded_ids.size
@@ -1,3 +1,3 @@
1
1
  module ActsAsHashids
2
- VERSION = '0.1.4'.freeze
2
+ VERSION = '0.1.9'.freeze
3
3
  end
@@ -19,7 +19,7 @@ RSpec.describe ActsAsHashids::Core do
19
19
 
20
20
  class Base < ActiveRecord::Base
21
21
  self.abstract_class = true
22
- acts_as_hashids
22
+ acts_as_hashids length: 4
23
23
  end
24
24
 
25
25
  class CoreFoo < Base
@@ -31,79 +31,107 @@ RSpec.describe ActsAsHashids::Core do
31
31
  end
32
32
 
33
33
  describe '.find' do
34
- subject { CoreFoo }
34
+ subject(:model) { CoreFoo }
35
+
35
36
  let!(:foo1) { CoreFoo.create }
36
37
  let!(:foo2) { CoreFoo.create }
38
+
37
39
  context 'for single argument' do
38
40
  it 'decodes hash id and returns the record' do
39
- expect(subject.find(foo1.to_param)).to eq foo1
41
+ expect(model.find(foo1.to_param)).to eq foo1
40
42
  end
41
43
  context 'with unexisting hash id' do
42
44
  it 'raises an exception' do
43
- expect { subject.find('GXbMabNA') }.to raise_error(
44
- ActiveRecord::RecordNotFound, "Couldn't find CoreFoo with 'id'=\"GXbMabNA\""
45
+ expect { model.find('bMab') }.to raise_error(
46
+ ActiveRecord::RecordNotFound, "Couldn't find CoreFoo with 'id'=\"bMab\""
45
47
  )
46
48
  end
47
49
  end
50
+ context 'with hash id which looks like a logarithm' do
51
+ let!(:foo1) { CoreFoo.create(id: CoreFoo.hashids.decode('4E93')[0]) }
52
+ let!(:foo2) { CoreFoo.create(id: '4') }
53
+
54
+ it 'decodes hash id which looks like a logarithm and returns the record' do
55
+ expect(model.find('4E93')).to eq foo1
56
+ expect(model.find('4')).not_to eq foo1
57
+ end
58
+ it 'decodes hash id and returns the record' do
59
+ expect(model.find('4E93')).not_to eq foo2
60
+ expect(model.find('4')).to eq foo2
61
+ end
62
+ end
63
+ it 'returns the record when finding by string id' do
64
+ expect(model.find(foo1.id.to_s)).to eq foo1
65
+ end
48
66
  end
49
67
  context 'for multiple arguments' do
50
68
  it 'decodes hash id and returns the record' do
51
- expect(subject.find([foo1.to_param, foo2.to_param])).to eq [foo1, foo2]
69
+ expect(model.find([foo1.to_param, foo2.to_param])).to eq [foo1, foo2]
52
70
  end
53
71
  context 'with unexisting hash id' do
54
72
  it 'raises an exception' do
55
- expect { subject.find(%w(GXbMabNA ePQgabdg)) }.to raise_error(
73
+ expect { model.find(%w[bMab Qgab]) }.to raise_error(
56
74
  ActiveRecord::RecordNotFound,
57
- "Couldn't find all CoreFoos with 'id': (\"GXbMabNA\", \"ePQgabdg\") (found 1 results, but was looking for 2)"
75
+ "Couldn't find all CoreFoos with 'id': (\"bMab\", \"Qgab\") (found 1 results, but was looking for 2)"
58
76
  )
59
77
  end
60
78
  end
61
79
  end
62
80
  context 'as ActiveRecord_Relation' do
63
81
  it 'decodes hash id and returns the record' do
64
- expect(subject.where(nil).find(foo1.to_param)).to eq foo1
82
+ expect(model.where(nil).find(foo1.to_param)).to eq foo1
65
83
  end
66
84
  end
67
85
  context 'as ActiveRecord_Associations_CollectionProxy' do
68
- let!(:bar3) { CoreBar.create core_foo: foo1 }
69
- let!(:bar4) { CoreBar.create core_foo: foo1 }
86
+ let(:bar3) { CoreBar.create core_foo: foo1 }
87
+ let(:bar4) { CoreBar.create core_foo: foo1 }
88
+
89
+ before do
90
+ bar3
91
+ bar4
92
+ end
93
+
70
94
  it 'decodes hash id and returns the record' do
71
95
  expect(foo1.core_bars.find(bar3.to_param)).to eq bar3
72
96
  end
73
97
  context 'without arguments' do
74
98
  it 'delegates to detect method' do
75
- expect(foo1.core_bars).to receive(:detect).once.and_call_original
99
+ allow(foo1.core_bars).to receive(:detect).once.and_call_original
76
100
  expect(foo1.core_bars.find { |bar| bar == bar3 }).to eq bar3
101
+ expect(foo1.core_bars).to have_received(:detect).once
77
102
  end
78
103
  end
79
104
  end
80
- context 'reloaded' do
81
- subject { CoreFoo.create }
105
+ context 'when reloaded' do
106
+ subject(:model) { CoreFoo.create }
107
+
82
108
  it 'decodes hash id and returns the record' do
83
109
  expect do
84
- subject.reload
110
+ model.reload
85
111
  end.not_to raise_error
86
112
  end
87
113
  end
88
114
  end
89
115
  describe '.with_hashids' do
90
- subject { CoreFoo }
116
+ subject(:model) { CoreFoo }
117
+
91
118
  let!(:foo1) { CoreFoo.create }
92
119
  let!(:foo2) { CoreFoo.create }
120
+
93
121
  it 'decodes hash id and returns the record' do
94
- expect(subject.with_hashids([foo1.to_param, foo2.to_param]).all).to eq [foo1, foo2]
122
+ expect(model.with_hashids([foo1.to_param, foo2.to_param]).all).to eq [foo1, foo2]
95
123
  end
96
124
  context 'with invalid hash id' do
97
125
  it 'raises an exception' do
98
- expect { subject.with_hashids('@').all }.to raise_error(ActsAsHashids::Exception, 'Decode error: ["@"]')
126
+ expect { model.with_hashids('@').all }.to raise_error(ActsAsHashids::Exception, 'Decode error: ["@"]')
99
127
  end
100
128
  end
101
129
  end
102
130
  describe '#to_param' do
103
- subject { CoreFoo.create }
131
+ subject(:model) { CoreFoo.create id: 5 }
132
+
104
133
  it 'returns hash id' do
105
- allow(subject).to receive(:id).and_return 5
106
- expect(subject.to_param).to eq 'GXbMabNA'
134
+ expect(model.to_param).to eq 'bMab'
107
135
  end
108
136
  end
109
137
  end
@@ -28,46 +28,53 @@ RSpec.describe ActsAsHashids::Methods do
28
28
  end
29
29
 
30
30
  describe '.hashids_secret' do
31
- subject { create_model 'MethodsFoo' }
31
+ subject(:model) { create_model 'MethodsFoo' }
32
+
32
33
  it 'returns the class name' do
33
- expect(subject.hashids_secret).to eq 'MethodsFoo'
34
+ expect(model.hashids_secret).to eq 'MethodsFoo'
34
35
  end
35
36
  context 'for STI' do
36
- let!(:bar) { create_model 'MethodsBar' }
37
- subject { create_model 'MethodsFoo', base: MethodsBar }
37
+ subject(:model) { create_model 'MethodsFoo', base: MethodsBar }
38
+
38
39
  it 'returns the base class name' do
39
- expect(subject.hashids_secret).to eq 'MethodsBar'
40
+ create_model 'MethodsBar'
41
+ expect(model.hashids_secret).to eq 'MethodsBar'
40
42
  end
41
43
  end
42
44
  context 'with custom secret' do
43
- subject { create_model 'MethodsFoo', secret: '^_^' }
45
+ subject(:model) { create_model 'MethodsFoo', secret: '^_^' }
46
+
44
47
  it 'returns the custom secret' do
45
- expect(subject.hashids_secret).to eq '^_^'
48
+ expect(model.hashids_secret).to eq '^_^'
46
49
  end
47
50
  context 'with executable secret' do
48
- subject { create_model 'MethodsFoo', secret: -> { "#{self.name} ^_^" } }
51
+ subject(:model) { create_model 'MethodsFoo', secret: -> { "#{name} ^_^" } }
52
+
49
53
  it 'returns the custom secret' do
50
- expect(subject.hashids_secret).to eq 'MethodsFoo ^_^'
54
+ expect(model.hashids_secret).to eq 'MethodsFoo ^_^'
51
55
  end
52
56
  end
53
57
  end
54
58
  end
55
59
 
56
60
  describe '.hashids' do
57
- subject { create_model 'MethodsFoo' }
61
+ subject(:model) { create_model 'MethodsFoo' }
62
+
58
63
  it 'returns the hashids instance' do
59
- expect(subject.hashids.encode(1)).to eq Hashids.new('MethodsFoo', 8).encode(1)
64
+ expect(model.hashids.encode(1)).to eq Hashids.new('MethodsFoo', 8).encode(1)
60
65
  end
61
66
  context 'with custom length' do
62
- subject { create_model 'MethodsFoo', length: 16 }
67
+ subject(:model) { create_model 'MethodsFoo', length: 16 }
68
+
63
69
  it 'returns the hashids instance' do
64
- expect(subject.hashids.encode(1)).to eq Hashids.new('MethodsFoo', 16).encode(1)
70
+ expect(model.hashids.encode(1)).to eq Hashids.new('MethodsFoo', 16).encode(1)
65
71
  end
66
72
  end
67
73
  context 'with custom alphabet' do
68
- subject { create_model 'MethodsFoo', alphabet: '1234567890abcdef' }
74
+ subject(:model) { create_model 'MethodsFoo', alphabet: '1234567890abcdef' }
75
+
69
76
  it 'returns the hashids instance' do
70
- expect(subject.hashids.encode(1)).to eq Hashids.new('MethodsFoo', 8, '1234567890abcdef').encode(1)
77
+ expect(model.hashids.encode(1)).to eq Hashids.new('MethodsFoo', 8, '1234567890abcdef').encode(1)
71
78
  end
72
79
  end
73
80
  end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,4 @@
1
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
1
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
2
2
 
3
3
  # Test Coverage
4
4
  require 'codeclimate-test-reporter'
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_hashids
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - dtaniwaki
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-19 00:00:00.000000000 Z
11
+ date: 2021-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: hashids
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: activerecord
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -33,7 +19,7 @@ dependencies:
33
19
  version: '4.0'
34
20
  - - "<"
35
21
  - !ruby/object:Gem::Version
36
- version: '6.0'
22
+ version: '6.1'
37
23
  type: :runtime
38
24
  prerelease: false
39
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,120 +29,134 @@ dependencies:
43
29
  version: '4.0'
44
30
  - - "<"
45
31
  - !ruby/object:Gem::Version
46
- version: '6.0'
32
+ version: '6.1'
47
33
  - !ruby/object:Gem::Dependency
48
- name: rake
34
+ name: hashids
49
35
  requirement: !ruby/object:Gem::Requirement
50
36
  requirements:
51
37
  - - "~>"
52
38
  - !ruby/object:Gem::Version
53
- version: '10.0'
39
+ version: '1.0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: codeclimate-test-reporter
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '0.5'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '10.0'
60
+ version: '0.5'
61
61
  - !ruby/object:Gem::Dependency
62
- name: rspec
62
+ name: coveralls
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '3.0'
67
+ version: '0.8'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '3.0'
74
+ version: '0.8'
75
75
  - !ruby/object:Gem::Dependency
76
- name: sqlite3
76
+ name: rake
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '1.3'
81
+ version: '10.0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '1.3'
88
+ version: '10.0'
89
89
  - !ruby/object:Gem::Dependency
90
- name: rubocop
90
+ name: rspec
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - '='
93
+ - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 0.37.2
95
+ version: '3.0'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - '='
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 0.37.2
102
+ version: '3.0'
103
103
  - !ruby/object:Gem::Dependency
104
- name: rubocop-rspec
104
+ name: rubocop
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - '='
107
+ - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: 1.4.0
109
+ version: 0.54.0
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - '='
114
+ - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: 1.4.0
116
+ version: 0.54.0
117
117
  - !ruby/object:Gem::Dependency
118
- name: simplecov
118
+ name: rubocop-rspec
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '0.11'
123
+ version: 1.24.0
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '0.11'
130
+ version: 1.24.0
131
131
  - !ruby/object:Gem::Dependency
132
- name: coveralls
132
+ name: simplecov
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '0.8'
137
+ version: '0.11'
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: '0.8'
144
+ version: '0.11'
145
145
  - !ruby/object:Gem::Dependency
146
- name: codeclimate-test-reporter
146
+ name: sqlite3
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '0.5'
151
+ version: '1.3'
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: '0.5'
159
- description: Use Hashids in ActiveRecord effectively.
158
+ version: '1.3'
159
+ description: Use Youtube-Like ID in ActiveRecord seamlessly.
160
160
  email:
161
161
  - daisuketaniwaki@gmail.com
162
162
  executables:
@@ -165,6 +165,7 @@ executables:
165
165
  extensions: []
166
166
  extra_rdoc_files: []
167
167
  files:
168
+ - ".gem_release.yml"
168
169
  - ".gitignore"
169
170
  - ".rspec"
170
171
  - ".rubocop.yml"
@@ -189,7 +190,7 @@ homepage: https://github.com/dtaniwaki/acts_as_hashids
189
190
  licenses:
190
191
  - MIT
191
192
  metadata: {}
192
- post_install_message:
193
+ post_install_message:
193
194
  rdoc_options: []
194
195
  require_paths:
195
196
  - lib
@@ -200,18 +201,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
201
  version: 2.2.2
201
202
  - - "<"
202
203
  - !ruby/object:Gem::Version
203
- version: '2.5'
204
+ version: '3.0'
204
205
  required_rubygems_version: !ruby/object:Gem::Requirement
205
206
  requirements:
206
207
  - - ">="
207
208
  - !ruby/object:Gem::Version
208
209
  version: '0'
209
210
  requirements: []
210
- rubyforge_project:
211
- rubygems_version: 2.6.8
212
- signing_key:
211
+ rubygems_version: 3.1.2
212
+ signing_key:
213
213
  specification_version: 4
214
- summary: Hashids in ActiveRecord effectively.
214
+ summary: Use Youtube-Like ID in ActiveRecord seamlessly.
215
215
  test_files:
216
216
  - spec/acts_as_hashids/core_spec.rb
217
217
  - spec/acts_as_hashids/methods_spec.rb