Merged
Conversation
Comment on lines
+56
to
+66
| ``` | ||
| heroku apps:create | ||
|
|
||
| heroku buildpacks:set heroku/nodejs | ||
| heroku buildpacks:set heroku/ruby | ||
|
|
||
| heroku addons:create heroku-postgresql:essential-0 | ||
| heroku addons:create heroku-redis:mini | ||
| heroku ci:config:set \ | ||
| APPLICATION_HOST=value-from-heroku | ||
| RAILS_MASTER_KEY=value-from-config/master.key |
Owner
Author
There was a problem hiding this comment.
I need to verify this.
| Because Staples sets `config.require_master_key = true`, you'll need to set this value in GitHub in order for GitHub Actions to work. | ||
|
|
||
| ``` | ||
| gh variable set RAILS_MASTER_KEY < config/master.key |
There was a problem hiding this comment.
Pull request overview
This PR introduces a Rails application template system that allows Staples to automatically configure new Rails applications with opinionated defaults including authentication (Devise), organizations, background jobs (Sidekiq), and a comprehensive test suite.
Key Changes:
- Adds a
source_pathsmethod override to enable relative file copying in the template - Integrates the template into the CLI via the
-mflag - Includes extensive application scaffolding (models, views, controllers, tests, migrations, and configuration)
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/staples/cli.rb | Updated to construct template path and pass it to rails new command via -m flag |
| spec/staples_spec.rb | Updated tests to verify template path is included in rails new arguments |
| lib/templates/base.rb | Main application template that orchestrates installation of gems, generators, and configuration |
| lib/templates/app/* | Application code including models (User, Organization, Membership), views, and controllers |
| lib/templates/test/* | Comprehensive test suite with factories, model tests, controller tests, and system tests |
| lib/templates/db/migrate/* | Database migrations for users, organizations, and memberships |
| lib/templates/config/initializers/* | Configuration for Sidekiq and High Voltage |
| lib/templates/lib/* | Development seeder and rake tasks for local development |
| lib/templates/README.md | Template README documenting features and configuration |
| lib/templates/Procfile | Production process configuration for Heroku deployment |
| README.md | Updated main README with extensive documentation of features, requirements, and deployment instructions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Introduces an [application template][template]. Override the `source_paths` method to contain the location of the template. Now methods like `copy_file` will accept relative paths to the template's location. [template]: https://guides.rubyonrails.org/generators.html#application-templates
6e96544 to
188ce37
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces an application template.
Override the
source_pathsmethod to contain the location of thetemplate. Now methods like
copy_filewill accept relative paths to thetemplate's location.