lite-uxid 1.0.8 → 1.1.3

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: 46a682a5b8665f23e50bcd330c9d9c8a83edf34bf944a478d6048ca5d500de22
4
- data.tar.gz: cd7e879aa52bfddb016c0900826ae0bd321ea294f5671306ece55c94ab6a3fcc
3
+ metadata.gz: 6f8006571de0a1f66c804d3c3e5fd9aeab60be7ef80d5e04b30d08cdee9a4426
4
+ data.tar.gz: 6ec85db8db509ff3fc06aafc2a3095aba7761bf6688923bbff25f7167b1daf97
5
5
  SHA512:
6
- metadata.gz: f510611e353949ad0aa1ce52486c984378382bca15a08f082ab516679f120d121d0f39f6299e53d7685ded9c17062fd92263517e3b8394d7f2220a0d1ce51427
7
- data.tar.gz: 79636eb6ed08cd6edc0219774fb5ffaa6895b249d6d9bea3520017480ec15f8c286ab3d1686bd74cbb988cdef88761cea79515d430acc95598c36a3e9db5da97
6
+ metadata.gz: 185195e88da652756f517b592c274b07737309f42fe6dd7a10701e3677629c224e4247f20d2e51706f933ee4153635af06f39169e1ec0eaedc6db6cc2f66c585
7
+ data.tar.gz: '0686eed4e263e0719107af86fb9aa3c55acb82ddcd30694a1fbcac6d5d5b383e2b365b1f17c29be60deb76717b8e6734d31a052c0fa75e799e53c8a69b5026bf'
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ require:
3
3
  - rubocop-rake
4
4
  - rubocop-rspec
5
5
  AllCops:
6
- TargetRubyVersion: 2.7
6
+ TargetRubyVersion: 3.0
7
7
  NewCops: enable
8
8
  DisplayCopNames: true
9
9
  DisplayStyleGuide: true
@@ -32,6 +32,8 @@ Metrics/BlockLength:
32
32
  - '*.gemspec'
33
33
  RSpec/MultipleExpectations:
34
34
  Enabled: false
35
+ Style/ArgumentsForwarding:
36
+ Enabled: false
35
37
  Style/Documentation:
36
38
  Enabled: false
37
39
  Style/ExpandPathArguments:
data/CHANGELOG.md CHANGED
@@ -6,6 +6,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.1.3] - 2021-07-30
10
+ ### Changed
11
+ - Skip uxid callback on records where its being assigned
12
+
13
+ ## [1.1.2] - 2021-07-22
14
+ ### Changed
15
+ - Improved setup
16
+
17
+ ## [1.1.1] - 2021-07-21
18
+ ### Changed
19
+ - Improved Railtie support
20
+
21
+ ## [1.1.0] - 2021-07-19
22
+ ### Added
23
+ - Added Ruby 3.0 support
24
+
9
25
  ## [1.0.8] - 2021-05-07
10
26
  ### Changed
11
27
  - Linter fixes
data/Gemfile.lock CHANGED
@@ -1,30 +1,30 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-uxid (1.0.8)
4
+ lite-uxid (1.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- actionpack (6.1.3.2)
10
- actionview (= 6.1.3.2)
11
- activesupport (= 6.1.3.2)
9
+ actionpack (6.1.4)
10
+ actionview (= 6.1.4)
11
+ activesupport (= 6.1.4)
12
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.1.3.2)
17
- activesupport (= 6.1.3.2)
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.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)
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
29
  i18n (>= 1.6, < 2)
30
30
  minitest (>= 5.1)
@@ -33,11 +33,11 @@ GEM
33
33
  ast (2.4.2)
34
34
  builder (3.2.4)
35
35
  colorize (0.8.1)
36
- concurrent-ruby (1.1.8)
36
+ concurrent-ruby (1.1.9)
37
37
  crass (1.0.6)
38
38
  database_cleaner (2.0.1)
39
39
  database_cleaner-active_record (~> 2.0.0)
40
- database_cleaner-active_record (2.0.0)
40
+ database_cleaner-active_record (2.0.1)
41
41
  activerecord (>= 5.a)
42
42
  database_cleaner-core (~> 2.0.0)
43
43
  database_cleaner-core (2.0.1)
@@ -51,17 +51,17 @@ GEM
51
51
  railties (>= 3.0.0)
52
52
  i18n (1.8.10)
53
53
  concurrent-ruby (~> 1.0)
54
- loofah (2.9.1)
54
+ loofah (2.10.0)
55
55
  crass (~> 1.0.2)
56
56
  nokogiri (>= 1.5.9)
57
57
  method_source (1.0.0)
58
- mini_portile2 (2.5.1)
58
+ mini_portile2 (2.5.3)
59
59
  minitest (5.14.4)
60
- nokogiri (1.11.3)
60
+ nokogiri (1.11.7)
61
61
  mini_portile2 (~> 2.5.0)
62
62
  racc (~> 1.4)
63
63
  parallel (1.20.1)
64
- parser (3.0.1.1)
64
+ parser (3.0.2.0)
65
65
  ast (~> 2.4.1)
66
66
  racc (1.5.2)
67
67
  rack (2.2.3)
@@ -72,14 +72,14 @@ GEM
72
72
  nokogiri (>= 1.6)
73
73
  rails-html-sanitizer (1.3.0)
74
74
  loofah (~> 2.3)
