Skip to content
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

Generators: Update descriptions #1198

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

stevepolitodesign
Copy link
Contributor

@stevepolitodesign stevepolitodesign commented Apr 26, 2024

Follow-up to #1187

Update descriptions so that they work well in the README.md generated by suspenders:clean_up:generate_readme.

Also fixes a typo in Suspenders::Cleanup::GenerateReadme.

I tested this locally by running the following:

cd test/dummy
bin/rails suspenders:cleanup:generate_readme
cat README.md | pbcopy

Which produces the following:


Dummy

Prerequisites

Ruby: >= 3.1
Node: 20.11.1

Local Development

Initial Setup

bin/setup

Running the Development Server

bin/rails dev

Seed Data

  • Use db/seeds.rb to create records that need to exist in all environments.
  • Use lib/tasks/dev.rake to create records that only need to exist in development.

Running bin/setup will run dev:prime.

Tasks

  • Use bin/rails suspenders:db:migrate to run database migrations. This script ensures they are reversible.
  • Use bin/rails suspenders:cleanup:organize_gemfile to automatically organize the project's Gemfile.
  • Use bin/rails default to run the default Rake task. This will do the following:
    • Run the test suite.
    • Run a Ruby and ERB linter.
    • Scan the Ruby codebase for any dependency vulnerabilities.

Configuration

Test

Development

Production

Linting

Available Commands

  • Run yarn lint to lint front-end code.
  • Run yarn fix:prettier to automatically fix prettier violations.
  • Run bin/rails standard to lint ERB and Ruby code.
  • Run 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:

spec/rails_helper.rb
spec/spec_helper.rb
spec/support/action_mailer.rb
spec/support/driver.rb
spec/support/i18n.rb
spec/support/should_matchers.rb

Factories

Uses FactoryBot as an alternative to Fixtures to help you define
dummy and test data for your test suite. The create, build, and
build_stubbed class methods are directly available to all tests.

Place FactoryBot definitions in spec/factories.rb, at least until it
grows 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.

app/assets/stylesheets/base.css
app/assets/stylesheets/components.css
app/assets/stylesheets/utilities.css

Adds app/assets/static so that postcss-url has a directory to copy
assets to.

Inline SVG

Uses inline_svg for embedding SVG documents into views.

Configuration can be found at config/initializers/inline_svg.rb

Layout

  • A partial for flash messages is located in app/views/application/_flashes.html.erb.
  • Sets lang attribute on <html> element to en via I18n.local.
  • Dynamically sets <title> via the title gem.
  • Disables Turbo's Prefetch in an effort to reduce unnecessary network requests.

Follow-up to #1187

Update descriptions so that they work well in the `README.md` generated
by `suspenders:clean_up:generate_readme`.

Also fixes a typo in `Suspenders::Cleanup::GenerateReadme`.
@stevepolitodesign stevepolitodesign merged commit fc1c08e into suspenders-3-0-0 Apr 26, 2024
2 checks passed
@stevepolitodesign stevepolitodesign deleted the suspenders-3-0-0-descriptions branch April 26, 2024 14:54
stevepolitodesign added a commit that referenced this pull request May 10, 2024
Follow-up to #1187

Update descriptions so that they work well in the `README.md` generated
by `suspenders:clean_up:generate_readme`.

Also fixes a typo in `Suspenders::Cleanup::GenerateReadme`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant