lite-uxid 1.0.5 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +19 -3
- data/.travis.yml +1 -0
- data/CHANGELOG.md +26 -5
- data/Gemfile.lock +94 -77
- data/README.md +14 -13
- data/benchmarks/compare.rb +2 -2
- data/lib/lite/uxid.rb +1 -1
- data/lib/lite/uxid/{hash.rb → hashid.rb} +1 -1
- data/lib/lite/uxid/nanoid.rb +1 -10
- data/lib/lite/uxid/record/{hash.rb → hashid.rb} +4 -5
- data/lib/lite/uxid/record/nanoid.rb +8 -2
- data/lib/lite/uxid/record/ulid.rb +0 -1
- data/lib/lite/uxid/ulid.rb +1 -1
- data/lib/lite/uxid/version.rb +1 -1
- data/lite-uxid.gemspec +4 -2
- metadata +38 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba3ace509b30efb7ec9d3c4a44b64d6391a57f00b6dd8944361ba2a302bd2b78
|
4
|
+
data.tar.gz: e4da3231b451b9f47269b54a7498e2d1bf8c668480e2fd9e7a4c34c6b46879f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c35db134cd36fdff0135be45fe8b8c77ead4f24e1d95bfb7d6c48392754783e206f2bfa034dc44cfdff858df5e42464959f44c290fc7f24211e94e51316b6f34
|
7
|
+
data.tar.gz: 16c21a1ddbf0423c095ad89fc2ed604e4692829a180bd01acd62c29cc3df85e1d5e6984162599423b5c080ff5aa78f83c9da564ba8dcb00ddfeb3252a0a0262d
|
data/.rubocop.yml
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
require:
|
2
2
|
- rubocop-performance
|
3
|
+
- rubocop-rake
|
3
4
|
- rubocop-rspec
|
4
5
|
AllCops:
|
5
|
-
TargetRubyVersion:
|
6
|
+
TargetRubyVersion: 3.0
|
7
|
+
NewCops: enable
|
6
8
|
DisplayCopNames: true
|
7
9
|
DisplayStyleGuide: true
|
8
|
-
|
9
|
-
|
10
|
+
Gemspec/RequiredRubyVersion:
|
11
|
+
Enabled: false
|
12
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
13
|
+
Enabled: true
|
10
14
|
Layout/EmptyLinesAroundBlockBody:
|
11
15
|
Exclude:
|
12
16
|
- 'spec/**/**/*'
|
@@ -14,13 +18,25 @@ Layout/EmptyLinesAroundClassBody:
|
|
14
18
|
EnforcedStyle: empty_lines_except_namespace
|
15
19
|
Layout/EmptyLinesAroundModuleBody:
|
16
20
|
EnforcedStyle: empty_lines_except_namespace
|
21
|
+
Layout/LineLength:
|
22
|
+
Max: 100
|
23
|
+
Layout/SpaceAroundMethodCallOperator:
|
24
|
+
Enabled: true
|
25
|
+
Lint/RaiseException:
|
26
|
+
Enabled: true
|
27
|
+
Lint/StructNewOverride:
|
28
|
+
Enabled: true
|
17
29
|
Metrics/BlockLength:
|
18
30
|
Exclude:
|
19
31
|
- 'spec/**/**/*'
|
20
32
|
- '*.gemspec'
|
21
33
|
RSpec/MultipleExpectations:
|
22
34
|
Enabled: false
|
35
|
+
Style/ArgumentsForwarding:
|
36
|
+
Enabled: false
|
23
37
|
Style/Documentation:
|
24
38
|
Enabled: false
|
25
39
|
Style/ExpandPathArguments:
|
26
40
|
Enabled: false
|
41
|
+
Style/SlicingWithRange:
|
42
|
+
Enabled: false
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -6,9 +6,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.1.0] - 2021-07-19
|
10
|
+
### Added
|
11
|
+
- Added Ruby 3.0 support
|
12
|
+
|
13
|
+
## [1.0.8] - 2021-05-07
|
14
|
+
### Changed
|
15
|
+
- Linter fixes
|
16
|
+
|
17
|
+
## [1.0.7] - 2019-08-26
|
18
|
+
### Added
|
19
|
+
- Added ruby 2.7 support
|
20
|
+
- Added prevention of Nanoid collision when using with active_record
|
21
|
+
### Changed
|
22
|
+
- Renamed Hash to Hashid
|
23
|
+
|
24
|
+
## [1.0.6] - 2019-08-26
|
25
|
+
### Changed
|
26
|
+
- Improved how configuration works
|
27
|
+
### Removed
|
28
|
+
- Remove active_record requirement that are already provided by Rails
|
29
|
+
|
9
30
|
## [1.0.5] - 2019-08-24
|
10
31
|
### Changed
|
11
|
-
-
|
32
|
+
- Improved how configuration works
|
12
33
|
|
13
34
|
## [1.0.4] - 2019-08-15
|
14
35
|
### Changed
|
@@ -19,16 +40,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
19
40
|
- Added benchmarks
|
20
41
|
### Changed
|
21
42
|
- Changed instance method names to match class names
|
22
|
-
- Changed
|
23
|
-
- Changed
|
43
|
+
- Changed Nanoid encoder to be faster
|
44
|
+
- Changed Ulid encoder to be faster
|
24
45
|
|
25
46
|
## [1.0.2] - 2019-07-30
|
26
47
|
### Added
|
27
|
-
- Added
|
48
|
+
- Added Nanoid
|
28
49
|
|
29
50
|
## [1.0.1] - 2019-06-25
|
30
51
|
### Removed
|
31
|
-
- Remove unused
|
52
|
+
- Remove unused active_support dependency
|
32
53
|
|
33
54
|
## [1.0.0] - 2019-06-25
|
34
55
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -1,120 +1,136 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lite-uxid (1.0
|
4
|
+
lite-uxid (1.1.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
actionpack (6.
|
10
|
-
actionview (= 6.
|
11
|
-
activesupport (= 6.
|
12
|
-
rack (~> 2.0)
|
9
|
+
actionpack (6.1.4)
|
10
|
+
actionview (= 6.1.4)
|
11
|
+
activesupport (= 6.1.4)
|
12
|
+
rack (~> 2.0, >= 2.0.9)
|
13
13
|
rack-test (>= 0.6.3)
|
14
14
|
rails-dom-testing (~> 2.0)
|
15
15
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
16
|
-
actionview (6.
|
17
|
-
activesupport (= 6.
|
16
|
+
actionview (6.1.4)
|
17
|
+
activesupport (= 6.1.4)
|
18
18
|
builder (~> 3.1)
|
19
19
|
erubi (~> 1.4)
|
20
20
|
rails-dom-testing (~> 2.0)
|
21
21
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
22
|
-
activemodel (6.
|
23
|
-
activesupport (= 6.
|
24
|
-
activerecord (6.
|
25
|
-
activemodel (= 6.
|
26
|
-
activesupport (= 6.
|
27
|
-
activesupport (6.
|
22
|
+
activemodel (6.1.4)
|
23
|
+
activesupport (= 6.1.4)
|
24
|
+
activerecord (6.1.4)
|
25
|
+
activemodel (= 6.1.4)
|
26
|
+
activesupport (= 6.1.4)
|
27
|
+
activesupport (6.1.4)
|
28
28
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
29
|
-
i18n (>=
|
30
|
-
minitest (
|
31
|
-
tzinfo (~>
|
32
|
-
zeitwerk (~> 2.
|
33
|
-
ast (2.4.
|
34
|
-
builder (3.2.
|
29
|
+
i18n (>= 1.6, < 2)
|
30
|
+
minitest (>= 5.1)
|
31
|
+
tzinfo (~> 2.0)
|
32
|
+
zeitwerk (~> 2.3)
|
33
|
+
ast (2.4.2)
|
34
|
+
builder (3.2.4)
|
35
35
|
colorize (0.8.1)
|
36
|
-
concurrent-ruby (1.1.
|
37
|
-
crass (1.0.
|
38
|
-
database_cleaner (
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
concurrent-ruby (1.1.9)
|
37
|
+
crass (1.0.6)
|
38
|
+
database_cleaner (2.0.1)
|
39
|
+
database_cleaner-active_record (~> 2.0.0)
|
40
|
+
database_cleaner-active_record (2.0.1)
|
41
|
+
activerecord (>= 5.a)
|
42
|
+
database_cleaner-core (~> 2.0.0)
|
43
|
+
database_cleaner-core (2.0.1)
|
44
|
+
diff-lcs (1.4.4)
|
45
|
+
erubi (1.10.0)
|
46
|
+
fasterer (0.9.0)
|
42
47
|
colorize (~> 0.7)
|
43
|
-
ruby_parser (>= 3.
|
48
|
+
ruby_parser (>= 3.14.1)
|
44
49
|
generator_spec (0.9.4)
|
45
50
|
activesupport (>= 3.0.0)
|
46
51
|
railties (>= 3.0.0)
|
47
|
-
i18n (1.
|
52
|
+
i18n (1.8.10)
|
48
53
|
concurrent-ruby (~> 1.0)
|
49
|
-
|
50
|
-
loofah (2.2.3)
|
54
|
+
loofah (2.10.0)
|
51
55
|
crass (~> 1.0.2)
|
52
56
|
nokogiri (>= 1.5.9)
|
53
|
-
method_source (0.
|
54
|
-
mini_portile2 (2.
|
55
|
-
minitest (5.
|
56
|
-
nokogiri (1.
|
57
|
-
mini_portile2 (~> 2.
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
57
|
+
method_source (1.0.0)
|
58
|
+
mini_portile2 (2.5.3)
|
59
|
+
minitest (5.14.4)
|
60
|
+
nokogiri (1.11.7)
|
61
|
+
mini_portile2 (~> 2.5.0)
|
62
|
+
racc (~> 1.4)
|
63
|
+
parallel (1.20.1)
|
64
|
+
parser (3.0.2.0)
|
65
|
+
ast (~> 2.4.1)
|
66
|
+
racc (1.5.2)
|
67
|
+
rack (2.2.3)
|
62
68
|
rack-test (1.1.0)
|
63
69
|
rack (>= 1.0, < 3)
|
64
70
|
rails-dom-testing (2.0.3)
|
65
71
|
activesupport (>= 4.2.0)
|
66
72
|
nokogiri (>= 1.6)
|
67
|
-
rails-html-sanitizer (1.
|
68
|
-
loofah (~> 2.
|
69
|
-
railties (6.
|
70
|
-
actionpack (= 6.
|
71
|
-
activesupport (= 6.
|
73
|
+
rails-html-sanitizer (1.3.0)
|
74
|
+
loofah (~> 2.3)
|
75
|
+
railties (6.1.4)
|
76
|
+
actionpack (= 6.1.4)
|
77
|
+
activesupport (= 6.1.4)
|
72
78
|
method_source
|
73
|
-
rake (>= 0.
|
74
|
-
thor (
|
79
|
+
rake (>= 0.13)
|
80
|
+
thor (~> 1.0)
|
75
81
|
rainbow (3.0.0)
|
76
|
-
rake (
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
rspec-
|
81
|
-
|
82
|
-
rspec-
|
83
|
-
rspec-
|
82
|
+
rake (13.0.6)
|
83
|
+
regexp_parser (2.1.1)
|
84
|
+
rexml (3.2.5)
|
85
|
+
rspec (3.10.0)
|
86
|
+
rspec-core (~> 3.10.0)
|
87
|
+
rspec-expectations (~> 3.10.0)
|
88
|
+
rspec-mocks (~> 3.10.0)
|
89
|
+
rspec-core (3.10.1)
|
90
|
+
rspec-support (~> 3.10.0)
|
91
|
+
rspec-expectations (3.10.1)
|
84
92
|
diff-lcs (>= 1.2.0, < 2.0)
|
85
|
-
rspec-support (~> 3.
|
86
|
-
rspec-mocks (3.
|
93
|
+
rspec-support (~> 3.10.0)
|
94
|
+
rspec-mocks (3.10.2)
|
87
95
|
diff-lcs (>= 1.2.0, < 2.0)
|
88
|
-
rspec-support (~> 3.
|
89
|
-
rspec-support (3.
|
90
|
-
rubocop (
|
91
|
-
jaro_winkler (~> 1.5.1)
|
96
|
+
rspec-support (~> 3.10.0)
|
97
|
+
rspec-support (3.10.2)
|
98
|
+
rubocop (1.18.3)
|
92
99
|
parallel (~> 1.10)
|
93
|
-
parser (>=
|
100
|
+
parser (>= 3.0.0.0)
|
94
101
|
rainbow (>= 2.2.2, < 4.0)
|
102
|
+
regexp_parser (>= 1.8, < 3.0)
|
103
|
+
rexml
|
104
|
+
rubocop-ast (>= 1.7.0, < 2.0)
|
95
105
|
ruby-progressbar (~> 1.7)
|
96
|
-
unicode-display_width (>= 1.4.0, <
|
97
|
-
rubocop-
|
98
|
-
|
99
|
-
rubocop-
|
100
|
-
rubocop (>=
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
106
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
107
|
+
rubocop-ast (1.8.0)
|
108
|
+
parser (>= 3.0.1.1)
|
109
|
+
rubocop-performance (1.11.4)
|
110
|
+
rubocop (>= 1.7.0, < 2.0)
|
111
|
+
rubocop-ast (>= 0.4.0)
|
112
|
+
rubocop-rake (0.6.0)
|
113
|
+
rubocop (~> 1.0)
|
114
|
+
rubocop-rspec (2.4.0)
|
115
|
+
rubocop (~> 1.0)
|
116
|
+
rubocop-ast (>= 1.1.0)
|
117
|
+
ruby-progressbar (1.11.0)
|
118
|
+
ruby_parser (3.16.0)
|
119
|
+
sexp_processor (~> 4.15, >= 4.15.1)
|
120
|
+
sexp_processor (4.15.3)
|
121
|
+
sqlite3 (1.4.2)
|
122
|
+
thor (1.1.0)
|
123
|
+
tzinfo (2.0.4)
|
124
|
+
concurrent-ruby (~> 1.0)
|
125
|
+
unicode-display_width (2.0.0)
|
126
|
+
zeitwerk (2.4.2)
|
112
127
|
|
113
128
|
PLATFORMS
|
114
129
|
ruby
|
115
130
|
|
116
131
|
DEPENDENCIES
|
117
132
|
activerecord
|
133
|
+
activesupport
|
118
134
|
bundler
|
119
135
|
database_cleaner
|
120
136
|
fasterer
|
@@ -124,8 +140,9 @@ DEPENDENCIES
|
|
124
140
|
rspec
|
125
141
|
rubocop
|
126
142
|
rubocop-performance
|
143
|
+
rubocop-rake
|
127
144
|
rubocop-rspec
|
128
145
|
sqlite3
|
129
146
|
|
130
147
|
BUNDLED WITH
|
131
|
-
2.
|
148
|
+
2.2.24
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/lite-uxid.svg)](http://badge.fury.io/rb/lite-uxid)
|
4
4
|
[![Build Status](https://travis-ci.org/drexed/lite-uxid.svg?branch=master)](https://travis-ci.org/drexed/lite-uxid)
|
5
5
|
|
6
|
-
Lite::Uxid is a library for generating or obfuscating Id's based on
|
6
|
+
Lite::Uxid is a library for generating or obfuscating Id's based on different patterns.
|
7
7
|
It's very useful to hide the number of resources in your database and protect against enumeration attacks.
|
8
8
|
|
9
9
|
**NOTE:** If you are coming from `ActiveUxid`, please read the [port](#port) section.
|
@@ -27,7 +27,7 @@ Or install it yourself as:
|
|
27
27
|
## Table of Contents
|
28
28
|
|
29
29
|
* [Configuration](#configuration)
|
30
|
-
* [
|
30
|
+
* [Hashid](#hashid)
|
31
31
|
* [NanoID](#nanoid)
|
32
32
|
* [ULID](#ulid)
|
33
33
|
* [ActiveRecord](#active_record)
|
@@ -47,13 +47,13 @@ Lite::Uxid.configure do |config|
|
|
47
47
|
end
|
48
48
|
```
|
49
49
|
|
50
|
-
##
|
50
|
+
## Hashid
|
51
51
|
|
52
|
-
|
52
|
+
Hashid's are reversible and is the most performant generator.
|
53
53
|
|
54
54
|
```ruby
|
55
|
-
Lite::Uxid::
|
56
|
-
Lite::Uxid::
|
55
|
+
Lite::Uxid::Hashid.encode(10) #=> 'q5D8inm0'
|
56
|
+
Lite::Uxid::Hashid.decode('q5D8inm0') #=> 10
|
57
57
|
```
|
58
58
|
|
59
59
|
## NanoID
|
@@ -80,7 +80,7 @@ Add the following attribute to all corresponding tables.
|
|
80
80
|
|
81
81
|
```ruby
|
82
82
|
# omitted
|
83
|
-
t.binary :uxid,
|
83
|
+
t.binary :uxid, index: { unique: true }
|
84
84
|
# omitted
|
85
85
|
```
|
86
86
|
|
@@ -90,7 +90,7 @@ All `nanoid` and `uxid` attributes will be automatically generated and applied w
|
|
90
90
|
|
91
91
|
```ruby
|
92
92
|
class User < ActiveRecord::Base
|
93
|
-
include Lite::Uxid::Record::
|
93
|
+
include Lite::Uxid::Record::Hashid
|
94
94
|
|
95
95
|
# - or -
|
96
96
|
|
@@ -104,19 +104,20 @@ end
|
|
104
104
|
|
105
105
|
**Usage**
|
106
106
|
|
107
|
-
|
107
|
+
Using one of the mixins above provides a handy method to find records by uxid.
|
108
108
|
|
109
109
|
```ruby
|
110
|
-
User.
|
111
|
-
User.
|
110
|
+
User.find_by_uxid('x123') #=> Find record by uxid
|
111
|
+
User.find_by_uxid!('x123') #=> Raises an ActiveRecord::RecordNotFound error if not found
|
112
112
|
|
113
|
+
# The following method is for Hashid based Uxid's.
|
113
114
|
user = User.new
|
114
|
-
user.
|
115
|
+
user.uxid_to_id #=> Decodes the records uxid to id (only for Hashid based Id's)
|
115
116
|
```
|
116
117
|
|
117
118
|
## Benchmarks
|
118
119
|
|
119
|
-
The classes ranked from fastest to slowest are `
|
120
|
+
The classes ranked from fastest to slowest are `Hashid`, `Nanoid`, and `Ulid`.
|
120
121
|
|
121
122
|
View how each compares by running the [benchmarks](https://github.com/drexed/lite-uxid/tree/master/benchmarks).
|
122
123
|
|
data/benchmarks/compare.rb
CHANGED
data/lib/lite/uxid.rb
CHANGED
data/lib/lite/uxid/nanoid.rb
CHANGED
@@ -14,16 +14,7 @@ module Lite
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def encode
|
17
|
-
|
18
|
-
len = encoding_length
|
19
|
-
chars = encoding_chars.split(str)
|
20
|
-
|
21
|
-
while len.positive?
|
22
|
-
str += chars.sample
|
23
|
-
len -= 1
|
24
|
-
end
|
25
|
-
|
26
|
-
str
|
17
|
+
encoding_chars.chars.sample(encoding_length).join
|
27
18
|
end
|
28
19
|
|
29
20
|
end
|
@@ -1,12 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'active_record'
|
4
3
|
require 'active_support'
|
5
4
|
|
6
5
|
module Lite
|
7
6
|
module Uxid
|
8
7
|
module Record
|
9
|
-
module
|
8
|
+
module Hashid
|
10
9
|
|
11
10
|
extend ActiveSupport::Concern
|
12
11
|
|
@@ -16,7 +15,7 @@ module Lite
|
|
16
15
|
|
17
16
|
class_methods do
|
18
17
|
def find_by_uxid(uxid)
|
19
|
-
decoded_id = Lite::Uxid::
|
18
|
+
decoded_id = Lite::Uxid::Hashid.decode(uxid)
|
20
19
|
find_by(id: decoded_id)
|
21
20
|
end
|
22
21
|
|
@@ -31,13 +30,13 @@ module Lite
|
|
31
30
|
def uxid_to_id
|
32
31
|
return unless respond_to?(:uxid)
|
33
32
|
|
34
|
-
Lite::Uxid::
|
33
|
+
Lite::Uxid::Hashid.decode(uxid)
|
35
34
|
end
|
36
35
|
|
37
36
|
private
|
38
37
|
|
39
38
|
def callback_generate_uxid!
|
40
|
-
hash = Lite::Uxid::
|
39
|
+
hash = Lite::Uxid::Hashid.encode(id)
|
41
40
|
update_column(:uxid, hash)
|
42
41
|
end
|
43
42
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'active_record'
|
4
3
|
require 'active_support'
|
5
4
|
|
6
5
|
module Lite
|
@@ -30,7 +29,14 @@ module Lite
|
|
30
29
|
private
|
31
30
|
|
32
31
|
def callback_generate_uxid!
|
33
|
-
|
32
|
+
random_nanoid = nil
|
33
|
+
|
34
|
+
loop do
|
35
|
+
random_nanoid = Lite::Uxid::Nanoid.encode
|
36
|
+
break unless self.class.exists?(uxid: random_nanoid)
|
37
|
+
end
|
38
|
+
|
39
|
+
self.uxid = random_nanoid
|
34
40
|
end
|
35
41
|
|
36
42
|
end
|
data/lib/lite/uxid/ulid.rb
CHANGED
data/lib/lite/uxid/version.rb
CHANGED
data/lite-uxid.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.authors = ['Juan Gomez']
|
11
11
|
spec.email = %w[j.gomez@drexed.com]
|
12
12
|
|
13
|
-
spec.summary = "Generate or obfuscate
|
13
|
+
spec.summary = "Generate or obfuscate Id's using different patterns"
|
14
14
|
spec.homepage = 'http://drexed.github.io/lite-uxid'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
)
|
26
26
|
else
|
27
27
|
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
28
|
-
|
28
|
+
'public gem pushes.'
|
29
29
|
end
|
30
30
|
|
31
31
|
# Specify which files should be added to the gem when it is released.
|
@@ -38,6 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.require_paths = %w[lib]
|
39
39
|
|
40
40
|
spec.add_development_dependency 'activerecord'
|
41
|
+
spec.add_development_dependency 'activesupport'
|
41
42
|
spec.add_development_dependency 'bundler'
|
42
43
|
spec.add_development_dependency 'database_cleaner'
|
43
44
|
spec.add_development_dependency 'fasterer'
|
@@ -46,6 +47,7 @@ Gem::Specification.new do |spec|
|
|
46
47
|
spec.add_development_dependency 'rspec'
|
47
48
|
spec.add_development_dependency 'rubocop'
|
48
49
|
spec.add_development_dependency 'rubocop-performance'
|
50
|
+
spec.add_development_dependency 'rubocop-rake'
|
49
51
|
spec.add_development_dependency 'rubocop-rspec'
|
50
52
|
spec.add_development_dependency 'sqlite3'
|
51
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lite-uxid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +150,20 @@ dependencies:
|
|
136
150
|
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop-rake
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
139
167
|
- !ruby/object:Gem::Dependency
|
140
168
|
name: rubocop-rspec
|
141
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,7 +192,7 @@ dependencies:
|
|
164
192
|
- - ">="
|
165
193
|
- !ruby/object:Gem::Version
|
166
194
|
version: '0'
|
167
|
-
description:
|
195
|
+
description:
|
168
196
|
email:
|
169
197
|
- j.gomez@drexed.com
|
170
198
|
executables: []
|
@@ -192,9 +220,9 @@ files:
|
|
192
220
|
- lib/lite/uxid.rb
|
193
221
|
- lib/lite/uxid/base.rb
|
194
222
|
- lib/lite/uxid/configuration.rb
|
195
|
-
- lib/lite/uxid/
|
223
|
+
- lib/lite/uxid/hashid.rb
|
196
224
|
- lib/lite/uxid/nanoid.rb
|
197
|
-
- lib/lite/uxid/record/
|
225
|
+
- lib/lite/uxid/record/hashid.rb
|
198
226
|
- lib/lite/uxid/record/nanoid.rb
|
199
227
|
- lib/lite/uxid/record/ulid.rb
|
200
228
|
- lib/lite/uxid/ulid.rb
|
@@ -204,7 +232,7 @@ homepage: http://drexed.github.io/lite-uxid
|
|
204
232
|
licenses:
|
205
233
|
- MIT
|
206
234
|
metadata: {}
|
207
|
-
post_install_message:
|
235
|
+
post_install_message:
|
208
236
|
rdoc_options: []
|
209
237
|
require_paths:
|
210
238
|
- lib
|
@@ -219,8 +247,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
247
|
- !ruby/object:Gem::Version
|
220
248
|
version: '0'
|
221
249
|
requirements: []
|
222
|
-
rubygems_version: 3.
|
223
|
-
signing_key:
|
250
|
+
rubygems_version: 3.2.24
|
251
|
+
signing_key:
|
224
252
|
specification_version: 4
|
225
|
-
summary: Generate or obfuscate
|
253
|
+
summary: Generate or obfuscate Id's using different patterns
|
226
254
|
test_files: []
|