opaque_id 1.3.0 → 1.6.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 +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +136 -0
- data/README.md +62 -70
- data/docs/_config.yml +8 -17
- data/docs/algorithms.md +7 -4
- data/docs/alphabets.md +3 -0
- data/docs/api-reference.md +3 -0
- data/docs/assets/css/custom.scss +6 -53
- data/docs/configuration.md +3 -0
- data/docs/development.md +3 -0
- data/docs/getting-started.md +3 -0
- data/docs/index.md +6 -3
- data/docs/installation.md +3 -0
- data/docs/performance.md +6 -3
- data/docs/security.md +3 -0
- data/docs/usage.md +18 -15
- data/docs/use-cases.md +3 -0
- data/lib/opaque_id/version.rb +1 -1
- data/lib/opaque_id.rb +4 -1
- data/release-please-config.json +2 -1
- metadata +1 -9
- data/tasks/0001-prd-opaque-id-gem.md +0 -202
- data/tasks/0002-prd-publishing-release-automation.md +0 -206
- data/tasks/0003-prd-documentation-site.md +0 -191
- data/tasks/references/opaque_gem_requirements.md +0 -482
- data/tasks/references/original_identifiable_concern_and_nanoid.md +0 -110
- data/tasks/tasks-0001-prd-opaque-id-gem.md +0 -109
- data/tasks/tasks-0002-prd-publishing-release-automation.md +0 -177
- data/tasks/tasks-0003-prd-documentation-site.md +0 -84
@@ -1,206 +0,0 @@
|
|
1
|
-
# Product Requirements Document: Publishing & Release Automation
|
2
|
-
|
3
|
-
## Introduction/Overview
|
4
|
-
|
5
|
-
This PRD outlines the implementation of a fully automated publishing and release system for the OpaqueId Ruby gem. The system will automatically version, test, and publish releases to RubyGems.org based on conventional commits, eliminating manual release processes and ensuring consistent, professional releases.
|
6
|
-
|
7
|
-
**Problem**: Manual release processes are error-prone, time-consuming, and inconsistent. Without automated versioning and publishing, releases can be delayed, version numbers can be inconsistent, and changelogs can be incomplete.
|
8
|
-
|
9
|
-
**Goal**: Implement a fully automated CI/CD pipeline that handles versioning, testing, changelog generation, and publishing based on conventional commits and the state of the main branch.
|
10
|
-
|
11
|
-
## Goals
|
12
|
-
|
13
|
-
1. **Automated Versioning**: Automatically determine version bumps (patch/minor/major) based on conventional commit types
|
14
|
-
2. **Automated Publishing**: Automatically publish to RubyGems.org when changes are ready
|
15
|
-
3. **Quality Gates**: Ensure all tests pass, code quality standards are met, and security checks pass before release
|
16
|
-
4. **Automated Changelog**: Generate changelog entries from conventional commits
|
17
|
-
5. **Dependency Management**: Automatically check for and update dependencies weekly
|
18
|
-
6. **Commit Standardization**: Enforce conventional commit format for consistent messaging
|
19
|
-
7. **Security**: Use RubyGems trusted publishing for secure, keyless releases
|
20
|
-
|
21
|
-
## User Stories
|
22
|
-
|
23
|
-
### As a Developer
|
24
|
-
|
25
|
-
- **US1**: I want my commits to automatically trigger appropriate version bumps so that I don't have to manually manage version numbers
|
26
|
-
- **US2**: I want releases to be published automatically when I push to main so that I don't have to remember to manually publish
|
27
|
-
- **US3**: I want commit message validation so that I follow consistent formatting standards
|
28
|
-
- **US4**: I want automated dependency updates so that my gem stays secure and up-to-date
|
29
|
-
|
30
|
-
### As a Maintainer
|
31
|
-
|
32
|
-
- **US5**: I want automated testing and quality checks before release so that I can trust the published code
|
33
|
-
- **US6**: I want automated changelog generation so that users know what changed in each release
|
34
|
-
- **US7**: I want security scanning before release so that vulnerabilities are caught early
|
35
|
-
|
36
|
-
### As a User
|
37
|
-
|
38
|
-
- **US8**: I want consistent, predictable releases so that I can trust the gem's stability
|
39
|
-
- **US9**: I want clear changelogs so that I understand what changed between versions
|
40
|
-
|
41
|
-
## Functional Requirements
|
42
|
-
|
43
|
-
### 1. Conventional Commits Integration
|
44
|
-
|
45
|
-
1.1. **Commit Message Validation**: Enforce conventional commit format (feat:, fix:, docs:, etc.) on all commits
|
46
|
-
1.2. **Commit Linting**: Use commitlint or similar tool to validate commit message format
|
47
|
-
1.3. **Pre-commit Hooks**: Automatically validate commit messages before they are accepted
|
48
|
-
1.4. **Commit Types**: Support standard types: feat, fix, docs, style, refactor, perf, test, chore, ci, build
|
49
|
-
|
50
|
-
### 2. Automated Versioning
|
51
|
-
|
52
|
-
2.1. **Semantic Versioning**: Use semantic versioning (MAJOR.MINOR.PATCH) based on conventional commits
|
53
|
-
2.2. **Version Bump Logic**:
|
54
|
-
|
55
|
-
- `feat:` commits → MINOR version bump
|
56
|
-
- `fix:` commits → PATCH version bump
|
57
|
-
- `BREAKING CHANGE:` or `!` → MAJOR version bump
|
58
|
-
- Other types → no version bump
|
59
|
-
2.3. **Version Detection**: Automatically detect when version should be bumped based on unreleased commits
|
60
|
-
2.4. **Version File Update**: Automatically update `lib/opaque_id/version.rb` with new version
|
61
|
-
|
62
|
-
### 3. GitHub Actions Workflow
|
63
|
-
|
64
|
-
3.1. **Single Workflow**: Update existing `main.yml` to include release automation
|
65
|
-
3.2. **Trigger Conditions**: Run on push to main branch when unreleased changes exist
|
66
|
-
3.3. **Workflow Steps**:
|
67
|
-
|
68
|
-
- Checkout code
|
69
|
-
- Setup Ruby environment
|
70
|
-
- Install dependencies
|
71
|
-
- Run tests
|
72
|
-
- Run RuboCop
|
73
|
-
- Security audit
|
74
|
-
- Determine version bump
|
75
|
-
- Update version file
|
76
|
-
- Generate changelog
|
77
|
-
- Create git tag
|
78
|
-
- Publish to RubyGems.org
|
79
|
-
- Create GitHub release
|
80
|
-
|
81
|
-
### 4. Quality Gates
|
82
|
-
|
83
|
-
4.1. **Test Execution**: Run full test suite before any release
|
84
|
-
4.2. **Code Quality**: Run RuboCop and fail if violations exist
|
85
|
-
4.3. **Security Scanning**: Run `bundle audit` to check for vulnerable dependencies
|
86
|
-
4.4. **Dependency Check**: Ensure all dependencies are up-to-date and secure
|
87
|
-
|
88
|
-
### 5. Changelog Generation
|
89
|
-
|
90
|
-
5.1. **Automated Generation**: Generate changelog from conventional commits since last release
|
91
|
-
5.2. **Changelog Format**: Use conventional changelog format with categorized sections
|
92
|
-
5.3. **Changelog Sections**: Features, Bug Fixes, Breaking Changes, Documentation, etc.
|
93
|
-
5.4. **Changelog Update**: Automatically update `CHANGELOG.md` with new entries
|
94
|
-
|
95
|
-
### 6. RubyGems Publishing
|
96
|
-
|
97
|
-
6.1. **Trusted Publishing**: Use RubyGems trusted publishing (no API keys required)
|
98
|
-
6.2. **MFA Enforcement**: Ensure MFA is required for publishing (already configured)
|
99
|
-
6.3. **Build Process**: Build gem package before publishing
|
100
|
-
6.4. **Publish Process**: Automatically push to RubyGems.org when all checks pass
|
101
|
-
|
102
|
-
### 7. Dependabot Integration
|
103
|
-
|
104
|
-
7.1. **Weekly Updates**: Check for dependency updates every Monday at 9 AM
|
105
|
-
7.2. **Update Types**: Check for both direct and indirect dependency updates
|
106
|
-
7.3. **Security Updates**: Prioritize security-related updates
|
107
|
-
7.4. **Update Strategy**: Create pull requests for dependency updates
|
108
|
-
|
109
|
-
### 8. Git Tag Management
|
110
|
-
|
111
|
-
8.1. **Automatic Tagging**: Create git tags for each release (e.g., `v1.2.3`)
|
112
|
-
8.2. **Tag Format**: Use semantic versioning format with `v` prefix
|
113
|
-
8.3. **Tag Push**: Automatically push tags to GitHub repository
|
114
|
-
8.4. **GitHub Release**: Create GitHub release with changelog and tag
|
115
|
-
|
116
|
-
## Non-Goals (Out of Scope)
|
117
|
-
|
118
|
-
1. **Manual Release Override**: No manual release triggers or overrides
|
119
|
-
2. **Multiple Branch Support**: Only support releases from main branch
|
120
|
-
3. **Pre-release Versions**: No support for alpha/beta/rc versions initially
|
121
|
-
4. **Monorepo Support**: Single gem repository only
|
122
|
-
5. **Custom Versioning Logic**: No custom versioning rules beyond conventional commits
|
123
|
-
6. **Rollback Automation**: No automatic rollback of failed releases
|
124
|
-
|
125
|
-
## Technical Considerations
|
126
|
-
|
127
|
-
### Dependencies
|
128
|
-
|
129
|
-
- **Release Please**: Google's tool for PR-based versioning and changelog generation
|
130
|
-
- **Bundler's release tasks**: Built-in rake tasks for building and tagging (already present)
|
131
|
-
- **commitlint**: For commit message validation (optional)
|
132
|
-
- **bundle-audit**: For security scanning
|
133
|
-
|
134
|
-
### GitHub Actions
|
135
|
-
|
136
|
-
- **googleapis/release-please-action**: For creating release PRs and versioning
|
137
|
-
- **rubygems/release-gem**: For RubyGems publishing with trusted publishing
|
138
|
-
- **actions/checkout**: For code checkout
|
139
|
-
- **ruby/setup-ruby**: For Ruby environment setup
|
140
|
-
|
141
|
-
### Configuration Files
|
142
|
-
|
143
|
-
- **release-please-config.json**: Release Please configuration
|
144
|
-
- **dependabot.yml**: Dependency update configuration
|
145
|
-
- **.github/workflows/release-please.yml**: Release PR workflow
|
146
|
-
- **.github/workflows/publish.yml**: Publishing workflow
|
147
|
-
|
148
|
-
### RubyGems Trusted Publishing
|
149
|
-
|
150
|
-
- Configure trusted publishing on RubyGems.org
|
151
|
-
- Use GitHub OIDC for authentication
|
152
|
-
- No API keys or secrets required
|
153
|
-
|
154
|
-
## Success Metrics
|
155
|
-
|
156
|
-
1. **Release Automation**: 100% of releases are automated (no manual intervention)
|
157
|
-
2. **Release Frequency**: Ability to release multiple times per day if needed
|
158
|
-
3. **Quality Gates**: 0% of releases with failing tests or security issues
|
159
|
-
4. **Commit Compliance**: 100% of commits follow conventional commit format
|
160
|
-
5. **Dependency Currency**: Dependencies updated within 7 days of availability
|
161
|
-
6. **Release Time**: From commit to published gem in under 10 minutes
|
162
|
-
|
163
|
-
## Open Questions
|
164
|
-
|
165
|
-
1. **Commit Message Enforcement**: Should we use pre-commit hooks or GitHub Actions validation?
|
166
|
-
2. **Changelog Format**: Should we use conventional-changelog or custom format?
|
167
|
-
3. **Version Bump Strategy**: Should we batch multiple commits into single releases?
|
168
|
-
4. **Rollback Strategy**: How should we handle failed releases or rollbacks?
|
169
|
-
5. **Notification Strategy**: Should we notify maintainers of successful/failed releases?
|
170
|
-
6. **Branch Protection**: Should we require status checks before merging to main?
|
171
|
-
|
172
|
-
## Implementation Priority
|
173
|
-
|
174
|
-
### Phase 1: Core Automation
|
175
|
-
|
176
|
-
- Conventional commits validation
|
177
|
-
- Automated versioning
|
178
|
-
- Basic GitHub Actions workflow
|
179
|
-
- RubyGems publishing
|
180
|
-
|
181
|
-
### Phase 2: Quality & Security
|
182
|
-
|
183
|
-
- Quality gates (tests, RuboCop, security)
|
184
|
-
- Automated changelog generation
|
185
|
-
- Dependabot integration
|
186
|
-
|
187
|
-
### Phase 3: Polish & Monitoring
|
188
|
-
|
189
|
-
- Enhanced notifications
|
190
|
-
- Release monitoring
|
191
|
-
- Performance optimization
|
192
|
-
|
193
|
-
## Acceptance Criteria
|
194
|
-
|
195
|
-
- [ ] All commits follow conventional commit format
|
196
|
-
- [ ] Version numbers are automatically bumped based on commit types
|
197
|
-
- [ ] Releases are automatically published to RubyGems.org
|
198
|
-
- [ ] Changelog is automatically generated from commits
|
199
|
-
- [ ] All tests pass before release
|
200
|
-
- [ ] RuboCop passes before release
|
201
|
-
- [ ] Security audit passes before release
|
202
|
-
- [ ] Dependencies are automatically updated weekly
|
203
|
-
- [ ] Git tags are automatically created for releases
|
204
|
-
- [ ] GitHub releases are automatically created
|
205
|
-
- [ ] RubyGems trusted publishing is configured
|
206
|
-
- [ ] No manual intervention required for releases
|
@@ -1,191 +0,0 @@
|
|
1
|
-
# Product Requirements Document: OpaqueId Documentation Site
|
2
|
-
|
3
|
-
## Introduction/Overview
|
4
|
-
|
5
|
-
Create a professional documentation website for the OpaqueId Ruby gem using [Just the Docs](https://just-the-docs.com) Jekyll theme. The site will provide comprehensive, developer-focused documentation that mirrors the README content but with improved navigation, search capabilities, and a clean, minimal design similar to the Just the Docs site itself.
|
6
|
-
|
7
|
-
**Problem Solved:** The current README is comprehensive but long (1600+ lines), making it difficult to navigate and find specific information quickly. A dedicated documentation site will improve developer experience and make the gem more accessible.
|
8
|
-
|
9
|
-
**Goal:** Create a professional, searchable documentation site that makes OpaqueId easy to understand and implement for developers.
|
10
|
-
|
11
|
-
## Goals
|
12
|
-
|
13
|
-
1. **Improve Developer Experience**: Provide easy navigation and search for finding specific documentation
|
14
|
-
2. **Professional Presentation**: Create a polished, modern documentation site that reflects the quality of the gem
|
15
|
-
3. **Maintain Content Quality**: Preserve all valuable information from the README while improving organization
|
16
|
-
4. **Enable Auto-Deployment**: Set up GitHub Actions for automatic deployment on successful pushes
|
17
|
-
5. **Ensure Accessibility**: Make documentation accessible and mobile-friendly
|
18
|
-
6. **Minimize Maintenance**: Keep the site simple and maintainable
|
19
|
-
|
20
|
-
## User Stories
|
21
|
-
|
22
|
-
- **As a developer** evaluating OpaqueId, I want to quickly understand what the gem does and how to install it
|
23
|
-
- **As a developer** implementing OpaqueId, I want to find specific configuration options and usage examples
|
24
|
-
- **As a developer** troubleshooting issues, I want to search for specific error messages or solutions
|
25
|
-
- **As a developer** learning advanced features, I want to explore performance benchmarks and security considerations
|
26
|
-
- **As a developer** contributing to the project, I want to understand the development setup and guidelines
|
27
|
-
|
28
|
-
## Functional Requirements
|
29
|
-
|
30
|
-
### 1. Site Structure & Navigation
|
31
|
-
|
32
|
-
1.1. Create a `/docs` directory with Jekyll site structure
|
33
|
-
1.2. Implement sidebar navigation based on README Table of Contents
|
34
|
-
1.3. Use minimal, flat navigation structure (no collapsible sections)
|
35
|
-
1.4. Include search functionality using Just the Docs built-in search
|
36
|
-
1.5. Add "Getting Started" quick start guide as a separate page
|
37
|
-
|
38
|
-
### 2. Content Organization
|
39
|
-
|
40
|
-
2.1. Convert README sections into individual documentation pages
|
41
|
-
2.2. Create logical page hierarchy: Home → Getting Started → Installation → Usage → Configuration → etc.
|
42
|
-
2.3. Maintain all existing content from README
|
43
|
-
2.4. Add code syntax highlighting for Ruby examples
|
44
|
-
2.5. Include proper cross-references between pages
|
45
|
-
|
46
|
-
### 3. Design & Styling
|
47
|
-
|
48
|
-
3.1. Use Just the Docs theme with default light/dark mode switching
|
49
|
-
3.2. Apply minimal design similar to just-the-docs.com
|
50
|
-
3.3. Include OpaqueId branding and gem badges
|
51
|
-
3.4. Ensure responsive design for mobile devices
|
52
|
-
3.5. Use consistent typography and spacing
|
53
|
-
|
54
|
-
### 4. GitHub Pages Integration
|
55
|
-
|
56
|
-
4.1. Configure site for `https://nyaggah.github.io/opaque_id`
|
57
|
-
4.2. Set up GitHub Actions workflow for automatic deployment
|
58
|
-
4.3. Deploy on successful pushes to main branch
|
59
|
-
4.4. Include proper Jekyll configuration for GitHub Pages
|
60
|
-
|
61
|
-
### 5. Content Pages
|
62
|
-
|
63
|
-
5.1. **Home**: Overview, badges, quick introduction
|
64
|
-
5.2. **Getting Started**: Step-by-step installation and basic usage
|
65
|
-
5.3. **Installation**: Detailed installation instructions and requirements
|
66
|
-
5.4. **Usage**: Standalone and ActiveRecord integration examples
|
67
|
-
5.5. **Configuration**: All configuration options and examples
|
68
|
-
5.6. **Alphabets**: Built-in alphabets and custom alphabet guide
|
69
|
-
5.7. **Algorithms**: Technical details about fast path and unbiased algorithms
|
70
|
-
5.8. **Performance**: Benchmarks and optimization tips
|
71
|
-
5.9. **Security**: Security considerations and best practices
|
72
|
-
5.10. **Use Cases**: Real-world examples and applications
|
73
|
-
5.11. **Development**: Contributing guidelines and development setup
|
74
|
-
5.12. **API Reference**: Complete method documentation
|
75
|
-
|
76
|
-
### 6. Technical Implementation
|
77
|
-
|
78
|
-
6.1. Use Jekyll with Just the Docs theme
|
79
|
-
6.2. Configure `_config.yml` for GitHub Pages
|
80
|
-
6.3. Set up proper front matter for all pages
|
81
|
-
6.4. Include necessary Jekyll plugins for GitHub Pages
|
82
|
-
6.5. Optimize for fast loading and SEO
|
83
|
-
|
84
|
-
## Non-Goals (Out of Scope)
|
85
|
-
|
86
|
-
- **Live Code Examples**: No interactive demos or live code execution
|
87
|
-
- **Version-Specific Documentation**: Single version documentation only
|
88
|
-
- **Automatic README Sync**: Manual content maintenance
|
89
|
-
- **Custom Domain**: Using default GitHub.io domain
|
90
|
-
- **Breadcrumb Navigation**: Sidebar navigation only
|
91
|
-
- **User Authentication**: Public documentation only
|
92
|
-
- **Comments/Feedback System**: Static documentation only
|
93
|
-
|
94
|
-
## Design Considerations
|
95
|
-
|
96
|
-
### Visual Design
|
97
|
-
|
98
|
-
- **Theme**: [Just the Docs](https://just-the-docs.com) Jekyll theme
|
99
|
-
- **Color Scheme**: Default light/dark mode switching
|
100
|
-
- **Layout**: Clean, minimal design with focus on content
|
101
|
-
- **Typography**: Clear, readable fonts with proper hierarchy
|
102
|
-
- **Navigation**: Left sidebar with flat structure
|
103
|
-
|
104
|
-
### Content Structure
|
105
|
-
|
106
|
-
- **Homepage**: Hero section with badges, overview, and quick start
|
107
|
-
- **Sidebar**: Logical grouping of documentation sections
|
108
|
-
- **Search**: Full-text search across all documentation
|
109
|
-
- **Code Examples**: Syntax-highlighted Ruby code blocks
|
110
|
-
- **Cross-References**: Links between related sections
|
111
|
-
|
112
|
-
## Technical Considerations
|
113
|
-
|
114
|
-
### Jekyll Configuration
|
115
|
-
|
116
|
-
- Use gem-based approach with `just-the-docs` gem
|
117
|
-
- Configure for GitHub Pages compatibility
|
118
|
-
- Include necessary plugins: jekyll-feed, jekyll-sitemap, jekyll-seo-tag
|
119
|
-
- Set up proper permalinks and URL structure
|
120
|
-
|
121
|
-
### GitHub Actions Workflow
|
122
|
-
|
123
|
-
- Trigger on pushes to main branch
|
124
|
-
- Build Jekyll site
|
125
|
-
- Deploy to GitHub Pages
|
126
|
-
- Include proper error handling and notifications
|
127
|
-
|
128
|
-
### File Structure
|
129
|
-
|
130
|
-
```
|
131
|
-
/docs/
|
132
|
-
├── _config.yml
|
133
|
-
├── Gemfile
|
134
|
-
├── index.md (Home)
|
135
|
-
├── getting-started.md
|
136
|
-
├── installation.md
|
137
|
-
├── usage.md
|
138
|
-
├── configuration.md
|
139
|
-
├── alphabets.md
|
140
|
-
├── algorithms.md
|
141
|
-
├── performance.md
|
142
|
-
├── security.md
|
143
|
-
├── use-cases.md
|
144
|
-
├── development.md
|
145
|
-
├── api-reference.md
|
146
|
-
└── assets/
|
147
|
-
└── images/
|
148
|
-
```
|
149
|
-
|
150
|
-
## Success Metrics
|
151
|
-
|
152
|
-
1. **Developer Adoption**: Increased gem downloads and usage
|
153
|
-
2. **User Engagement**: Time spent on documentation pages
|
154
|
-
3. **Search Usage**: Frequency of search functionality usage
|
155
|
-
4. **Page Performance**: Fast loading times (< 3 seconds)
|
156
|
-
5. **Mobile Usage**: Successful mobile documentation access
|
157
|
-
6. **SEO Performance**: High search engine rankings for OpaqueId-related queries
|
158
|
-
|
159
|
-
## Open Questions
|
160
|
-
|
161
|
-
1. Should we include a changelog page or link to GitHub releases?
|
162
|
-
2. Do we want to include a "Troubleshooting" section for common issues?
|
163
|
-
3. Should we add a "Migration Guide" for users switching from nanoid.rb?
|
164
|
-
4. Do we want to include performance comparison charts or keep them as tables?
|
165
|
-
5. Should we add a "Community" section with links to discussions and support?
|
166
|
-
|
167
|
-
## Implementation Priority
|
168
|
-
|
169
|
-
### Phase 1: Core Setup
|
170
|
-
|
171
|
-
- Set up Jekyll site structure
|
172
|
-
- Configure GitHub Pages deployment
|
173
|
-
- Create basic page structure
|
174
|
-
|
175
|
-
### Phase 2: Content Migration
|
176
|
-
|
177
|
-
- Convert README content to individual pages
|
178
|
-
- Set up navigation and cross-references
|
179
|
-
- Add code syntax highlighting
|
180
|
-
|
181
|
-
### Phase 3: Enhancement
|
182
|
-
|
183
|
-
- Add search functionality
|
184
|
-
- Optimize performance and SEO
|
185
|
-
- Polish design and user experience
|
186
|
-
|
187
|
-
### Phase 4: Launch
|
188
|
-
|
189
|
-
- Deploy to GitHub Pages
|
190
|
-
- Test all functionality
|
191
|
-
- Announce to community
|