lite-uxid 1.0.3 → 1.0.8

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
2
  SHA256:
3
- metadata.gz: f097d6940ba5a48c1e0abc585373595a1445cca093efb20f8e1043a1d68befb0
4
- data.tar.gz: 55883b58633a5cdf3e01e5cd85d3c8ede048b43ac73c3fa7706e49ddf81c816d
3
+ metadata.gz: 46a682a5b8665f23e50bcd330c9d9c8a83edf34bf944a478d6048ca5d500de22
4
+ data.tar.gz: cd7e879aa52bfddb016c0900826ae0bd321ea294f5671306ece55c94ab6a3fcc
5
5
  SHA512:
6
- metadata.gz: f0a0f82a7509fb845d5a86c0f52fe8ce7138fa602203dc7a0296d98325787e8f9aa2feecfb2edd839ef41605d23e81d6072b36e53c27d3fb0ef47f5a172fcc82
7
- data.tar.gz: 85bda358c26cd64b5a9b2d1e994543eca653250748a4df35a22428daf973041dc63654ac5fd7d046108248c7da61727ca579b9ace9b2556c5d014a4f0c85ac90
6
+ metadata.gz: f510611e353949ad0aa1ce52486c984378382bca15a08f082ab516679f120d121d0f39f6299e53d7685ded9c17062fd92263517e3b8394d7f2220a0d1ce51427
7
+ data.tar.gz: 79636eb6ed08cd6edc0219774fb5ffaa6895b249d6d9bea3520017480ec15f8c286ab3d1686bd74cbb988cdef88761cea79515d430acc95598c36a3e9db5da97
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: 2.7
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,6 +18,14 @@ 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/**/**/*'
@@ -24,3 +36,5 @@ Style/Documentation:
24
36
  Enabled: false
25
37
  Style/ExpandPathArguments:
26
38
  Enabled: false
39
+ Style/SlicingWithRange:
40
+ 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,21 +6,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.8] - 2021-05-07
10
+ ### Changed
11
+ - Linter fixes
12
+
13
+ ## [1.0.7] - 2019-08-26
14
+ ### Added
15
+ - Added ruby 2.7 support
16
+ - Added prevention of Nanoid collision when using with active_record
17
+ ### Changed
18
+ - Renamed Hash to Hashid
19
+
20
+ ## [1.0.6] - 2019-08-26
21
+ ### Changed
22
+ - Improved how configuration works
23
+ ### Removed
24
+ - Remove active_record requirement that are already provided by Rails
25
+
26
+ ## [1.0.5] - 2019-08-24
27
+ ### Changed
28
+ - Improved how configuration works
29
+
30
+ ## [1.0.4] - 2019-08-15
31
+ ### Changed
32
+ - Underscore initializer file name
33
+
9
34
  ## [1.0.3] - 2019-07-31
10
35
  ### Added
11
36
  - Added benchmarks
12
37
  ### Changed
13
38
  - Changed instance method names to match class names
14
- - Changed nanoid encoder to be faster
15
- - Changed ulid encoder to be faster
39
+ - Changed Nanoid encoder to be faster
40
+ - Changed Ulid encoder to be faster
16
41
 
17
42
  ## [1.0.2] - 2019-07-30
18
43
  ### Added
19
- - Added nanoid
44
+ - Added Nanoid
20
45
 
21
46
  ## [1.0.1] - 2019-06-25
22
47
  ### Removed
23
- - Remove unused activesupport dependency
48
+ - Remove unused active_support dependency
24
49
 
25
50
  ## [1.0.0] - 2019-06-25
26
51
  ### Added
data/Gemfile.lock CHANGED
@@ -1,120 +1,136 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-uxid (1.0.3)
4
+ lite-uxid (1.0.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- actionpack (5.2.3)
10
- actionview (= 5.2.3)
11
- activesupport (= 5.2.3)
12
- rack (~> 2.0)
9
+ actionpack (6.1.3.2)
10
+ actionview (= 6.1.3.2)
11
+ activesupport (= 6.1.3.2)
12
+ rack (~> 2.0, >= 2.0.9)
13
13
  rack-test (>= 0.6.3)
14
14
  rails-dom-testing (~> 2.0)
15
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
16
- actionview (5.2.3)
17
- activesupport (= 5.2.3)
15
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
16
+ actionview (6.1.3.2)
17
+ activesupport (= 6.1.3.2)
18
18
  builder (~> 3.1)
19
19
  erubi (~> 1.4)
20
20
  rails-dom-testing (~> 2.0)
21
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
22
- activemodel (5.2.3)
23
- activesupport (= 5.2.3)
24
- activerecord (5.2.3)
25
- activemodel (= 5.2.3)
26
- activesupport (= 5.2.3)
27
- arel (>= 9.0)
28
- activesupport (5.2.3)
21
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
22
+ activemodel (6.1.3.2)
23
+ activesupport (= 6.1.3.2)
24
+ activerecord (6.1.3.2)
25
+ activemodel (= 6.1.3.2)
26
+ activesupport (= 6.1.3.2)
27
+ activesupport (6.1.3.2)
29
28
  concurrent-ruby (~> 1.0, >= 1.0.2)
30
- i18n (>= 0.7, < 2)
31
- minitest (~> 5.1)
32
- tzinfo (~> 1.1)
33
- arel (9.0.0)
34
- ast (2.4.0)
35
- 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)
36
35
  colorize (0.8.1)
37
- concurrent-ruby (1.1.5)
38
- crass (1.0.4)
39
- database_cleaner (1.7.0)
40
- diff-lcs (1.3)
41
- erubi (1.8.0)
42
- fasterer (0.6.0)
36
+ concurrent-ruby (1.1.8)
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.0)
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)
43
47
  colorize (~> 0.7)
44
- ruby_parser (>= 3.13.0)
48
+ ruby_parser (>= 3.14.1)
45
49
  generator_spec (0.9.4)
46
50
  activesupport (>= 3.0.0)
47
51
  railties (>= 3.0.0)
48
- i18n (1.6.0)
52
+ i18n (1.8.10)
49
53
  concurrent-ruby (~> 1.0)
50
- jaro_winkler (1.5.3)
51
- loofah (2.2.3)
54
+ loofah (2.9.1)
52
55
  crass (~> 1.0.2)
53
56
  nokogiri (>= 1.5.9)
54
- method_source (0.9.2)
55
- mini_portile2 (2.4.0)
56
- minitest (5.11.3)
57
- nokogiri (1.10.3)
58
- mini_portile2 (~> 2.4.0)
59
- parallel (1.17.0)
60
- parser (2.6.3.0)
61
- ast (~> 2.4.0)
62
- rack (2.0.7)
57
+ method_source (1.0.0)
58
+ mini_portile2 (2.5.1)
59
+ minitest (5.14.4)
60
+ nokogiri (1.11.3)
61
+ mini_portile2 (~> 2.5.0)
62
+ racc (~> 1.4)
63
+ parallel (1.20.1)
64
+ parser (3.0.1.1)
65
+ ast (~> 2.4.1)
66
+ racc (1.5.2)
67
+ rack (2.2.3)
63
68
  rack-test (1.1.0)
64
69
  rack (>= 1.0, < 3)
65
70
  rails-dom-testing (2.0.3)
66
71
  activesupport (>= 4.2.0)
67
72
  nokogiri (>= 1.6)
68
- rails-html-sanitizer (1.0.4)
69
- loofah (~> 2.2, >= 2.2.2)
70
- railties (5.2.3)
71
- actionpack (= 5.2.3)
72
- activesupport (= 5.2.3)
73
+ rails-html-sanitizer (1.3.0)
74
+ loofah (~> 2.3)
75
+ railties (6.1.3.2)
76
+ actionpack (= 6.1.3.2)
77
+ activesupport (= 6.1.3.2)
73
78
  method_source
74
79
  rake (>= 0.8.7)
75
- thor (>= 0.19.0, < 2.0)
80
+ thor (~> 1.0)
76
81
  rainbow (3.0.0)
77
- rake (12.3.3)
78
- rspec (3.8.0)
79
- rspec-core (~> 3.8.0)
80
- rspec-expectations (~> 3.8.0)
81
- rspec-mocks (~> 3.8.0)
82
- rspec-core (3.8.2)
83
- rspec-support (~> 3.8.0)
84
- rspec-expectations (3.8.4)
82
+ rake (13.0.3)
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)
85
92
  diff-lcs (>= 1.2.0, < 2.0)
86
- rspec-support (~> 3.8.0)
87
- rspec-mocks (3.8.1)
93
+ rspec-support (~> 3.10.0)
94
+ rspec-mocks (3.10.2)
88
95
  diff-lcs (>= 1.2.0, < 2.0)
89
- rspec-support (~> 3.8.0)
90
- rspec-support (3.8.2)
91
- rubocop (0.73.0)
92
- jaro_winkler (~> 1.5.1)
96
+ rspec-support (~> 3.10.0)
97
+ rspec-support (3.10.2)
98
+ rubocop (1.14.0)
93
99
  parallel (~> 1.10)
94
- parser (>= 2.6)
100
+ parser (>= 3.0.0.0)
95
101
  rainbow (>= 2.2.2, < 4.0)
102
+ regexp_parser (>= 1.8, < 3.0)
103
+ rexml
104
+ rubocop-ast (>= 1.5.0, < 2.0)
96
105
  ruby-progressbar (~> 1.7)
97
- unicode-display_width (>= 1.4.0, < 1.7)
98
- rubocop-performance (1.4.1)
99
- rubocop (>= 0.71.0)
100
- rubocop-rspec (1.34.0)
101
- rubocop (>= 0.60.0)
102
- ruby-progressbar (1.10.1)
103
- ruby_parser (3.13.1)
106
+ unicode-display_width (>= 1.4.0, < 3.0)
107
+ rubocop-ast (1.5.0)
108
+ parser (>= 3.0.1.1)
109
+ rubocop-performance (1.11.3)
110
+ rubocop (>= 1.7.0, < 2.0)
111
+ rubocop-ast (>= 0.4.0)
112
+ rubocop-rake (0.5.1)
113
+ rubocop
114
+ rubocop-rspec (2.3.0)
115
+ rubocop (~> 1.0)
116
+ rubocop-ast (>= 1.1.0)
117
+ ruby-progressbar (1.11.0)
118
+ ruby_parser (3.15.1)
104
119
  sexp_processor (~> 4.9)
105
- sexp_processor (4.12.1)
106
- sqlite3 (1.4.1)
107
- thor (0.20.3)
108
- thread_safe (0.3.6)
109
- tzinfo (1.2.5)
110
- thread_safe (~> 0.1)
111
- unicode-display_width (1.6.0)
120
+ sexp_processor (4.15.2)
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.17
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)
@@ -37,7 +37,7 @@ Or install it yourself as:
37
37
  ## Configuration
38
38
 
39
39
  `rails g lite:uxid:install` will generate the following file:
40
- `../config/initalizers/lite-uxid.rb`
40
+ `../config/initalizers/lite_uxid.rb`
41
41
 
42
42
  ```ruby
43
43
  Lite::Uxid.configure do |config|
@@ -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
@@ -9,7 +9,7 @@ module Lite
9
9
  source_root File.expand_path('../templates', __FILE__)
10
10
 
11
11
  def copy_initializer_file
12
- copy_file('install.rb', 'config/initializers/lite-uxid.rb')
12
+ copy_file('install.rb', 'config/initializers/lite_uxid.rb')
13
13
  end
14
14
 
15
15
  end
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
@@ -15,16 +15,22 @@ module Lite
15
15
 
16
16
  end
17
17
 
18
- def self.configuration
19
- @configuration ||= Configuration.new
20
- end
18
+ class << self
21
19
 
22
- def self.configuration=(config)
23
- @configuration = config
24
- end
20
+ attr_writer :configuration
21
+
22
+ def configuration
23
+ @configuration ||= Configuration.new
24
+ end
25
+
26
+ def configure
27
+ yield(configuration)
28
+ end
29
+
30
+ def reset_configuration!
31
+ @configuration = Configuration.new
32
+ end
25
33
 
26
- def self.configure
27
- yield(configuration)
28
34
  end
29
35
 
30
36
  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.3'
6
+ VERSION = '1.0.8'
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
 
@@ -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.3
4
+ version: 1.0.8
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-07-31 00:00:00.000000000 Z
11
+ date: 2021-05-07 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.17
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: []