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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8be203a82fb5be33425623c0bd52bc6110f4f97de51501da2c8c763b668dc465
4
- data.tar.gz: 253bc5163a665d238902c9374d0dbe61d0fd12a6994bd26e4cc1747b171ebf2a
3
+ metadata.gz: ba3ace509b30efb7ec9d3c4a44b64d6391a57f00b6dd8944361ba2a302bd2b78
4
+ data.tar.gz: e4da3231b451b9f47269b54a7498e2d1bf8c668480e2fd9e7a4c34c6b46879f1
5
5
  SHA512:
6
- metadata.gz: b343368500c61fccbfc03b4abeae974fca94b48bb74582048e58abeec23b2b8dfb2693db1e5860c7b50f8477fb898b7574e32cec49da663a03cf3c295d823107
7
- data.tar.gz: ed19875ca19e5619d328143373ddeb687a3b541fd14b9575bb3b233ec102b38faaa68ec4db736738b8e383ac9e4599933e21311ee39d00f21374b9e4fc1b0924
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: 2.6
6
+ TargetRubyVersion: 3.0
7
+ NewCops: enable
6
8
  DisplayCopNames: true
7
9
  DisplayStyleGuide: true
8
- LineLength:
9
- Max: 100
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
@@ -4,6 +4,7 @@ cache: bundler
4
4
  rvm:
5
5
  - 2.5
6
6
  - 2.6
7
+ - 2.7
7
8
  - ruby-head
8
9
  matrix:
9
10
  fast_finish: true
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
- - Imporved how configuration works
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 nanoid encoder to be faster
23
- - Changed ulid encoder to be faster
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 nanoid
48
+ - Added Nanoid
28
49
 
29
50
  ## [1.0.1] - 2019-06-25
30
51
  ### Removed
31
- - Remove unused activesupport dependency
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.5)
4
+ lite-uxid (1.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- actionpack (6.0.0)
10
- actionview (= 6.0.0)
11
- activesupport (= 6.0.0)
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.0.0)
17
- activesupport (= 6.0.0)
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.0.0)
23
- activesupport (= 6.0.0)
24
- activerecord (6.0.0)
25
- activemodel (= 6.0.0)
26
- activesupport (= 6.0.0)
27
- activesupport (6.0.0)
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 (>= 0.7, < 2)
30
- minitest (~> 5.1)
31
- tzinfo (~> 1.1)
32
- zeitwerk (~> 2.1, >= 2.1.8)
33
- ast (2.4.0)
34
- builder (3.2.3)
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.5)
37
- crass (1.0.4)
38
- database_cleaner (1.7.0)
39
- diff-lcs (1.3)
40
- erubi (1.8.0)
41
- fasterer (0.6.0)
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.13.0)
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.6.0)
52
+ i18n (1.8.10)
48
53
  concurrent-ruby (~> 1.0)
49
- jaro_winkler (1.5.3)
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.9.2)
54
- mini_portile2 (2.4.0)
55
- minitest (5.11.3)
56
- nokogiri (1.10.4)
57
- mini_portile2 (~> 2.4.0)
58
- parallel (1.17.0)
59
- parser (2.6.3.0)
60
- ast (~> 2.4.0)
61
- rack (2.0.7)
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.2.0)
68
- loofah (~> 2.2, >= 2.2.2)
69
- railties (6.0.0)
70
- actionpack (= 6.0.0)
71
- activesupport (= 6.0.0)
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.8.7)
74
- thor (>= 0.20.3, < 2.0)
79
+ rake (>= 0.13)
80
+ thor (~> 1.0)
75
81
  rainbow (3.0.0)
