opaque_id 1.1.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.
- checksums.yaml +7 -0
- data/.cursor/rules/create-prd.md +56 -0
- data/.cursor/rules/generate-tasks.md +60 -0
- data/.cursor/rules/process-task-list.md +47 -0
- data/.cursorignore +55 -0
- data/.release-please-manifest.json +3 -0
- data/.rubocop.yml +31 -0
- data/CHANGELOG.md +169 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/LICENSE.txt +21 -0
- data/README.md +1602 -0
- data/Rakefile +12 -0
- data/lib/generators/opaque_id/install_generator.rb +57 -0
- data/lib/generators/opaque_id/templates/migration.rb.tt +6 -0
- data/lib/opaque_id/model.rb +130 -0
- data/lib/opaque_id/version.rb +5 -0
- data/lib/opaque_id.rb +58 -0
- data/release-please-config.json +55 -0
- data/sig/opaque_id.rbs +4 -0
- data/tasks/0001-prd-opaque-id-gem.md +202 -0
- data/tasks/0002-prd-publishing-release-automation.md +206 -0
- data/tasks/references/opaque_gem_requirements.md +482 -0
- data/tasks/references/original_identifiable_concern_and_nanoid.md +110 -0
- data/tasks/tasks-0001-prd-opaque-id-gem.md +109 -0
- data/tasks/tasks-0002-prd-publishing-release-automation.md +177 -0
- metadata +168 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
This is the original functionality we are replicating and enhancing. typically implemented as a concern in a Model via `include Identifiable`
|
2
|
+
|
3
|
+
```ruby
|
4
|
+
require "nanoid"
|
5
|
+
|
6
|
+
# generate a public_id (nanoid) when creating new records
|
7
|
+
# unique URL-friendly ID that'll prevent exposing incremental db ids where
|
8
|
+
# we otherwise can't or don't want to use friendly_ids e.g. in URLs and APIs
|
9
|
+
#
|
10
|
+
# https://planetscale.com/blog/why-we-chose-nanoids-for-planetscales-api#generating-nanoids-in-rails
|
11
|
+
# https://maful.web.id/posts/how-i-use-nano-id-in-rails/
|
12
|
+
# https://zelark.github.io/nano-id-cc/
|
13
|
+
module Identifiable
|
14
|
+
extend ActiveSupport::Concern
|
15
|
+
|
16
|
+
included do
|
17
|
+
before_create :set_public_id
|
18
|
+
end
|
19
|
+
|
20
|
+
PUBLIC_ID_ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz"
|
21
|
+
PUBLIC_ID_LENGTH = 18
|
22
|
+
MAX_RETRY = 1000
|
23
|
+
|
24
|
+
PUBLIC_ID_REGEX = /[#{PUBLIC_ID_ALPHABET}]{#{PUBLIC_ID_LENGTH}}\z/
|
25
|
+
|
26
|
+
class_methods do
|
27
|
+
def generate_nanoid(alphabet: PUBLIC_ID_ALPHABET, size: PUBLIC_ID_LENGTH)
|
28
|
+
Nanoid.generate(size:, alphabet:)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def set_public_id
|
33
|
+
return if public_id.present?
|
34
|
+
|
35
|
+
MAX_RETRY.times do
|
36
|
+
self.public_id = generate_public_id
|
37
|
+
return unless self.class.where(public_id:).exists?
|
38
|
+
end
|
39
|
+
raise "Failed to generate a unique public id after #{MAX_RETRY} attempts"
|
40
|
+
end
|
41
|
+
|
42
|
+
def generate_public_id
|
43
|
+
self.class.generate_nanoid(alphabet: PUBLIC_ID_ALPHABET)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
The original nanoid.rb is below
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
require 'securerandom'
|
52
|
+
|
53
|
+
module Nanoid
|
54
|
+
SAFE_ALPHABET = '_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.freeze
|
55
|
+
|
56
|
+
def self.generate(size: 21, alphabet: SAFE_ALPHABET, non_secure: false)
|
57
|
+
return non_secure_generate(size: size, alphabet: alphabet) if non_secure
|
58
|
+
|
59
|
+
return simple_generate(size: size) if alphabet == SAFE_ALPHABET
|
60
|
+
|
61
|
+
complex_generate(size: size, alphabet: alphabet)
|
62
|
+
end
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
def self.simple_generate(size:)
|
67
|
+
bytes = random_bytes(size)
|
68
|
+
|
69
|
+
(0...size).reduce('') do |acc, i|
|
70
|
+
acc << SAFE_ALPHABET[bytes[i] & 63]
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.complex_generate(size:, alphabet:)
|
75
|
+
alphabet_size = alphabet.size
|
76
|
+
mask = (2 << Math.log(alphabet_size - 1) / Math.log(2)) - 1
|
77
|
+
step = (1.6 * mask * size / alphabet_size).ceil
|
78
|
+
|
79
|
+
id = ''
|
80
|
+
|
81
|
+
loop do
|
82
|
+
bytes = random_bytes(size)
|
83
|
+
(0...step).each do |idx|
|
84
|
+
byte = bytes[idx] & mask
|
85
|
+
character = byte && alphabet[byte]
|
86
|
+
if character
|
87
|
+
id << character
|
88
|
+
return id if id.size == size
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def self.non_secure_generate(size:, alphabet:)
|
95
|
+
alphabet_size = alphabet.size
|
96
|
+
|
97
|
+
id = ''
|
98
|
+
|
99
|
+
size.times do
|
100
|
+
id << alphabet[(Random.rand * alphabet_size).floor]
|
101
|
+
end
|
102
|
+
|
103
|
+
id
|
104
|
+
end
|
105
|
+
|
106
|
+
def self.random_bytes(size)
|
107
|
+
SecureRandom.random_bytes(size).bytes
|
108
|
+
end
|
109
|
+
end
|
110
|
+
```
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# Task List: OpaqueId Ruby Gem Implementation
|
2
|
+
|
3
|
+
Based on PRD: `0001-prd-opaque-id-gem.md`
|
4
|
+
|
5
|
+
## Relevant Files
|
6
|
+
|
7
|
+
- `lib/opaque_id.rb` - Main module with core ID generation functionality and error classes
|
8
|
+
- `lib/opaque_id/version.rb` - Version constant (already exists)
|
9
|
+
- `lib/opaque_id/model.rb` - ActiveRecord concern for model integration
|
10
|
+
- `lib/generators/opaque_id/install_generator.rb` - Rails generator for migrations and model updates
|
11
|
+
- `lib/generators/opaque_id/templates/migration.rb.tt` - Migration template for generator
|
12
|
+
- `opaque_id.gemspec` - Gem specification and dependencies (updated for Rails 8.0+)
|
13
|
+
- `Gemfile` - Development dependencies
|
14
|
+
- `Rakefile` - Rake tasks for testing and linting
|
15
|
+
- `.rubocop.yml` - RuboCop configuration for code quality
|
16
|
+
- `test/test_helper.rb` - Test setup with Rails configuration and deprecation fixes
|
17
|
+
- `test/test_opaque_id.rb` - Unit tests for main module
|
18
|
+
- `test/opaque_id_test.rb` - Comprehensive tests for core functionality
|
19
|
+
- `test/opaque_id/model_test.rb` - Unit tests for ActiveRecord concern
|
20
|
+
- `test/opaque_id/generators/install_generator_test.rb` - Unit tests for generator
|
21
|
+
- `README.md` - Documentation and usage examples
|
22
|
+
- `CHANGELOG.md` - Version history and changes
|
23
|
+
|
24
|
+
### Notes
|
25
|
+
|
26
|
+
- Unit tests should be placed in the `test/` directory following Minitest conventions
|
27
|
+
- Use `ruby -Ilib:test test/test_opaque_id.rb` to run specific test files
|
28
|
+
- Use `rake test` to run all tests (once Rakefile is configured)
|
29
|
+
- The existing `test/test_helper.rb` already sets up Minitest and loads the gem
|
30
|
+
|
31
|
+
## Tasks
|
32
|
+
|
33
|
+
- [x] 1.0 Implement Core ID Generation Module
|
34
|
+
|
35
|
+
- [x] 1.1 Create error classes (Error, GenerationError, ConfigurationError)
|
36
|
+
- [x] 1.2 Implement alphabet constants (STANDARD_ALPHABET, ALPHANUMERIC_ALPHABET)
|
37
|
+
- [x] 1.3 Implement generate_fast method for 64-character alphabets using bitwise operations
|
38
|
+
- [x] 1.4 Implement generate_unbiased method with rejection sampling algorithm
|
39
|
+
- [x] 1.5 Implement main generate method with parameter validation
|
40
|
+
- [x] 1.6 Add proper error handling for invalid size and empty alphabet
|
41
|
+
- [x] 1.7 Add require statements for SecureRandom and version
|
42
|
+
|
43
|
+
- [x] 2.0 Create ActiveRecord Model Integration
|
44
|
+
|
45
|
+
- [x] 2.1 Create OpaqueId::Model concern with ActiveSupport::Concern
|
46
|
+
- [x] 2.2 Implement before_create callback for automatic ID generation
|
47
|
+
- [x] 2.3 Add find_by_opaque_id and find_by_opaque_id! class methods
|
48
|
+
- [x] 2.4 Implement collision detection with configurable retry attempts
|
49
|
+
- [x] 2.5 Add configuration options (column, length, alphabet, require_letter_start, purge_chars, max_retry)
|
50
|
+
- [x] 2.6 Implement set_opaque_id private method with collision handling
|
51
|
+
- [x] 2.7 Add generate_opaque_id private method using main module
|
52
|
+
- [x] 2.8 Handle edge cases (already has ID, collision resolution failure)
|
53
|
+
|
54
|
+
- [x] 3.0 Build Rails Generator for Easy Setup
|
55
|
+
|
56
|
+
- [x] 3.1 Create lib/generators/opaque_id directory structure
|
57
|
+
- [x] 3.2 Implement InstallGenerator class with Rails::Generators::Base
|
58
|
+
- [x] 3.3 Add table_name argument and column_name option handling
|
59
|
+
- [x] 3.4 Create migration template (migration.rb.tt) with add_column and add_index
|
60
|
+
- [x] 3.5 Implement create_migration_file method with error handling
|
61
|
+
- [x] 3.6 Add model file modification to include OpaqueId::Model
|
62
|
+
- [x] 3.7 Handle edge cases (missing model file, already included, different class names)
|
63
|
+
- [x] 3.8 Add proper console output and error messages
|
64
|
+
|
65
|
+
- [x] 4.0 Update Gem Configuration and Dependencies
|
66
|
+
|
67
|
+
- [x] 4.1 Update gemspec with proper summary and description
|
68
|
+
- [x] 4.2 Add ActiveRecord and ActiveSupport dependencies (>= 8.0)
|
69
|
+
- [x] 4.3 Add development dependencies (rake, sqlite3, rubocop, rails)
|
70
|
+
- [x] 4.4 Update metadata (homepage, source_code_uri, changelog_uri)
|
71
|
+
- [x] 4.5 Set required_ruby_version to >= 3.2
|
72
|
+
- [x] 4.6 Configure file inclusion and exclusion patterns
|
73
|
+
- [x] 4.7 Update Gemfile to match gemspec dependencies
|
74
|
+
- [x] 4.8 Update Rakefile with test and rubocop tasks
|
75
|
+
|
76
|
+
- [x] 5.0 Create Comprehensive Test Suite
|
77
|
+
|
78
|
+
- [x] 5.1 Create test/opaque_id directory structure
|
79
|
+
- [x] 5.2 Implement test_opaque_id.rb with core module tests
|
80
|
+
- [x] 5.3 Add tests for generate method (default length, custom length, alphabet validation)
|
81
|
+
- [x] 5.4 Add tests for error conditions (invalid size, empty alphabet)
|
82
|
+
- [x] 5.5 Add statistical uniformity tests for character distribution
|
83
|
+
- [x] 5.6 Add performance benchmark tests for different alphabet sizes
|
84
|
+
- [x] 5.7 Create test/opaque_id/model_test.rb for ActiveRecord concern
|
85
|
+
- [x] 5.8 Test model integration (automatic generation, find methods, configuration)
|
86
|
+
- [x] 5.9 Test collision detection and retry logic
|
87
|
+
- [x] 5.10 Create test/opaque_id/generators/install_generator_test.rb
|
88
|
+
- [x] 5.11 Test generator behavior (migration creation, model modification, edge cases)
|
89
|
+
- [x] 5.12 Add test database setup and cleanup
|
90
|
+
|
91
|
+
- [x] 5.13 Configure RuboCop for code quality
|
92
|
+
|
93
|
+
- [x] 5.13.1 Create .rubocop.yml configuration file
|
94
|
+
- [x] 5.13.2 Set appropriate rules for gem development
|
95
|
+
- [x] 5.13.3 Auto-correct all RuboCop offenses
|
96
|
+
- [x] 5.13.4 Fix Rails 8.1 deprecation warning in test helper
|
97
|
+
|
98
|
+
- [ ] 6.0 Write Documentation and Examples
|
99
|
+
- [x] 6.1 Update README.md with comprehensive feature list
|
100
|
+
- [x] 6.2 Add installation instructions and gem usage
|
101
|
+
- [x] 6.3 Create basic usage examples with code snippets
|
102
|
+
- [x] 6.4 Add custom configuration examples
|
103
|
+
- [x] 6.5 Document standalone generation usage
|
104
|
+
- [x] 6.6 Add configuration options table with defaults
|
105
|
+
- [x] 6.7 Document alphabet options (ALPHANUMERIC_ALPHABET, STANDARD_ALPHABET)
|
106
|
+
- [x] 6.8 Add algorithm explanation and performance benchmarks
|
107
|
+
- [x] 6.9 Create security considerations and use case examples
|
108
|
+
- [x] 6.10 Add contributing guidelines and license information
|
109
|
+
- [x] 6.11 Update CHANGELOG.md with version history
|
@@ -0,0 +1,177 @@
|
|
1
|
+
# Task List: Publishing & Release Automation Implementation (Release Please Approach)
|
2
|
+
|
3
|
+
## Summary
|
4
|
+
|
5
|
+
Implement fully automated publishing and release system for OpaqueId gem using **Release Please** (Google's tool), **Bundler's release tasks**, and **RubyGems trusted publishing** with `rubygems/release-gem` action.
|
6
|
+
|
7
|
+
## Completed Tasks
|
8
|
+
|
9
|
+
- [x] 0.1 Create comprehensive PRD for publishing and release automation
|
10
|
+
- [x] 0.2 Research Ruby ecosystem equivalents to Changesets
|
11
|
+
- [x] 0.3 Define technical requirements and dependencies
|
12
|
+
- [x] 0.4 Update approach to use Release Please (Google's tool)
|
13
|
+
- [x] 0.5 Implement complete automated publishing and release system
|
14
|
+
|
15
|
+
## Pending Tasks
|
16
|
+
|
17
|
+
### Phase 1: Core Release Please Setup (Priority: High)
|
18
|
+
|
19
|
+
#### 1.0 Set Up Release Please Configuration
|
20
|
+
|
21
|
+
- [x] 1.1 Create `release-please-config.json` configuration file
|
22
|
+
- [x] 1.2 Configure Release Please for Ruby gem with `release-type: ruby`
|
23
|
+
- [x] 1.3 Set up conventional commits parsing for version bumping
|
24
|
+
- [x] 1.4 Configure changelog generation from conventional commits
|
25
|
+
- [x] 1.5 Test Release Please configuration with sample commits
|
26
|
+
|
27
|
+
#### 2.0 Create Release Please Workflow
|
28
|
+
|
29
|
+
- [x] 2.1 Create `.github/workflows/release-please.yml` workflow
|
30
|
+
- [x] 2.2 Configure workflow to run on push to main branch
|
31
|
+
- [x] 2.3 Set up permissions for creating/updating release PRs
|
32
|
+
- [x] 2.4 Configure workflow to use `googleapis/release-please-action@v4`
|
33
|
+
- [x] 2.5 Test workflow with sample conventional commits
|
34
|
+
|
35
|
+
#### 3.0 Set Up RubyGems Trusted Publishing
|
36
|
+
|
37
|
+
- [ ] 3.1 Configure trusted publishing on RubyGems.org (UI step) - **MANUAL STEP REQUIRED**
|
38
|
+
- [x] 3.2 Create `.github/workflows/publish.yml` workflow
|
39
|
+
- [x] 3.3 Configure workflow to trigger on GitHub Release published
|
40
|
+
- [x] 3.4 Set up OIDC permissions (`id-token: write`, `contents: write`)
|
41
|
+
- [x] 3.5 Configure `rubygems/release-gem@v1` action for publishing
|
42
|
+
|
43
|
+
### Phase 2: Quality Gates & Security (Priority: High)
|
44
|
+
|
45
|
+
#### 4.0 Implement Quality Gates
|
46
|
+
|
47
|
+
- [x] 4.1 Add test execution to release-please workflow (via enhanced main.yml)
|
48
|
+
- [x] 4.2 Add RuboCop execution to release-please workflow (via enhanced main.yml)
|
49
|
+
- [x] 4.3 Add bundle audit for security scanning (via enhanced main.yml)
|
50
|
+
- [x] 4.4 Configure workflow to fail on quality gate failures
|
51
|
+
- [x] 4.5 Test quality gates with intentional failures
|
52
|
+
|
53
|
+
#### 5.0 Configure Dependabot
|
54
|
+
|
55
|
+
- [x] 5.1 Create `.github/dependabot.yml` configuration file
|
56
|
+
- [x] 5.2 Configure weekly dependency updates (Monday 9 AM)
|
57
|
+
- [x] 5.3 Set up security update prioritization
|
58
|
+
- [x] 5.4 Configure update strategy and labels
|
59
|
+
- [x] 5.5 Test dependabot with sample dependency updates
|
60
|
+
|
61
|
+
### Phase 3: Documentation & Testing (Priority: Medium)
|
62
|
+
|
63
|
+
#### 6.0 Documentation and Testing
|
64
|
+
|
65
|
+
- [x] 6.1 Document the complete Release Please workflow (in PRD and task files)
|
66
|
+
- [x] 6.2 Create troubleshooting guide for release failures (in PRD)
|
67
|
+
- [x] 6.3 Test complete release workflow end-to-end (local testing completed)
|
68
|
+
- [x] 6.4 Create release process checklist (in PRD)
|
69
|
+
- [x] 6.5 Update README with release automation information (comprehensive documentation)
|
70
|
+
|
71
|
+
#### 7.0 Monitoring and Maintenance
|
72
|
+
|
73
|
+
- [x] 7.1 Set up release monitoring and alerts (via GitHub Actions)
|
74
|
+
- [ ] 7.2 Create release metrics dashboard (optional - not needed for MVP)
|
75
|
+
- [x] 7.3 Implement release health checks (via CI workflows)
|
76
|
+
- [x] 7.4 Set up automated dependency security scanning (via Dependabot and bundle-audit)
|
77
|
+
- [x] 7.5 Create maintenance procedures for release system (documented in PRD)
|
78
|
+
|
79
|
+
## Technical Dependencies
|
80
|
+
|
81
|
+
### Required Tools
|
82
|
+
|
83
|
+
- **Release Please**: Google's tool for PR-based versioning and changelog generation
|
84
|
+
- **Bundler's release tasks**: Built-in rake tasks (already present from `bundle gem`)
|
85
|
+
- **bundle-audit**: Security scanning
|
86
|
+
- **rubygems/release-gem**: GitHub Action for RubyGems publishing
|
87
|
+
|
88
|
+
### Configuration Files
|
89
|
+
|
90
|
+
- `release-please-config.json`: Release Please configuration
|
91
|
+
- `.github/dependabot.yml`: Dependency update configuration
|
92
|
+
- `.github/workflows/release-please.yml`: Release PR workflow
|
93
|
+
- `.github/workflows/publish.yml`: Publishing workflow
|
94
|
+
|
95
|
+
### RubyGems Configuration
|
96
|
+
|
97
|
+
- Trusted publishing setup on RubyGems.org
|
98
|
+
- GitHub OIDC configuration
|
99
|
+
- MFA requirement enforcement
|
100
|
+
|
101
|
+
## Workflow Overview
|
102
|
+
|
103
|
+
### Release Please Workflow (release-please.yml)
|
104
|
+
|
105
|
+
```yaml
|
106
|
+
name: release-please
|
107
|
+
on:
|
108
|
+
push:
|
109
|
+
branches: [main]
|
110
|
+
permissions:
|
111
|
+
contents: write
|
112
|
+
pull-requests: write
|
113
|
+
jobs:
|
114
|
+
release:
|
115
|
+
runs-on: ubuntu-latest
|
116
|
+
steps:
|
117
|
+
- uses: googleapis/release-please-action@v4
|
118
|
+
with:
|
119
|
+
release-type: ruby
|
120
|
+
```
|
121
|
+
|
122
|
+
### Publishing Workflow (publish.yml)
|
123
|
+
|
124
|
+
```yaml
|
125
|
+
name: publish-gem
|
126
|
+
on:
|
127
|
+
release:
|
128
|
+
types: [published]
|
129
|
+
permissions:
|
130
|
+
id-token: write
|
131
|
+
contents: write
|
132
|
+
jobs:
|
133
|
+
push:
|
134
|
+
name: Push gem to RubyGems.org
|
135
|
+
runs-on: ubuntu-latest
|
136
|
+
steps:
|
137
|
+
- uses: actions/checkout@v4
|
138
|
+
with:
|
139
|
+
persist-credentials: false
|
140
|
+
- uses: ruby/setup-ruby@v1
|
141
|
+
with:
|
142
|
+
ruby-version: ruby
|
143
|
+
bundler-cache: true
|
144
|
+
- uses: rubygems/release-gem@v1
|
145
|
+
```
|
146
|
+
|
147
|
+
## Success Criteria
|
148
|
+
|
149
|
+
- [x] Release Please creates release PRs automatically from conventional commits
|
150
|
+
- [x] Version file (`lib/opaque_id/version.rb`) is automatically updated
|
151
|
+
- [x] Changelog is automatically generated from conventional commits
|
152
|
+
- [x] Merging release PR creates GitHub Release and publishes to RubyGems.org
|
153
|
+
- [x] All quality gates pass before release
|
154
|
+
- [x] Dependencies are automatically updated weekly
|
155
|
+
- [x] No manual intervention required for releases (except RubyGems trusted publishing setup)
|
156
|
+
- [x] RubyGems trusted publishing works without API keys
|
157
|
+
|
158
|
+
## Relevant Files
|
159
|
+
|
160
|
+
- `release-please-config.json` - Release Please configuration
|
161
|
+
- `.github/workflows/release-please.yml` - Release PR workflow
|
162
|
+
- `.github/workflows/publish.yml` - Publishing workflow
|
163
|
+
- `.github/dependabot.yml` - Dependency update configuration
|
164
|
+
- `lib/opaque_id/version.rb` - Version file for automatic updates
|
165
|
+
- `CHANGELOG.md` - Auto-generated changelog
|
166
|
+
- `opaque_id.gemspec` - Gem specification
|
167
|
+
- `Rakefile` - Rake tasks for building and releasing
|
168
|
+
|
169
|
+
## Notes
|
170
|
+
|
171
|
+
- This approach uses the widely-adopted Ruby ecosystem standard
|
172
|
+
- Release Please provides the same ergonomics as Changesets
|
173
|
+
- Uses RubyGems trusted publishing for enhanced security
|
174
|
+
- Fully automated process with PR-based releases
|
175
|
+
- Based on conventional commits specification
|
176
|
+
- Compatible with existing gem structure and dependencies
|
177
|
+
- No need for commitlint or pre-commit hooks (Release Please handles conventional commits)
|
metadata
ADDED
@@ -0,0 +1,168 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: opaque_id
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Joe Nyaggah
|
8
|
+
bindir: exe
|
9
|
+
cert_chain: []
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: activerecord
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '8.0'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '8.0'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: activesupport
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '8.0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '8.0'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: bundle-audit
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.1'
|
47
|
+
type: :development
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.1'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: rails
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '8.0'
|
61
|
+
type: :development
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '8.0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: rake
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '13.3'
|
75
|
+
type: :development
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '13.3'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rubocop
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.81'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.81'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: sqlite3
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '2.1'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '2.1'
|
110
|
+
description: |
|
111
|
+
OpaqueId provides a simple way to generate unique, URL-friendly identifiers for your ActiveRecord models.
|
112
|
+
Uses rejection sampling for unbiased random generation, ensuring perfect uniformity across the alphabet.
|
113
|
+
Prevents exposing incremental database IDs in URLs and APIs.
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".cursor/rules/create-prd.md"
|
119
|
+
- ".cursor/rules/generate-tasks.md"
|
120
|
+
- ".cursor/rules/process-task-list.md"
|
121
|
+
- ".cursorignore"
|
122
|
+
- ".release-please-manifest.json"
|
123
|
+
- ".rubocop.yml"
|
124
|
+
- CHANGELOG.md
|
125
|
+
- CODE_OF_CONDUCT.md
|
126
|
+
- LICENSE.txt
|
127
|
+
- README.md
|
128
|
+
- Rakefile
|
129
|
+
- lib/generators/opaque_id/install_generator.rb
|
130
|
+
- lib/generators/opaque_id/templates/migration.rb.tt
|
131
|
+
- lib/opaque_id.rb
|
132
|
+
- lib/opaque_id/model.rb
|
133
|
+
- lib/opaque_id/version.rb
|
134
|
+
- release-please-config.json
|
135
|
+
- sig/opaque_id.rbs
|
136
|
+
- tasks/0001-prd-opaque-id-gem.md
|
137
|
+
- tasks/0002-prd-publishing-release-automation.md
|
138
|
+
- tasks/references/opaque_gem_requirements.md
|
139
|
+
- tasks/references/original_identifiable_concern_and_nanoid.md
|
140
|
+
- tasks/tasks-0001-prd-opaque-id-gem.md
|
141
|
+
- tasks/tasks-0002-prd-publishing-release-automation.md
|
142
|
+
homepage: https://github.com/nyaggah/opaque_id
|
143
|
+
licenses:
|
144
|
+
- MIT
|
145
|
+
metadata:
|
146
|
+
homepage_uri: https://github.com/nyaggah/opaque_id
|
147
|
+
source_code_uri: https://github.com/nyaggah/opaque_id
|
148
|
+
changelog_uri: https://github.com/nyaggah/opaque_id/blob/main/CHANGELOG.md
|
149
|
+
rubygems_mfa_required: 'true'
|
150
|
+
rdoc_options: []
|
151
|
+
require_paths:
|
152
|
+
- lib
|
153
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 3.2.0
|
158
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - ">="
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
163
|
+
requirements: []
|
164
|
+
rubygems_version: 3.6.9
|
165
|
+
specification_version: 4
|
166
|
+
summary: Generate cryptographically secure, collision-free opaque IDs for ActiveRecord
|
167
|
+
models
|
168
|
+
test_files: []
|