75
- railties (6.1.3.2)
76
- actionpack (= 6.1.3.2)
77
- activesupport (= 6.1.3.2)
75
+ railties (6.1.4)
76
+ actionpack (= 6.1.4)
77
+ activesupport (= 6.1.4)
78
78
  method_source
79
- rake (>= 0.8.7)
79
+ rake (>= 0.13)
80
80
  thor (~> 1.0)
81
81
  rainbow (3.0.0)
82
- rake (13.0.3)
82
+ rake (13.0.6)
83
83
  regexp_parser (2.1.1)
84
84
  rexml (3.2.5)
85
85
  rspec (3.10.0)
@@ -95,29 +95,29 @@ GEM
95
95
  diff-lcs (>= 1.2.0, < 2.0)
96
96
  rspec-support (~> 3.10.0)
97
97
  rspec-support (3.10.2)
98
- rubocop (1.14.0)
98
+ rubocop (1.18.4)
99
99
  parallel (~> 1.10)
100
100
  parser (>= 3.0.0.0)
101
101
  rainbow (>= 2.2.2, < 4.0)
102
102
  regexp_parser (>= 1.8, < 3.0)
103
103
  rexml
104
- rubocop-ast (>= 1.5.0, < 2.0)
104
+ rubocop-ast (>= 1.8.0, < 2.0)
105
105
  ruby-progressbar (~> 1.7)
106
106
  unicode-display_width (>= 1.4.0, < 3.0)
107
- rubocop-ast (1.5.0)
107
+ rubocop-ast (1.8.0)
108
108
  parser (>= 3.0.1.1)
109
- rubocop-performance (1.11.3)
109
+ rubocop-performance (1.11.4)
110
110
  rubocop (>= 1.7.0, < 2.0)
111
111
  rubocop-ast (>= 0.4.0)
112
- rubocop-rake (0.5.1)
113
- rubocop
114
- rubocop-rspec (2.3.0)
112
+ rubocop-rake (0.6.0)
113
+ rubocop (~> 1.0)
114
+ rubocop-rspec (2.4.0)
115
115
  rubocop (~> 1.0)
116
116
  rubocop-ast (>= 1.1.0)
117
117
  ruby-progressbar (1.11.0)
118
- ruby_parser (3.15.1)
119
- sexp_processor (~> 4.9)
120
- sexp_processor (4.15.2)
118
+ ruby_parser (3.16.0)
119
+ sexp_processor (~> 4.15, >= 4.15.1)
120
+ sexp_processor (4.15.3)
121
121
  sqlite3 (1.4.2)
122
122
  thor (1.1.0)
123
123
  tzinfo (2.0.4)
@@ -145,4 +145,4 @@ DEPENDENCIES
145
145
  sqlite3
146
146
 
147
147
  BUNDLED WITH
148
- 2.2.17
148
+ 2.2.24
@@ -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,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- %w[version configuration base].each do |name|
4
- require "lite/uxid/#{name}"
5
- end
3
+ require 'generators/lite/uxid/install_generator' if defined?(Rails::Generators)
6
4
 
7
- %w[hashid nanoid ulid].each do |name|
8
- require "lite/uxid/record/#{name}"
9
- require "lite/uxid/#{name}"
10
- end
11
-
12
- require 'generators/lite/uxid/install_generator'
5
+ require 'lite/uxid/version'
6
+ require 'lite/uxid/configuration'
7
+ require 'lite/uxid/base'
8
+ require 'lite/uxid/record/hashid'
9
+ require 'lite/uxid/record/nanoid'
10
+ require 'lite/uxid/record/ulid'
11
+ require 'lite/uxid/hashid'
12
+ require 'lite/uxid/nanoid'
13
+ require 'lite/uxid/ulid'
@@ -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
@@ -10,7 +10,7 @@ module Lite
10
10
  extend ActiveSupport::Concern
11
11
 
12
12
  included do
13
- after_create :callback_generate_uxid!, if: proc { respond_to?(:uxid) }
13
+ after_create :callback_generate_uxid!, if: proc { respond_to?(:uxid) && !uxid? }
14
14
  end
15
15
 
16
16
  class_methods do
@@ -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
@@ -10,7 +10,7 @@ module Lite
10
10
  extend ActiveSupport::Concern
11
11
 
12
12
  included do
13
- before_create :callback_generate_uxid!, if: proc { respond_to?(:uxid) }
13
+ before_create :callback_generate_uxid!, if: proc { respond_to?(:uxid) && !uxid? }
14
14
  end
15
15
 
16
16
  class_methods do
@@ -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
@@ -10,7 +10,7 @@ module Lite
10
10
  extend ActiveSupport::Concern
11
11
 
12
12
  included do
13
- before_create :callback_generate_uxid!, if: proc { respond_to?(:uxid) }
13
+ before_create :callback_generate_uxid!, if: proc { respond_to?(:uxid) && !uxid? }
14
14
  end
15
15
 
16
16
  class_methods do
@@ -1,6 +1,6 @@
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
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Uxid
5
5
 
6
- VERSION = '1.0.8'
6
+ VERSION = '1.1.3'
7
7
 
8
8
  end
9
9
  end
data/lite-uxid.gemspec CHANGED
@@ -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.
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.8
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-07 00:00:00.000000000 Z
11
+ date: 2021-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.2.17
250
+ rubygems_version: 3.2.24
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: Generate or obfuscate Id's using different patterns