encoded_id-rails 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of encoded_id-rails might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/encoded_id/rails/version.rb +1 -1
- data/lib/encoded_id/rails.rb +3 -2
- data/lib/generators/encoded_id/rails/USAGE +1 -1
- data/lib/generators/encoded_id/rails/install_generator.rb +1 -1
- data/lib/generators/encoded_id/rails/templates/encoded_id.rb +2 -2
- data/sig/encoded_id/rails.rbs +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe9c0b9513dfdf8a610a5c9a518b1a17aba9a4f4a35702fbc5fd792bf19b03ca
|
4
|
+
data.tar.gz: f4608f0b323f1e54e4bc1b08df66a9ec99998aaebe047f7e577c7db724b093c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6dee975ecb993c901706f39b39f6bee2fb0a6f2ee64bae36039c863c5229c6f9268cb098e5c8aee03fa383aee401466ae1520b689318ab7aa60024d88f98999
|
7
|
+
data.tar.gz: b4f6293c7185cea8e5d997c5fc6f2d54499b621b5888e0a6f2a5891c7dd59f4eaa7efa7d067d8f61263441a5d83baaed14d34f5b1bcb3759b3466985a32634f2
|
data/README.md
CHANGED
data/lib/encoded_id/rails.rb
CHANGED
@@ -8,10 +8,11 @@ module EncodedId
|
|
8
8
|
module Rails
|
9
9
|
# Configuration
|
10
10
|
class << self
|
11
|
-
|
11
|
+
def configuration
|
12
|
+
@configuration ||= Configuration.new
|
13
|
+
end
|
12
14
|
|
13
15
|
def configure
|
14
|
-
@configuration ||= Configuration.new
|
15
16
|
yield(configuration) if block_given?
|
16
17
|
configuration
|
17
18
|
end
|
@@ -5,7 +5,7 @@ require "rails/generators/base"
|
|
5
5
|
module EncodedId
|
6
6
|
module Rails
|
7
7
|
module Generators
|
8
|
-
# The Install generator `encoded_id
|
8
|
+
# The Install generator `encoded_id:rails:install`
|
9
9
|
class InstallGenerator < ::Rails::Generators::Base
|
10
10
|
source_root File.expand_path(__dir__)
|
11
11
|
|
@@ -5,7 +5,7 @@ EncodedId::Rails.configure do |config|
|
|
5
5
|
# a different encoded ID. You must configure one and it must be longer that 4 characters. It can be configured on a
|
6
6
|
# model by model basis too.
|
7
7
|
#
|
8
|
-
# config.salt = "
|
8
|
+
# config.salt = "<%= SecureRandom.hex(24) %>"
|
9
9
|
|
10
10
|
# The number of characters of the encoded ID that are grouped before the hyphen separator is inserted.
|
11
11
|
# `nil` disables grouping.
|
@@ -23,7 +23,7 @@ EncodedId::Rails.configure do |config|
|
|
23
23
|
#
|
24
24
|
# Default: a reduced character set Crockford alphabet and split groups, see https://www.crockford.com/wrmg/base32.html
|
25
25
|
#
|
26
|
-
# config.alphabet = "
|
26
|
+
# config.alphabet = ::EncodedId::Alphabet.new("0123456789abcdef")
|
27
27
|
|
28
28
|
# The minimum length of the encoded ID. Note that this is not a hard limit, the actual length may be longer as hash IDs
|
29
29
|
# may expand the length as needed to encode the full input. However encoded IDs will never be shorter than this.
|
data/sig/encoded_id/rails.rbs
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: encoded_id-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Ierodiaconou
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
47
|
+
version: '0.4'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
54
|
+
version: '0.4'
|
55
55
|
description: Write a longer description or delete this line.
|
56
56
|
email:
|
57
57
|
- stevegeek@gmail.com
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
|
-
rubygems_version: 3.3.
|
102
|
+
rubygems_version: 3.3.26
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: Use EncodedIds with ActiveRecord models
|