-
-
Notifications
You must be signed in to change notification settings - Fork 61
Add automated release rake tasks #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Warning Rate limit exceeded@justin808 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 42 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughIntroduces v1.19.0 with new test-runner Rake tasks, a server orchestration class, state-reset middleware, configuration hooks and settings, Railtie task loading, and extensive documentation (README, CHANGELOG, release notes/checklist, guides). Also bumps the version and updates the generator initializer template with commented configuration options. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant Rake as Rake Task (cypress:run/open/init / playwright:run/open)
participant Srv as CypressOnRails::Server
participant Rails as Rails Server
participant Runner as Test Runner (Cypress/Playwright)
participant MW as StateResetMiddleware
Dev->>Rake: Invoke task
Rake->>Srv: new(...).run/open/init
rect rgba(230,245,255,0.6)
note right of Srv: Server lifecycle (new in 1.19)
Srv->>Srv: Apply config (host/port/transactional)
Srv->>Rails: Spawn server (hooks: before/after start)
Srv-->>Rails: Wait until ready
end
alt transactional_server enabled
Srv->>Rails: Begin transaction (hook: after_transaction_start)
end
Srv->>Runner: Execute command with baseUrl
Runner->>MW: Optional call /__cypress__/reset_state
MW->>MW: Reset DB/cache/deps (hook: after_state_reset)
Runner-->>Srv: Exit status
rect rgba(230,245,255,0.6)
Srv->>Rails: Shutdown (hook: before_server_stop)
end
Srv-->>Rake: Result
Rake-->>Dev: Task completes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
Code Review for PR #182: Prepare for v1.19.0 releaseThank you for this comprehensive release preparation! I've reviewed the changes and here's my feedback: ✅ Strengths
🔍 Code Quality Observations1. Error Handling in Server Management (lib/cypress_on_rails/server.rb)The new Server class should have more robust error handling:
2. Configuration Validation (lib/cypress_on_rails/configuration.rb)The new configuration options should validate input:
3. State Reset Middleware (lib/cypress_on_rails/state_reset_middleware.rb)Security consideration: Ensure this endpoint is properly protected and only accessible in test environment. 🐛 Potential Issues
🚀 Performance Considerations
🔒 Security Concerns
📋 Test CoverageThe PR would benefit from:
💡 Suggestions
✨ Minor Improvements
Overall Assessment: This is a solid release that significantly improves the developer experience. The cypress-rails compatibility and comprehensive documentation address real user needs. The main areas for improvement are around error handling, validation, and test coverage for the new features. Great work on making the gem more accessible and user-friendly! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/TROUBLESHOOTING.md (1)
386-409
: Correct the Cypress helper name for VCR cassette recordingThe surrounding snippets define the helper as
Cypress.Commands.add('vcrInsert', ...)
, so the usage here should becy.vcrInsert(...)
/cy.vcrEject(...)
. Callingcy.vcr_insert_cassette
will throw “is not a function” at runtime, so the troubleshooting guidance currently sends users down a broken path. Please fix this section (and the similar examples lower in the file) to match the actual command names.-```js -cy.vcr_insert_cassette('my_cassette', { record: 'new_episodes' }); -``` +```js +cy.vcrInsert('my_cassette', { record: 'new_episodes' }); +```
🧹 Nitpick comments (3)
RELEASE_NOTES_1.19.0.md (1)
98-98
: Wrap bare URL to keep markdownlint happymarkdownlint flags the bare GitHub URL (MD034). Converting it to a markdown link resolves the lint failure.
-Please report issues at: https://github.com/shakacode/cypress-playwright-on-rails/issues +Please report issues at: [github.com/shakacode/cypress-playwright-on-rails/issues](https://github.com/shakacode/cypress-playwright-on-rails/issues)Based on static analysis hints.
RELEASE_CHECKLIST.md (1)
40-40
: Format the bare URL to avoid markdownlint errorsSame MD034 warning here—wrapping the release page URL fixes the lint complaint.
-- [ ] Go to https://github.com/shakacode/cypress-playwright-on-rails/releases/new +- [ ] Go to [github.com/shakacode/cypress-playwright-on-rails/releases/new](https://github.com/shakacode/cypress-playwright-on-rails/releases/new)Based on static analysis hints.
docs/PLAYWRIGHT_GUIDE.md (1)
48-63
: Add a fenced code language specifier.Line 48 opens a fenced block without a language tag, tripping markdownlint (MD040) and hurting consistency with the rest of the guide. Please annotate it (e.g., ```text) so tooling stays quiet and formatting is predictable.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
CHANGELOG.md
(1 hunks)README.md
(4 hunks)RELEASE_CHECKLIST.md
(1 hunks)RELEASE_NOTES_1.19.0.md
(1 hunks)docs/BEST_PRACTICES.md
(1 hunks)docs/DX_IMPROVEMENTS.md
(1 hunks)docs/PLAYWRIGHT_GUIDE.md
(1 hunks)docs/TROUBLESHOOTING.md
(1 hunks)docs/VCR_GUIDE.md
(1 hunks)lib/cypress_on_rails/configuration.rb
(2 hunks)lib/cypress_on_rails/railtie.rb
(1 hunks)lib/cypress_on_rails/server.rb
(1 hunks)lib/cypress_on_rails/state_reset_middleware.rb
(1 hunks)lib/cypress_on_rails/version.rb
(1 hunks)lib/generators/cypress_on_rails/templates/config/initializers/cypress_on_rails.rb.erb
(1 hunks)lib/tasks/cypress.rake
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
lib/cypress_on_rails/server.rb (2)
lib/cypress_on_rails/configuration.rb (2)
initialize
(36-38)configuration
(76-78)lib/cypress_on_rails/state_reset_middleware.rb (4)
initialize
(2-44)initialize
(3-5)run_hook
(41-43)call
(7-14)
lib/cypress_on_rails/state_reset_middleware.rb (2)
lib/cypress_on_rails/configuration.rb (1)
configuration
(76-78)lib/cypress_on_rails/server.rb (1)
run_hook
(190-194)
🪛 markdownlint-cli2 (0.18.1)
RELEASE_CHECKLIST.md
40-40: Bare URL used
(MD034, no-bare-urls)
RELEASE_NOTES_1.19.0.md
98-98: Bare URL used
(MD034, no-bare-urls)
docs/BEST_PRACTICES.md
18-18: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/TROUBLESHOOTING.md
18-18: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
18-18: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
20-20: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
20-20: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
83-83: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
83-83: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
83-83: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
103-103: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
103-103: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
103-103: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
129-129: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
129-129: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
131-131: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
131-131: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
131-131: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
142-142: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
142-142: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
142-142: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
168-168: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
168-168: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
170-170: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
170-170: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
256-256: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
256-256: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
256-256: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
266-266: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
266-266: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
266-266: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
275-275: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
275-275: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
275-275: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
292-292: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
292-292: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
294-294: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
294-294: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
docs/PLAYWRIGHT_GUIDE.md
48-48: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
CHANGELOG.md
13-13: Link and image reference definitions should be needed
Unused link or image reference definition: "compare"
(MD053, link-image-reference-definitions)
docs/DX_IMPROVEMENTS.md
79-79: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/VCR_GUIDE.md
197-197: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
371-371: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
371-371: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
384-384: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
384-384: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
386-386: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
386-386: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
413-413: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
413-413: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
428-428: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
428-428: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
430-430: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
430-430: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
453-453: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
453-453: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
463-463: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
463-463: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
477-477: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
477-477: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
478-478: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
478-478: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
479-479: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
479-479: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
480-480: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
480-480: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
481-481: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
481-481: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
482-482: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
482-482: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
486-486: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
486-486: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
487-487: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
487-487: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
492-492: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
492-492: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
493-493: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
493-493: Strong style
Expected: underscore; Actual: asterisk
(MD050, strong-style)
🪛 Brakeman (7.0.2)
lib/cypress_on_rails/server.rb
[medium] 187-187: Possible command injection
Type: Command Injection
Confidence: Medium
More info: https://brakemanscanner.org/docs/warning_types/command_injection/
(Command Injection)
[medium] 107-107: Possible command injection
Type: Command Injection
Confidence: Medium
More info: https://brakemanscanner.org/docs/warning_types/command_injection/
(Command Injection)
lib/cypress_on_rails/state_reset_middleware.rb
[medium] 30-30: Possible SQL injection
Type: SQL Injection
Confidence: Medium
More info: https://brakemanscanner.org/docs/warning_types/sql_injection/
(SQL Injection)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: rails_8
- GitHub Check: rails_6_1
- GitHub Check: rails_7_2
- GitHub Check: claude-review
🔇 Additional comments (1)
CHANGELOG.md (1)
12-13
: Verify the release date before taggingThe entry is dated 2025-09-27, but we’re preparing the release on 2025-09-28. Please double-check the actual tag date before merge so the changelog reflects the true release timeline.
afterEach(() => { | ||
cy.vcr_eject_cassette(); | ||
}); | ||
|
||
it('fetches weather data', () => { | ||
// Start recording | ||
cy.vcr_insert_cassette('weather_api', { | ||
record: 'new_episodes' | ||
}); | ||
|
||
cy.visit('/weather'); | ||
cy.contains('Current Temperature'); | ||
|
||
// Recording continues until ejected | ||
}); | ||
|
||
it('handles API errors', () => { | ||
// Use pre-recorded cassette | ||
cy.vcr_insert_cassette('weather_api_error', { | ||
record: 'none' // Only replay, don't record | ||
}); | ||
|
||
cy.visit('/weather?city=invalid'); | ||
cy.contains('City not found'); | ||
}); | ||
}); | ||
``` | ||
|
||
### Advanced Options | ||
```js | ||
cy.vcr_insert_cassette('api_calls', { | ||
record: 'new_episodes', // Recording mode | ||
match_requests_on: ['method', 'uri', 'body'], // Request matching | ||
erb: true, // Enable ERB in cassettes | ||
allow_playback_repeats: true, // Allow multiple replays | ||
exclusive: true, // Disallow other cassettes | ||
serialize_with: 'json', // Use JSON format | ||
preserve_exact_body_bytes: true, // For binary data | ||
decode_compressed_response: true // Handle gzipped responses | ||
}); | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align VCR usage examples with the defined Cypress commands
Earlier in this guide you add vcrInsert
/vcrEject
commands, but the examples here (and later in the file) switch to cy.vcr_insert_cassette
/ cy.vcr_eject_cassette
, which aren’t defined and will break consumer suites. Please update all occurrences to the camelCase helpers that the guide tells readers to register.
- afterEach(() => {
- cy.vcr_eject_cassette();
+ afterEach(() => {
+ cy.vcrEject();
});
it('fetches weather data', () => {
// Start recording
- cy.vcr_insert_cassette('weather_api', {
+ cy.vcrInsert('weather_api', {
record: 'new_episodes'
});
@@
- cy.vcr_insert_cassette('weather_api_error', {
+ cy.vcrInsert('weather_api_error', {
record: 'none' // Only replay, don't record
});
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
afterEach(() => { | |
cy.vcr_eject_cassette(); | |
}); | |
it('fetches weather data', () => { | |
// Start recording | |
cy.vcr_insert_cassette('weather_api', { | |
record: 'new_episodes' | |
}); | |
cy.visit('/weather'); | |
cy.contains('Current Temperature'); | |
// Recording continues until ejected | |
}); | |
it('handles API errors', () => { | |
// Use pre-recorded cassette | |
cy.vcr_insert_cassette('weather_api_error', { | |
record: 'none' // Only replay, don't record | |
}); | |
cy.visit('/weather?city=invalid'); | |
cy.contains('City not found'); | |
}); | |
}); | |
``` | |
### Advanced Options | |
```js | |
cy.vcr_insert_cassette('api_calls', { | |
record: 'new_episodes', // Recording mode | |
match_requests_on: ['method', 'uri', 'body'], // Request matching | |
erb: true, // Enable ERB in cassettes | |
allow_playback_repeats: true, // Allow multiple replays | |
exclusive: true, // Disallow other cassettes | |
serialize_with: 'json', // Use JSON format | |
preserve_exact_body_bytes: true, // For binary data | |
decode_compressed_response: true // Handle gzipped responses | |
}); | |
``` | |
afterEach(() => { | |
cy.vcrEject(); | |
}); | |
it('fetches weather data', () => { | |
// Start recording | |
cy.vcrInsert('weather_api', { | |
record: 'new_episodes' | |
}); | |
cy.visit('/weather'); | |
cy.contains('Current Temperature'); | |
// Recording continues until ejected | |
}); | |
it('handles API errors', () => { | |
// Use pre-recorded cassette | |
cy.vcrInsert('weather_api_error', { | |
record: 'none' // Only replay, don't record | |
}); | |
cy.visit('/weather?city=invalid'); | |
cy.contains('City not found'); | |
}); | |
}); |
🤖 Prompt for AI Agents
In docs/VCR_GUIDE.md around lines 130 to 171, the examples use undefined
commands cy.vcr_insert_cassette and cy.vcr_eject_cassette; change those to the
previously defined camelCase helpers cy.vcrInsert and cy.vcrEject (update both
the test examples and the Advanced Options block occurrences) so all examples
match the registered Cypress commands and won’t break consumer suites.
if @transactional && defined?(ActiveRecord::Base) | ||
ActiveRecord::Base.connection.begin_transaction(joinable: false) | ||
run_hook(config.after_transaction_start) | ||
end | ||
|
||
yield | ||
|
||
ensure | ||
run_hook(config.before_server_stop) | ||
|
||
if @transactional && defined?(ActiveRecord::Base) | ||
ActiveRecord::Base.connection.rollback_transaction if ActiveRecord::Base.connection.transaction_open? | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the ineffective transactional wrapper.
Lines 78-89 attempt to wrap the run in a database transaction, but the Rails server is spawned in a separate process with its own connections. Any writes from the UI runner bypass this transaction, so the rollback never reverts test data, giving a false sense of isolation. Please drop the begin/rollback (and associated hook) until there’s a cross-process strategy—otherwise we quietly leave the database dirty.
- if @transactional && defined?(ActiveRecord::Base)
- ActiveRecord::Base.connection.begin_transaction(joinable: false)
- run_hook(config.after_transaction_start)
- end
-
yield
ensure
- run_hook(config.before_server_stop)
-
- if @transactional && defined?(ActiveRecord::Base)
- ActiveRecord::Base.connection.rollback_transaction if ActiveRecord::Base.connection.transaction_open?
- end
+ run_hook(config.before_server_stop)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if @transactional && defined?(ActiveRecord::Base) | |
ActiveRecord::Base.connection.begin_transaction(joinable: false) | |
run_hook(config.after_transaction_start) | |
end | |
yield | |
ensure | |
run_hook(config.before_server_stop) | |
if @transactional && defined?(ActiveRecord::Base) | |
ActiveRecord::Base.connection.rollback_transaction if ActiveRecord::Base.connection.transaction_open? | |
end | |
yield | |
ensure | |
run_hook(config.before_server_stop) |
🤖 Prompt for AI Agents
In lib/cypress_on_rails/server.rb around lines 77 to 90, remove the ineffective
cross-process transactional wrapper: delete the conditional block that calls
ActiveRecord::Base.connection.begin_transaction and the
run_hook(config.after_transaction_start) call before yield, and delete the
corresponding ensure-time rollback logic that checks transaction_open? and calls
rollback_transaction; keep the run_hook(config.before_server_stop) and the yield
intact. This removes the misleading @transactional begin/rollback behavior until
a proper cross-process strategy is implemented.
gem 'cypress-on-rails', '~> 1.0' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the Gemfile version constraint for the new release.
Line 55 still instructs users to install cypress-on-rails
with ~> 1.0
, which predates the rake tasks and lifecycle hooks we’re highlighting in this README. Following these updated instructions with the old constraint will pull in 1.0.x and the described features will be missing. Let’s bump the example to ~> 1.19
(or ~> 1.19.0
) so Quick Start reflects the release we’re preparing.
- gem 'cypress-on-rails', '~> 1.0'
+ gem 'cypress-on-rails', '~> 1.19'
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
gem 'cypress-on-rails', '~> 1.0' | |
gem 'cypress-on-rails', '~> 1.19' |
🤖 Prompt for AI Agents
In README.md around lines 54 to 55, the Gemfile example pins cypress-on-rails to
"~> 1.0" which will pull an older release missing the rake tasks and lifecycle
hooks described; update the example line to use "~> 1.19" (or "~> 1.19.0") so
the Quick Start reflects the new release and its features.
e14fa03
to
ac7d59a
Compare
Implements rake tasks for automating the release process, similar to Shakapacker. New rake tasks: - rake release:prepare[VERSION] - Bumps version and updates CHANGELOG - rake release:publish - Tags, builds, and publishes gem to RubyGems - rake release:full[VERSION] - Complete release in one command Features: - Validates semantic versioning format - Confirms before making changes - Updates version.rb automatically - Updates CHANGELOG.md with date and compare link - Runs test suite before publishing - Creates and pushes git tags - Builds and publishes to RubyGems - Provides clear next steps after each phase Documentation: - RELEASING.md with complete release process guide - Troubleshooting section for common issues - Examples and pre-release checklist This eliminates the need for a manual PR to bump versions. Instead, maintainers can run: rake release:prepare[1.19.0] 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
ac7d59a
to
a31853c
Compare
Summary
Adds automated release rake tasks to streamline the release process, eliminating the need for manual version bump PRs.
Rake Tasks Added
rake release:prepare[VERSION]
Prepares a new release by:
lib/cypress_on_rails/version.rb
CHANGELOG.md
with date and compare linkrake release:publish
Publishes the release by:
rake release:full[VERSION]
Combines both prepare and publish for one-command releases.
Documentation
Added
RELEASING.md
with:Usage Example
Benefits
Changes From Original PR
This PR now focuses on infrastructure rather than a one-time version bump:
The actual v1.19.0 release will be performed by running:
After this PR is merged.
Next Steps After Merge
rake release:prepare[1.19.0]
on masterrake release:publish
to release v1.19.0🤖 Generated with Claude Code