76
- rake (12.3.3)
77
- rspec (3.8.0)
78
- rspec-core (~> 3.8.0)
79
- rspec-expectations (~> 3.8.0)
80
- rspec-mocks (~> 3.8.0)
81
- rspec-core (3.8.2)
82
- rspec-support (~> 3.8.0)
83
- rspec-expectations (3.8.4)
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.8.0)
86
- rspec-mocks (3.8.1)
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.8.0)
89
- rspec-support (3.8.2)
90
- rubocop (0.74.0)
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 (>= 2.6)
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, < 1.7)
97
- rubocop-performance (1.4.1)
98
- rubocop (>= 0.71.0)
99
- rubocop-rspec (1.35.0)
100
- rubocop (>= 0.60.0)
101
- ruby-progressbar (1.10.1)
102
- ruby_parser (3.13.1)
103
- sexp_processor (~> 4.9)
104
- sexp_processor (4.12.1)
105
- sqlite3 (1.4.1)
106
- thor (0.20.3)
107
- thread_safe (0.3.6)
108
- tzinfo (1.2.5)
109
- thread_safe (~> 0.1)
110
- unicode-display_width (1.6.0)
111
- zeitwerk (2.1.9)
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.0.1
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 Hash and ULID algorithms.
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
- * [Hash](#hash)
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
- ## Hash
50
+ ## Hashid
51
51
 
52
- Hash ID's are reversible and is the most performant generator.
52
+ Hashid's are reversible and is the most performant generator.
53
53
 
54
54
  ```ruby
55
- Lite::Uxid::Hash.encode(10) #=> 'q5D8inm0'
56
- Lite::Uxid::Hash.decode('q5D8inm0') #=> 10
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, limit: 26, index: { unique: true }
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::Hash
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
- The following methods are for Hash based Uxid's.
107
+ Using one of the mixins above provides a handy method to find records by uxid.
108
108
 
109
109
  ```ruby
110
- User.find_by_ulid('x123') #=> Find record by uxid
111
- User.find_by_ulid!('x123') #=> Raises an ActiveRecord::RecordNotFound error if not found
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.hash_to_id #=> Decodes the records uxid to id (only for Hash based Id's)
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 `Hash`, `Nanoid`, and `Ulid`.
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
 
@@ -6,8 +6,8 @@ require 'benchmark/ips'
6
6
  require 'lite/uxid'
7
7
 
8
8
  Benchmark.ips do |x|
9
- x.report('Hash') do
10
- Lite::Uxid::Hash.encode(rand(1..1_000_000))
9
+ x.report('Hashid') do
10
+ Lite::Uxid::Hashid.encode(rand(1..1_000_000))
11
11
  end
12
12
 
13
13
  x.report('NanoID') do
data/lib/lite/uxid.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  require "lite/uxid/#{name}"
5
5
  end
6
6
 
7
- %w[hash nanoid ulid].each do |name|
7
+ %w[hashid nanoid ulid].each do |name|
8
8
  require "lite/uxid/record/#{name}"
9
9
  require "lite/uxid/#{name}"
10
10
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Lite
4
4
  module Uxid
5
- class Hash < Lite::Uxid::Base
5
+ class Hashid < Lite::Uxid::Base
6
6
 
7
7
  def initialize(id)
8
8
  @id = id
@@ -14,16 +14,7 @@ module Lite
14
14
  end
15
15
 
16
16
  def encode
17
- str = ''
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 Hash
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::Hash.decode(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::Hash.decode(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::Hash.encode(id)
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
- self.uxid = Lite::Uxid::Nanoid.encode
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
@@ -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
@@ -6,7 +6,7 @@ module Lite
6
6
  module Uxid
7
7
  class Ulid < Lite::Uxid::Base
8
8
 
9
- MASK ||= 0x1f
9
+ MASK = 0x1f
10
10
 
11
11
  class << self
12
12
 
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Uxid
5
5
 
6
- VERSION ||= '1.0.5'
6
+ VERSION = '1.1.0'
7
7
 
8
8
  end
9
9
  end
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 Hash or ULID based Id's"
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
- 'public gem pushes.'
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.5
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: 2019-08-24 00:00:00.000000000 Z
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/hash.rb
223
+ - lib/lite/uxid/hashid.rb
196
224
  - lib/lite/uxid/nanoid.rb
197
- - lib/lite/uxid/record/hash.rb
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.0.4
223
- signing_key:
250
+ rubygems_version: 3.2.24
251
+ signing_key:
224
252
  specification_version: 4
225
- summary: Generate or obfuscate Hash or ULID based Id's
253
+ summary: Generate or obfuscate Id's using different patterns
226
254
  test_files: []