Skip to content

Commit

Permalink
Generators: Update descriptions
Browse files Browse the repository at this point in the history
Follow-up to #1187
  • Loading branch information
stevepolitodesign committed Apr 25, 2024
1 parent 2c8616a commit c7aa63a
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 20 deletions.
7 changes: 6 additions & 1 deletion lib/generators/suspenders/accessibility_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ class AccessibilityGenerator < Rails::Generators::Base
include Suspenders::Generators::APIAppUnsupported

desc <<~MARKDOWN
Installs capybara_accessibility_audit and capybara_accessible_selectors"
Uses [capybara_accessibility_audit][] and
[capybara_accessible_selectors][] to encourage and enforce accessibility best
practices.
[capybara_accessibility_audit]: https://github.com/thoughtbot/capybara_accessibility_audit
[capybara_accessible_selectors]: https://github.com/citizensadvice/capybara_accessible_selectors
MARKDOWN

def add_capybara_gems
Expand Down
6 changes: 3 additions & 3 deletions lib/generators/suspenders/advisories_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module Generators
class AdvisoriesGenerator < Rails::Generators::Base
source_root File.expand_path("../../templates/advisories", __FILE__)
desc <<~MARKDOWN
Show security advisories during development.
Uses [bundler-audit][] to update the local security database and show
any relevant issues with the app's dependencies via a Rake task.
Uses the `bundler-audit` gem to update the local security database and
show any relevant issues with the app's dependencies via a Rake task.
[bundler-audit]: https://github.com/rubysec/bundler-audit
MARKDOWN

def add_bundler_audit
Expand Down
5 changes: 4 additions & 1 deletion lib/generators/suspenders/ci_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ class CiGenerator < Rails::Generators::Base

source_root File.expand_path("../../templates/ci", __FILE__)
desc <<~MARKDOWN
Creates CI files for GitHub Actions
Uses [GitHub Actions][] for CI, and [Dependabot][] for dependency updates.
[GitHub Actions]: https://docs.github.com/en/actions
[Dependabot]: https://docs.github.com/en/code-security/dependabot/working-with-dependabot
MARKDOWN

def ci_files
Expand Down
8 changes: 6 additions & 2 deletions lib/generators/suspenders/email_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ module Generators
class EmailGenerator < Rails::Generators::Base
source_root File.expand_path("../../templates/email", __FILE__)
desc <<~MARKDOWN
Intercepts emails in non-production environments by setting `INTERCEPTOR_ADDRESSES`.
[Intercept][] emails in non-production environments by setting `INTERCEPTOR_ADDRESSES`.
```sh
INTERCEPTOR_ADDRESSES="user_1@example.com,user_2@example.com" bin/rails s
```
Configures `default_url_options` in `test` and `development`.
Configuration can be found at `config/initializers/email_interceptor.rb`.
Interceptor can be found at `app/mailers/email_interceptor.rb`.
[Intercept]: https://guides.rubyonrails.org/action_mailer_basics.html#intercepting-emails
MARKDOWN

def create_email_interceptor
Expand Down
18 changes: 8 additions & 10 deletions lib/generators/suspenders/factories_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ class FactoriesGenerator < Rails::Generators::Base

source_root File.expand_path("../../templates/factories", __FILE__)
desc <<~MARKDOWN
Build test data with clarity and ease.
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.
This uses FactoryBot 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.
We recommend putting FactoryBot definitions in one `spec/factories.rb` (or
`test/factories`) file, at least until it grows unwieldy. This helps reduce
confusion around circular dependencies and makes it easy to jump between
definitions.
Supports the default test suite and RSpec.
[FactoryBot]: https://github.com/thoughtbot/factory_bot
[Fixtures]: https://guides.rubyonrails.org/testing.html#the-low-down-on-fixtures
MARKDOWN

def add_factory_bot
Expand Down
6 changes: 5 additions & 1 deletion lib/generators/suspenders/inline_svg_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ class InlineSvgGenerator < Rails::Generators::Base
include Suspenders::Generators::APIAppUnsupported
source_root File.expand_path("../../templates/inline_svg", __FILE__)
desc <<~MARKDOWN
Render SVG images inline, as a potential performance improvement for the viewer.
Uses [inline_svg][] for embedding SVG documents into views.
Configuration can be found at `config/initializers/inline_svg.rb`
[inline_svg]: https://github.com/jamesmartin/inline_svg
MARKDOWN

def add_inline_svg_gem
Expand Down
8 changes: 7 additions & 1 deletion lib/generators/suspenders/jobs_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ module Suspenders
module Generators
class JobsGenerator < Rails::Generators::Base
desc <<~MARKDOWN
Installs Sidekiq for background job processing.
Uses [Sidekiq][] for [background job][] processing.
Configures the `test` environment to use the [inline][] adapter.
[Sidekiq]: https://github.com/sidekiq/sidekiq
[background job]: https://guides.rubyonrails.org/active_job_basics.html
[inline]: https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/InlineAdapter.html
MARKDOWN

def add_sidekiq_gem
Expand Down
19 changes: 18 additions & 1 deletion lib/generators/suspenders/lint_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,24 @@ class LintGenerator < Rails::Generators::Base

source_root File.expand_path("../../templates/lint", __FILE__)
desc <<~MARKDOWN
Creates a holistic linting solution that covers JavaScript, CSS, Ruby and ERB.
Uses [@thoughtbot/eslint-config][] for JavaScript linting.
Uses [@thoughtbot/stylelint-config][] for CSS linting.
Uses [prettier][] for additional linting.
Uses [better_html][], [erb_lint][], and [erblint-github][] for ERB linting.
Uses [standard][] for Ruby linting.
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.
[@thoughtbot/eslint-config]: https://github.com/thoughtbot/eslint-config
[@thoughtbot/stylelint-config]: https://github.com/thoughtbot/stylelint-config
[prettier]: https://prettier.io
[better_html]: https://github.com/Shopify/better-html
[erb_lint]: https://github.com/Shopify/erb-lint
[erblint-github]: https://github.com/github/erblint-github
[standard]: https://github.com/standardrb/standard
MARKDOWN

def check_package_json
Expand Down

0 comments on commit c7aa63a

Please sign in to comment.