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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6f08a83b8af33caeaff9e8773d18ff826e6ead353efa52aed89e19d94b8bb75
4
- data.tar.gz: 874279bb397caf6ec7fb5bfe5596cde2424195e58c7230cce986d7b3e5b51057
3
+ metadata.gz: fe9c0b9513dfdf8a610a5c9a518b1a17aba9a4f4a35702fbc5fd792bf19b03ca
4
+ data.tar.gz: f4608f0b323f1e54e4bc1b08df66a9ec99998aaebe047f7e577c7db724b093c3
5
5
  SHA512:
6
- metadata.gz: bcaa0ef9e037f2e333b323846df8bc9daea30e58fd3b5cb906531bfe7bf3c79884e30dbb13d38be92a891c4cdc69effbf4b358f15c76dfb1eccbbc37284882a9
7
- data.tar.gz: 82572b25da35bce009de4d00f98c61c9fc96f96ea2df93b722d73a3c2908793d43081e3ec25c4998ff92013eba3cdbcb32abf192757deff0252635317b5684ee
6
+ metadata.gz: e6dee975ecb993c901706f39b39f6bee2fb0a6f2ee64bae36039c863c5229c6f9268cb098e5c8aee03fa383aee401466ae1520b689318ab7aa60024d88f98999
7
+ data.tar.gz: b4f6293c7185cea8e5d997c5fc6f2d54499b621b5888e0a6f2a5891c7dd59f4eaa7efa7d067d8f61263441a5d83baaed14d34f5b1bcb3759b3466985a32634f2
data/README.md CHANGED
@@ -49,7 +49,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
49
49
 
50
50
  Then run the generator to add the initializer:
51
51
 
52
- rails g encoded_id-rails:install
52
+ rails g encoded_id:rails:install
53
53
 
54
54
  ## Usage
55
55
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module EncodedId
4
4
  module Rails
5
- VERSION = "0.1.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
@@ -8,10 +8,11 @@ module EncodedId
8
8
  module Rails
9
9
  # Configuration
10
10
  class << self
11
- attr_reader :configuration
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
@@ -1,3 +1,3 @@
1
1
  Creates an initialiser:
2
2
 
3
- rails generate encoded_id-rails:install
3
+ rails generate encoded_id:rails:install
@@ -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-rails:install`
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 = "I2@2EBAw1lE#yvh4baf43k"
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 = "0123456789abcdefghjkmnpqrstuvwxyz"
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.
@@ -7,7 +7,7 @@ module EncodedId
7
7
 
8
8
  attr_accessor character_group_size: ::Integer
9
9
 
10
- attr_accessor alphabet: ::String
10
+ attr_accessor alphabet: ::EncodedId::Alphabet
11
11
 
12
12
  attr_accessor id_length: ::Integer
13
13
 
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.1.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-17 00:00:00.000000000 Z
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.3'
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.3'
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.7
102
+ rubygems_version: 3.3.26
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: Use EncodedIds with ActiveRecord models