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 +5 -5
- data/.gem_release.yml +2 -0
- data/.rubocop.yml +19 -4
- data/.travis.yml +34 -14
- data/Gemfile +1 -0
- data/README.md +19 -3
- data/Rakefile +1 -1
- data/acts_as_hashids.gemspec +10 -11
- data/lib/acts_as_hashids/core.rb +11 -1
- data/lib/acts_as_hashids/version.rb +1 -1
- data/spec/acts_as_hashids/core_spec.rb +49 -21
- data/spec/acts_as_hashids/methods_spec.rb +22 -15
- data/spec/spec_helper.rb +1 -1
- metadata +54 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3596c432648776928bf2fe96c990526a1e19b11f044944c0a79685f29b5e8265
|
4
|
+
data.tar.gz: 5cffe582bcdc4e4e24f003d60ac1628027663e37e05762206e734763b63ed524
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77c7368b389110f15973ab0de7023ac2b3d5aa263ba1e3ca09ebbf1528ac10c047697a9f37b5fea84301fe4639be99d214fce2ab996a003651cde8d32eca0736
|
7
|
+
data.tar.gz: d2d6098dad02a66f9c1c3c8b973d06383bb108a3f302a39f5ac8262926ae1da7cb2299c6a0c49e0edf898df55ac892c0bc0b5bcf3849463ea0cc67ca4879ddf0
|
data/.gem_release.yml
ADDED
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
|
-
|
28
|
+
Layout/IndentHash:
|
27
29
|
EnforcedStyle: consistent
|
28
|
-
|
30
|
+
Layout/IndentArray:
|
29
31
|
EnforcedStyle: consistent
|
30
|
-
|
31
|
-
|
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.
|
5
|
-
- 2.
|
6
|
-
- 2.
|
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
|
16
|
-
env: ACTIVE_RECORD_VERSION=4.0.0
|
17
|
-
- rvm: 2.4
|
18
|
-
env: ACTIVE_RECORD_VERSION=4.1.0
|
19
|
-
|
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
|
-
|
24
|
-
- bundler
|
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
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
|
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
|
-
[
|
110
|
-
[
|
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
data/acts_as_hashids.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
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 = '
|
14
|
-
spec.description = 'Use
|
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', '<
|
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 '
|
31
|
-
spec.add_development_dependency 'rubocop', '
|
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 '
|
35
|
-
spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.5'
|
34
|
+
spec.add_development_dependency 'sqlite3', '~> 1.3'
|
36
35
|
end
|
data/lib/acts_as_hashids/core.rb
CHANGED
@@ -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
|
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
|
@@ -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(
|
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 {
|
44
|
-
ActiveRecord::RecordNotFound, "Couldn't find CoreFoo with 'id'=\"
|
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(
|
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 {
|
73
|
+
expect { model.find(%w[bMab Qgab]) }.to raise_error(
|
56
74
|
ActiveRecord::RecordNotFound,
|
57
|
-
"Couldn't find all CoreFoos with 'id': (\"
|
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(
|
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
|
69
|
-
let
|
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
|
-
|
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
|
-
|
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(
|
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 {
|
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
|
-
|
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(
|
34
|
+
expect(model.hashids_secret).to eq 'MethodsFoo'
|
34
35
|
end
|
35
36
|
context 'for STI' do
|
36
|
-
|
37
|
-
|
37
|
+
subject(:model) { create_model 'MethodsFoo', base: MethodsBar }
|
38
|
+
|
38
39
|
it 'returns the base class name' do
|
39
|
-
|
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(
|
48
|
+
expect(model.hashids_secret).to eq '^_^'
|
46
49
|
end
|
47
50
|
context 'with executable secret' do
|
48
|
-
subject { create_model 'MethodsFoo', secret: -> { "#{
|
51
|
+
subject(:model) { create_model 'MethodsFoo', secret: -> { "#{name} ^_^" } }
|
52
|
+
|
49
53
|
it 'returns the custom secret' do
|
50
|
-
expect(
|
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(
|
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(
|
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(
|
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
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
|
+
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:
|
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.
|
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.
|
32
|
+
version: '6.1'
|
47
33
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
34
|
+
name: hashids
|
49
35
|
requirement: !ruby/object:Gem::Requirement
|
50
36
|
requirements:
|
51
37
|
- - "~>"
|
52
38
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
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: '
|
60
|
+
version: '0.5'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: coveralls
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
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: '
|
74
|
+
version: '0.8'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
76
|
+
name: rake
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
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: '
|
88
|
+
version: '10.0'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
90
|
+
name: rspec
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- -
|
93
|
+
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 0
|
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
|
102
|
+
version: '3.0'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
|
-
name: rubocop
|
104
|
+
name: rubocop
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
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:
|
116
|
+
version: 0.54.0
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
118
|
+
name: rubocop-rspec
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
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:
|
130
|
+
version: 1.24.0
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
132
|
+
name: simplecov
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: '0.
|
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.
|
144
|
+
version: '0.11'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
|
-
name:
|
146
|
+
name: sqlite3
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
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: '
|
159
|
-
description: Use
|
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: '
|
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
|
-
|
211
|
-
|
212
|
-
signing_key:
|
211
|
+
rubygems_version: 3.1.2
|
212
|
+
signing_key:
|
213
213
|
specification_version: 4
|
214
|
-
summary:
|
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
|