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.
Follow-up to #1187
Update descriptions so that they work well in the
README.md
generated bysuspenders:clean_up:generate_readme
.Also fixes a typo in
Suspenders::Cleanup::GenerateReadme
.I tested this locally by running the following:
Which produces the following:
Dummy
Prerequisites
Ruby:
>= 3.1
Node:
20.11.1
Local Development
Initial Setup
Running the Development Server
Seed Data
db/seeds.rb
to create records that need to exist in all environments.lib/tasks/dev.rake
to create records that only need to exist in development.Running
bin/setup
will rundev:prime
.Tasks
bin/rails suspenders:db:migrate
to run database migrations. This script ensures they are reversible.bin/rails suspenders:cleanup:organize_gemfile
to automatically organize the project's Gemfile.bin/rails default
to run the default Rake task. This will do the following:Configuration
Test
Development
Production
Linting
Available Commands
yarn lint
to lint front-end code.yarn fix:prettier
to automatically fix prettier violations.bin/rails standard
to lint ERB and Ruby code.bundle exec standardrb --fix
to fix standard violations.Testing
Uses RSpec and RSpec Rails in favor of the default test suite.
The test suite can be run with
bin/rails spec
.Configuration can be found in the following files:
Factories
Uses FactoryBot as an alternative to Fixtures to help you define
dummy and test data for your test suite. The
create
,build
, andbuild_stubbed
class methods are directly available to all tests.Place FactoryBot definitions in
spec/factories.rb
, at least until itgrows unwieldy. This helps reduce confusion around circular dependencies and
makes it easy to jump between definitions.
Accessibility
Uses capybara_accessibility_audit and
capybara_accessible_selectors to encourage and enforce accessibility best
practices.
Advisories
Uses bundler-audit to update the local security database and show
any relevant issues with the app's dependencies via a Rake task.
Mailers
Intercept emails in non-production environments by setting
INTERCEPTOR_ADDRESSES
.INTERCEPTOR_ADDRESSES="[email protected],[email protected]" bin/rails s
Configuration can be found at
config/initializers/email_interceptor.rb
.Interceptor can be found at
app/mailers/email_interceptor.rb
.Jobs
Uses Sidekiq for background job processing.
Configures the
test
environment to use the inline adapter.Layout and Assets
Stylesheets
Configuration can be found at
postcss.config.js
.Adds the following stylesheet structure.
Adds
app/assets/static
so that postcss-url has a directory to copyassets to.
Inline SVG
Uses inline_svg for embedding SVG documents into views.
Configuration can be found at
config/initializers/inline_svg.rb
Layout
app/views/application/_flashes.html.erb
.<html>
element toen
viaI18n.local
.<title>
via the title gem.