lite-uxid 1.0.6 → 1.1.1

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: b0f574e15cdd7048ec0fa01a581ffc9b87cc23280232bd65be19cecfde8f2bec
4
- data.tar.gz: 729e58e8c0c9bb0dd4946d864897a412503aac7501e79716fdd0664b589cf53b
3
+ metadata.gz: e869d1d146c2ce777313940f5dd7aafb116833a25c58a6406f6c7997447db3a9
4
+ data.tar.gz: 407c818ad8e2011e04ae3892b0be2ed8b16603bff763f807a64a688d555a8b67
5
5
  SHA512:
6
- metadata.gz: 4ef8ffeaf8e8a1eebfd8e42b0a372613471de344947db842bb5016cc960cd4b0a9b907ae9f8542984ef87b5690ddf932de1d020c1997d02e653317df06f7842f
7
- data.tar.gz: 3a2a1be1875ee5e1d54d0547b954f749a3ba9b5cd494556fe8a38143c282c38500c333d280edbdd15a4b71cf789043705335a9476fc8dcdd39d43f4d1743bb36
6
+ metadata.gz: 4953005e5259d0d1e41224b8d80f49e22def3eda90b9d3f9511f907c1a4a45a461251efd130ea879eb46228faf56f85960b60ab616819ef5c48db5d0a3145853
7
+ data.tar.gz: b19964d4c7a4c2ed46ca335fb4679e0a11056247f550eb8e7e8caa938bdf47383c5ea1ca3a69b5ffaa0e6ee4ecd7c0fe8f8e04b6f9305d3bee38b94c8cdb8393
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,11 +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.1] - 2021-07-21
10
+ ### Changed
11
+ - Improved Railtie support
12
+
13
+ ## [1.1.0] - 2021-07-19
14
+ ### Added
15
+ - Added Ruby 3.0 support
16
+
17
+ ## [1.0.8] - 2021-05-07
18
+ ### Changed
19
+ - Linter fixes
20
+
21
+ ## [1.0.7] - 2019-08-26
22
+ ### Added
23
+ - Added ruby 2.7 support
24
+ - Added prevention of Nanoid collision when using with active_record
25
+ ### Changed
26
+ - Renamed Hash to Hashid
27
+
9
28
  ## [1.0.6] - 2019-08-26
10
29
  ### Changed
11
30
  - Improved how configuration works
12
31
  ### Removed
13
- - Remove activerecord and activesupport requirements that are already provided by Rails
32
+ - Remove active_record requirement that are already provided by Rails
14
33
 
15
34
  ## [1.0.5] - 2019-08-24
16
35
  ### Changed
@@ -25,16 +44,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
25
44
  - Added benchmarks
26
45
  ### Changed
27
46
  - Changed instance method names to match class names
28
- - Changed nanoid encoder to be faster
29
- - Changed ulid encoder to be faster
47
+ - Changed Nanoid encoder to be faster
48
+ - Changed Ulid encoder to be faster
30
49
 
31
50
  ## [1.0.2] - 2019-07-30
32
51
  ### Added
33
- - Added nanoid
52
+ - Added Nanoid
34
53
 
35
54
  ## [1.0.1] - 2019-06-25
36
55
  ### Removed
37
- - Remove unused activesupport dependency
56
+ - Remove unused active_support dependency
38
57
 
39
58
  ## [1.0.0] - 2019-06-25
40
59
  ### Added
data/Gemfile.lock CHANGED
@@ -1,114 +1,129 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-uxid (1.0.6)
4
+ lite-uxid (1.1.1)
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
@@ -125,8 +140,9 @@ DEPENDENCIES
125
140
  rspec
126
141
  rubocop
127
142
  rubocop-performance
143
+ rubocop-rake
128
144
  rubocop-rspec
129
145
  sqlite3
130
146
 
131
147
  BUNDLED WITH
132
- 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
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rails/generators'
4
-
5
3
  module Lite
6
4
  module Uxid
7
5
  class InstallGenerator < Rails::Generators::Base
data/lib/lite/uxid.rb CHANGED
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'generators/lite/uxid/install_generator' if defined?(Rails::Generators)
4
+
3
5
  %w[version configuration base].each do |name|
4
6
  require "lite/uxid/#{name}"
5
7
  end
6
8
 
7
- %w[hash nanoid ulid].each do |name|
9
+ %w[hashid nanoid ulid].each do |name|
8
10
  require "lite/uxid/record/#{name}"
9
11
  require "lite/uxid/#{name}"
10
12
  end
