encoded_id-rails 0.1.0 → 0.2.0

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.

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: bb93a60976be5fd3bacb21a78802c5f8388cf8d4e523adc8f1310c8cc71b77dd
4
+ data.tar.gz: c8422d86707acd57d862f403a7e5784e68b5834d2368e708c5af0a20cfa4c467
5
5
  SHA512:
6
- metadata.gz: bcaa0ef9e037f2e333b323846df8bc9daea30e58fd3b5cb906531bfe7bf3c79884e30dbb13d38be92a891c4cdc69effbf4b358f15c76dfb1eccbbc37284882a9
7
- data.tar.gz: 82572b25da35bce009de4d00f98c61c9fc96f96ea2df93b722d73a3c2908793d43081e3ec25c4998ff92013eba3cdbcb32abf192757deff0252635317b5684ee
6
+ metadata.gz: c578b5a9d22e2eba3be0e32ff5ae0a95d5dd0769f4ab65f50ebed76ba47b0510b0fa97291b5e62ff5ff72df348a38b244ed361404809d2e065e0c2baadff747e
7
+ data.tar.gz: 6a40b3988b20bc14deee6e1b89b20c1c7be74bb2586b5af9aa2f479367cbd0dbeb9861341c4f8dda4ee80f3f96ac499a5fe380c5cbfa6fd1e2fb83b2e5ea4cbf
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.2.0"
6
6
  end
7
7
  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.2.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-14 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