diff --git a/lib/generators/suspenders/accessibility_generator.rb b/lib/generators/suspenders/accessibility_generator.rb index 003ac817d..44c415af0 100644 --- a/lib/generators/suspenders/accessibility_generator.rb +++ b/lib/generators/suspenders/accessibility_generator.rb @@ -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 diff --git a/lib/generators/suspenders/advisories_generator.rb b/lib/generators/suspenders/advisories_generator.rb index 2d27fca50..82c5100a2 100644 --- a/lib/generators/suspenders/advisories_generator.rb +++ b/lib/generators/suspenders/advisories_generator.rb @@ -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 diff --git a/lib/generators/suspenders/ci_generator.rb b/lib/generators/suspenders/ci_generator.rb index 4204b38d0..51e7d01b5 100644 --- a/lib/generators/suspenders/ci_generator.rb +++ b/lib/generators/suspenders/ci_generator.rb @@ -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 diff --git a/lib/generators/suspenders/email_generator.rb b/lib/generators/suspenders/email_generator.rb index 7883b692a..f46536acc 100644 --- a/lib/generators/suspenders/email_generator.rb +++ b/lib/generators/suspenders/email_generator.rb @@ -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 diff --git a/lib/generators/suspenders/factories_generator.rb b/lib/generators/suspenders/factories_generator.rb index 855b82984..48fb06a39 100644 --- a/lib/generators/suspenders/factories_generator.rb +++ b/lib/generators/suspenders/factories_generator.rb @@ -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 diff --git a/lib/generators/suspenders/inline_svg_generator.rb b/lib/generators/suspenders/inline_svg_generator.rb index 0d530aaef..0728e4276 100644 --- a/lib/generators/suspenders/inline_svg_generator.rb +++ b/lib/generators/suspenders/inline_svg_generator.rb @@ -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 diff --git a/lib/generators/suspenders/jobs_generator.rb b/lib/generators/suspenders/jobs_generator.rb index 5657a029d..709f01063 100644 --- a/lib/generators/suspenders/jobs_generator.rb +++ b/lib/generators/suspenders/jobs_generator.rb @@ -3,7 +3,16 @@ module Generators class JobsGenerator < Rails::Generators::Base source_root File.expand_path("../../templates/active_job", __FILE__) desc <<~MARKDOWN - Installs Sidekiq for background job processing. + Uses [Sidekiq][] for [background job][] processing. + + Configures the following: + + - [active_job.queue_adapter][] = `false` + - [action_mailer.deliver_later_queue_name][] = `nil` + - [ + + [Sidekiq]: https://github.com/sidekiq/sidekiq + [background job]: https://guides.rubyonrails.org/active_job_basics.html MARKDOWN def add_sidekiq_gem diff --git a/test/fixtures/files/active_job.rb b/test/fixtures/files/active_job.rb index ce7cbd7c2..d4e7e6321 100644 --- a/test/fixtures/files/active_job.rb +++ b/test/fixtures/files/active_job.rb @@ -1,3 +1,5 @@ +# TODO Remove this +# https://github.com/rails/rails/pull/43390 require "active_job/logging" require "active_job/log_subscriber"