11
-
12
- require 'generators/lite/uxid/install_generator'
@@ -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,7 +14,7 @@ module Lite
14
14
  end
15
15
 
16
16
  def encode
17
- encoding_chars.split('').sample(encoding_length).join
17
+ encoding_chars.chars.sample(encoding_length).join
18
18
  end
19
19
 
20
20
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support'
3
+ require 'active_support' unless defined?(ActiveSupport)
4
4
 
5
5
  module Lite
6
6
  module Uxid
7
7
  module Record
8
- module Hash
8
+ module Hashid
9
9
 
10
10
  extend ActiveSupport::Concern
11
11
 
@@ -15,7 +15,7 @@ module Lite
15
15
 
16
16
  class_methods do
17
17
  def find_by_uxid(uxid)
18
- decoded_id = Lite::Uxid::Hash.decode(uxid)
18
+ decoded_id = Lite::Uxid::Hashid.decode(uxid)
19
19
  find_by(id: decoded_id)
20
20
  end
21
21
 
@@ -30,13 +30,13 @@ module Lite
30
30
  def uxid_to_id
31
31
  return unless respond_to?(:uxid)
32
32
 
33
- Lite::Uxid::Hash.decode(uxid)
33
+ Lite::Uxid::Hashid.decode(uxid)
34
34
  end
35
35
 
36
36
  private
37
37
 
38
38
  def callback_generate_uxid!
39
- hash = Lite::Uxid::Hash.encode(id)
39
+ hash = Lite::Uxid::Hashid.encode(id)
40
40
  update_column(:uxid, hash)
41
41
  end
42
42
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support'
3
+ require 'active_support' unless defined?(ActiveSupport)
4
4
 
5
5
  module Lite
6
6
  module Uxid
@@ -29,7 +29,14 @@ module Lite
29
29
  private
30
30
 
31
31
  def callback_generate_uxid!
32
- 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
33
40
  end
34
41
 
35
42
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support'
3
+ require 'active_support' unless defined?(ActiveSupport)
4
4
 
5
5
  module Lite
6
6
  module Uxid
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'securerandom'
3
+ require 'securerandom' unless defined?(SecureRandom)
4
4
 
5
5
  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.6'
6
+ VERSION = '1.1.1'
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.
@@ -47,6 +47,7 @@ Gem::Specification.new do |spec|
47
47
  spec.add_development_dependency 'rspec'
48
48
  spec.add_development_dependency 'rubocop'
49
49
  spec.add_development_dependency 'rubocop-performance'
50
+ spec.add_development_dependency 'rubocop-rake'
50
51
  spec.add_development_dependency 'rubocop-rspec'
51
52
  spec.add_development_dependency 'sqlite3'
52
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.6
4
+ version: 1.1.1
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-26 00:00:00.000000000 Z
11
+ date: 2021-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
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'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: rubocop-rspec
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -178,7 +192,7 @@ dependencies:
178
192
  - - ">="
179
193
  - !ruby/object:Gem::Version
180
194
  version: '0'
181
- description:
195
+ description:
182
196
  email:
183
197
  - j.gomez@drexed.com
184
198
  executables: []
@@ -206,9 +220,9 @@ files:
206
220
  - lib/lite/uxid.rb
207
221
  - lib/lite/uxid/base.rb
208
222
  - lib/lite/uxid/configuration.rb
209
- - lib/lite/uxid/hash.rb
223
+ - lib/lite/uxid/hashid.rb
210
224
  - lib/lite/uxid/nanoid.rb
211
- - lib/lite/uxid/record/hash.rb
225
+ - lib/lite/uxid/record/hashid.rb
212
226
  - lib/lite/uxid/record/nanoid.rb
213
227
  - lib/lite/uxid/record/ulid.rb
214
228
  - lib/lite/uxid/ulid.rb
@@ -218,7 +232,7 @@ homepage: http://drexed.github.io/lite-uxid
218
232
  licenses:
219
233
  - MIT
220
234
  metadata: {}
221
- post_install_message:
235
+ post_install_message:
222
236
  rdoc_options: []
223
237
  require_paths:
224
238
  - lib
@@ -233,8 +247,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
247
  - !ruby/object:Gem::Version
234
248
  version: '0'
235
249
  requirements: []
236
- rubygems_version: 3.0.4
237
- signing_key:
250
+ rubygems_version: 3.2.24
251
+ signing_key:
238
252
  specification_version: 4
239
- summary: Generate or obfuscate Hash or ULID based Id's
253
+ summary: Generate or obfuscate Id's using different patterns
240
254
  test_files: []