nextgen 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/exe/nextgen +1 -0
  3. data/lib/nextgen/actions/bundler.rb +3 -1
  4. data/lib/nextgen/actions/git.rb +2 -0
  5. data/lib/nextgen/actions/yarn.rb +2 -0
  6. data/lib/nextgen/actions.rb +5 -3
  7. data/lib/nextgen/cli.rb +2 -0
  8. data/lib/nextgen/commands/create.rb +2 -0
  9. data/lib/nextgen/ext/prompt/list.rb +2 -0
  10. data/lib/nextgen/ext/prompt/multilist.rb +2 -0
  11. data/lib/nextgen/generators/action_mailer.rb +2 -0
  12. data/lib/nextgen/generators/annotate.rb +2 -0
  13. data/lib/nextgen/generators/base.rb +4 -0
  14. data/lib/nextgen/generators/basic_auth.rb +2 -0
  15. data/lib/nextgen/generators/brakeman.rb +2 -0
  16. data/lib/nextgen/generators/bundler_audit.rb +2 -0
  17. data/lib/nextgen/generators/capybara_lockstep.rb +9 -1
  18. data/lib/nextgen/generators/clean_gemfile.rb +2 -0
  19. data/lib/nextgen/generators/dotenv.rb +2 -0
  20. data/lib/nextgen/generators/erb_lint.rb +2 -0
  21. data/lib/nextgen/generators/eslint.rb +2 -0
  22. data/lib/nextgen/generators/factory_bot_rails.rb +2 -0
  23. data/lib/nextgen/generators/git_safe.rb +2 -0
  24. data/lib/nextgen/generators/github_actions.rb +2 -0
  25. data/lib/nextgen/generators/github_pr_template.rb +2 -0
  26. data/lib/nextgen/generators/good_migrations.rb +2 -0
  27. data/lib/nextgen/generators/home_controller.rb +2 -0
  28. data/lib/nextgen/generators/initial_git_commit.rb +2 -0
  29. data/lib/nextgen/generators/letter_opener.rb +2 -0
  30. data/lib/nextgen/generators/node.rb +2 -0
  31. data/lib/nextgen/generators/open_browser_on_start.rb +2 -0
  32. data/lib/nextgen/generators/overcommit.rb +2 -0
  33. data/lib/nextgen/generators/pgcli_rails.rb +2 -0
  34. data/lib/nextgen/generators/rack_canonical_host.rb +2 -0
  35. data/lib/nextgen/generators/rack_mini_profiler.rb +2 -0
  36. data/lib/nextgen/generators/rspec_rails.rb +2 -0
  37. data/lib/nextgen/generators/rspec_system_testing.rb +3 -1
  38. data/lib/nextgen/generators/rubocop.rb +2 -0
  39. data/lib/nextgen/generators/shoulda.rb +2 -0
  40. data/lib/nextgen/generators/sidekiq.rb +2 -0
  41. data/lib/nextgen/generators/staging.rb +2 -0
  42. data/lib/nextgen/generators/stylelint.rb +2 -0
  43. data/lib/nextgen/generators/thor.rb +2 -0
  44. data/lib/nextgen/generators/tomo.rb +2 -0
  45. data/lib/nextgen/generators/vcr.rb +2 -0
  46. data/lib/nextgen/generators/vite.rb +2 -0
  47. data/lib/nextgen/generators.rb +2 -0
  48. data/lib/nextgen/rails.rb +2 -0
  49. data/lib/nextgen/rails_options.rb +2 -0
  50. data/lib/nextgen/thor_extensions.rb +2 -0
  51. data/lib/nextgen/tidy_gemfile.rb +4 -2
  52. data/lib/nextgen/version.rb +3 -1
  53. data/lib/nextgen.rb +2 -0
  54. data/template/.erb-lint.yml.tt +2 -0
  55. data/template/.rubocop.yml.tt +0 -3
  56. data/template/Thorfile +2 -0
  57. data/template/app/controllers/concerns/basic_auth.rb +2 -0
  58. data/template/app/controllers/home_controller.rb +2 -0
  59. data/template/app/helpers/inline_svg_helper.rb +2 -0
  60. data/template/bin/setup +1 -0
  61. data/template/config/environments/staging.rb +2 -0
  62. data/template/config/initializers/generators.rb +2 -0
  63. data/template/config/initializers/rack_mini_profiler.rb +2 -0
  64. data/template/config/initializers/sidekiq.rb +2 -0
  65. data/template/lib/puma/plugin/open.rb +2 -0
  66. data/template/lib/tasks/auto_annotate_models.rake +2 -0
  67. data/template/lib/tasks/erblint.rake +2 -0
  68. data/template/lib/tasks/eslint.rake +2 -0
  69. data/template/lib/tasks/rubocop.rake +2 -0
  70. data/template/lib/tasks/stylelint.rake +2 -0
  71. data/template/lib/templates/rspec/system/system_spec.rb +2 -0
  72. data/template/lib/vite_inline_svg_file_loader.rb +2 -0
  73. data/template/spec/support/factory_bot.rb +2 -0
  74. data/template/spec/support/mailer.rb +2 -0
  75. data/template/spec/support/shoulda.rb +2 -0
  76. data/template/spec/support/system.rb +2 -0
  77. data/template/spec/support/webmock.rb +2 -0
  78. data/template/test/application_system_test_case.rb +2 -0
  79. data/template/test/helpers/inline_svg_helper_test.rb +2 -0
  80. data/template/test/support/capybara.rb.tt +15 -10
  81. data/template/test/support/factory_bot.rb +2 -0
  82. data/template/test/support/mailer.rb +2 -0
  83. data/template/test/support/shoulda.rb +2 -0
  84. data/template/test/support/vcr.rb.tt +2 -0
  85. data/template/test/support/webmock.rb +2 -0
  86. data/template/test/vite_helper.rb +2 -0
  87. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c12df02c71f082201cf7bf8c9e24c4f3d2d1c30a9969a70cf91b5597375b0648
4
- data.tar.gz: cd01af3eebf2075ef05b9d1bc5c1dc4856acc101589f87bb0c5d8d59126553d4
3
+ metadata.gz: d8205ff3de045b2343981785aeba004a4730b708915c47e989ed2ddf566adfb5
4
+ data.tar.gz: ab88579fb4a7e827bd8464176368f27cfb3c595145d11279a0422bbc33a02b3f
5
5
  SHA512:
6
- metadata.gz: 630e92302ffd0d5f87b3e37c9d64fb4f4f6fa7a67ce45b585e1398bab30566097e3f092e54b922db3f8a68ba83c8b0d661fbde48c8f636baff3f908af4de724c
7
- data.tar.gz: 760e9b02cc4b8bb948a2e6d707af9bfdfd212658699e80578249ca7ca02ec1763f5baebc2583d8e44c7b054d718a458536acce757414334224090df31361ef26
6
+ metadata.gz: bcecb49b31305607a4b0ad25e83625d2743f69b5e5a33a91d0daa778c60037cd61d2b708bfc856457774bc5958a46acec33a578f11d9a8b55438d168696fe152
7
+ data.tar.gz: 42bb4e8a64a011d3aa7d09fc1fb4160313c7c636bc6ade2ef2bfabe8e459561bc4654660a837a03867c2b18bbc1ff148fef47fee5be58649b9c746226aa0d0a1
data/exe/nextgen CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "nextgen"
4
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Nextgen
2
4
  module Actions::Bundler
3
5
  def binstubs(*gems)
@@ -21,7 +23,7 @@ module Nextgen
21
23
 
22
24
  gemfile.save
23
25
  cmd = "install"
24
- cmd << " --quiet" if noisy_bundler_version?
26
+ cmd += " --quiet" if noisy_bundler_version?
25
27
  bundle_command! cmd
26
28
  end
27
29
  alias install_gem install_gems
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "open3"
2
4
  require "securerandom"
3
5
  require "shellwords"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Nextgen
2
4
  module Actions::Yarn
3
5
  def add_yarn_packages(*packages, dev: false)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Nextgen
2
4
  module Actions
3
5
  include Bundler
@@ -82,9 +84,9 @@ module Nextgen
82
84
 
83
85
  def document_deploy_var(var_name, desc = nil, required: false, default: nil)
84
86
  insertion = "`#{var_name}`"
85
- insertion << " **REQUIRED**" if required
86
- insertion << " - #{desc}" if desc.present?
87
- insertion << " (default: #{default})" unless default.nil?
87
+ insertion += " **REQUIRED**" if required
88
+ insertion += " - #{desc}" if desc.present?
89
+ insertion += " (default: #{default})" unless default.nil?
88
90
 
89
91
  copy_file "DEPLOYMENT.md" unless File.exist?("DEPLOYMENT.md")
90
92
  inject_into_file "DEPLOYMENT.md", "#{insertion}\n- ", after: /^## Environment variables.*?^- /m
data/lib/nextgen/cli.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "thor"
2
4
 
3
5
  module Nextgen
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "active_support/core_ext/string/inflections"
2
4
  require "fileutils"
3
5
  require "forwardable"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "tty-prompt"
2
4
  require "tty-screen"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "tty-prompt"
2
4
 
3
5
  module Nextgen::Ext
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Configure Action Mailer for testing"
2
4
  copy_test_support_file "mailer.rb"
3
5
  if minitest?
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  install_gem "annotate", group: :development
2
4
  copy_file "lib/tasks/auto_annotate_models.rake"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Add improved bin/setup script"
2
4
  copy_file "bin/setup", mode: :preserve, force: true
3
5
 
@@ -29,6 +31,8 @@ if File.exist?("test/application_system_test_case.rb")
29
31
  say_git "Configure system tests"
30
32
  copy_test_support_file "capybara.rb.tt"
31
33
  copy_file "test/application_system_test_case.rb", force: true
34
+ gsub_file "Gemfile", /gem "capybara"$/, '\0, require: false'
35
+ gsub_file "Gemfile", /gem "selenium-webdriver"$/, '\0, require: false'
32
36
  end
33
37
 
34
38
  if File.exist?(".ruby-version") && File.read(".ruby-version").match?(/\A\d+\.\d+.\d+.\s*\z/m)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  document_deploy_var "BASIC_AUTH_PASSWORD"
2
4
  document_deploy_var "BASIC_AUTH_USERNAME",
3
5
  "If this and `BASIC_AUTH_PASSWORD` are present, visitors must use these credentials to access the app"
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  install_gem "brakeman", group: :development, require: false
2
4
  binstub "brakeman"
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  install_gem "bundler-audit", group: :development, require: false
2
4
  binstub "bundler-audit"
@@ -1,4 +1,12 @@
1
- install_gem "capybara-lockstep", group: :test
1
+ # frozen_string_literal: true
2
+
3
+ install_gem "capybara-lockstep", group: :test, require: false
4
+
2
5
  inject_into_file "app/views/layouts/application.html.erb",
3
6
  "\n <%= capybara_lockstep if defined?(Capybara::Lockstep) %>",
4
7
  after: /<head\b.*$/
8
+
9
+ capybara_path = rspec? ? "spec/support/capybara.rb" : "test/support/capybara.rb"
10
+ inject_into_file capybara_path,
11
+ "\n require \"capybara-lockstep\"",
12
+ after: /require "capybara".*$/
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Nextgen::TidyGemfile.clean!
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  install_gem "dotenv", version: ">= 3.0", group: %i[development test]
2
4
  copy_file ".env.sample"
3
5
  gitignore "/.env*", "!/.env.sample"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install erb_lint"
2
4
  install_gem "erb_lint", group: :development, require: false
3
5
  binstub "erb_lint"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install eslint"
2
4
  add_yarn_packages(
3
5
  "@eslint/js",
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install factory_bot_rails"
2
4
  install_gem "factory_bot_rails", group: %i[development test]
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  if Dir.exist?(".git")
2
4
  say_git "Mark project as trusted so bin/ can be added to PATH"
3
5
  empty_directory ".git/safe"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  gems = File.exist?("Gemfile") ? File.read("Gemfile").scan(/^\s*gem ["'](.+?)["']/).flatten : []
2
4
  template ".github/workflows/ci.yml.tt", context: binding
3
5
  copy_file ".github/dependabot.yml"
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  template ".github/PULL_REQUEST_TEMPLATE.md.tt"
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  install_gem "good_migrations"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  copy_file "app/controllers/home_controller.rb"
2
4
  template "app/views/home/index.html.erb.tt"
3
5
  route 'root "home#index"'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  commit_msg = "tmp/initial_nextgen_commit"
2
4
  return unless git_working? && File.exist?(commit_msg)
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install letter_opener"
2
4
  install_gem "letter_opener", group: :development
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Add Node and Yarn prerequisites"
2
4
  copy_file "package.json" unless File.exist?("package.json")
3
5
  inject_into_file "README.md", "\n- Node 18 (LTS) or newer\n- Yarn 1.x (classic)", after: /^- Ruby.*$/
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install launchy"
2
4
  install_gem "launchy", group: %i[development test]
3
5
 
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  template ".overcommit.yml"
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  install_gem "pgcli-rails", group: :development
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install rack-canonical-host"
2
4
  install_gem "rack-canonical-host"
3
5
 
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  install_gem "rack-mini-profiler", group: :development
2
4
  copy_file "config/initializers/rack_mini_profiler.rb" if File.read("Gemfile").match?(/^\s*gem ['"]turbo-rails['"]/)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install the rspec-rails gem"
2
4
  install_gem "rspec-rails", group: %i[development test]
3
5
 
@@ -1,4 +1,6 @@
1
- install_gems "capybara", "selenium-webdriver", group: :test
1
+ # frozen_string_literal: true
2
+
3
+ install_gems "capybara", "selenium-webdriver", group: :test, require: false
2
4
  copy_test_support_file "capybara.rb.tt"
3
5
  copy_test_support_file "system.rb"
4
6
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install rubocop gems"
2
4
  gemfile = File.read("Gemfile")
3
5
  plugins = []
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install shoulda gems"
2
4
  install_gem "shoulda-context", group: :test if minitest?
3
5
  install_gem "shoulda-matchers", group: :test
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install the sidekiq gem in the :production group, with a binstub"
2
4
  install_gem "sidekiq", version: "~> 7.0", group: :production
3
5
  binstub "sidekiq"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  copy_file "config/environments/staging.rb"
2
4
  gsub_file "DEPLOYMENT.md", '"production"', '"production" or "staging"' if File.exist?("DEPLOYMENT.md")
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install stylelint"
2
4
  add_yarn_packages(
3
5
  "stylelint",
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  copy_file "Thorfile"
2
4
  binstub "thor"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install the tomo gem in the :development group, with a binstub"
2
4
  install_gem "tomo", version: "~> 1.18", group: :development, require: false
3
5
  binstub "tomo"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  install_gems "vcr", "webmock", group: :test
2
4
  copy_test_support_file "vcr.rb.tt"
3
5
  copy_test_support_file "webmock.rb"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  say_git "Install the vite_rails gem"
2
4
  install_gem "vite_rails", version: "~> 3.0"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "yaml"
2
4
 
3
5
  module Nextgen
data/lib/nextgen/rails.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rails/version"
2
4
 
3
5
  module Nextgen
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Nextgen
2
4
  class RailsOptions
3
5
  DATABASES = %w[
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Nextgen
2
4
  module ThorExtensions
3
5
  def self.extended(base)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Nextgen
2
4
  class TidyGemfile
3
5
  def self.clean!(path = "Gemfile")
@@ -62,8 +64,8 @@ module Nextgen
62
64
 
63
65
  def build_gem_line(gem, version:, require:, indent:)
64
66
  line = %(gem "#{gem}")
65
- line << ", #{version.to_s.inspect}" if version
66
- line << ", require: #{require.inspect}" unless require.nil?
67
+ line += ", #{version.to_s.inspect}" if version
68
+ line += ", require: #{require.inspect}" unless require.nil?
67
69
 
68
70
  indent + line + "\n"
69
71
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Nextgen
2
- VERSION = "0.14.0".freeze
4
+ VERSION = "0.15.0"
3
5
  end
data/lib/nextgen.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pathname"
2
4
  require "zeitwerk"
3
5
 
@@ -22,4 +22,6 @@ linters:
22
22
  Enabled: false
23
23
  Rails/OutputSafety:
24
24
  Enabled: false
25
+ Style/FrozenStringLiteralComment:
26
+ Enabled: false
25
27
  <% end -%>
@@ -223,9 +223,6 @@ Style/FetchEnvVar:
223
223
  Style/FormatStringToken:
224
224
  Enabled: false
225
225
 
226
- Style/FrozenStringLiteralComment:
227
- Enabled: false
228
-
229
226
  Style/GuardClause:
230
227
  Enabled: false
231
228
 
data/template/Thorfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "config/environment" unless %w[-h --help help -T list -v version].include?(ARGV.first)
2
4
 
3
5
  class << Thor
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BasicAuth
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class HomeController < ApplicationController
2
4
  def index
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module InlineSvgHelper
2
4
  def inline_svg_tag(filename, title: nil)
3
5
  svg = ViteInlineSvgFileLoader.named(filename)
data/template/bin/setup CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  # This script is a way to set up or update your development environment automatically.
4
5
  # This script is idempotent, so that you can run it at any time and get an expectable outcome.
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # The staging environment is based on production
2
4
  require_relative "production"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Rails.application.config.generators do |g|
2
4
  # Disable generators we don't need.
3
5
  g.javascripts false
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  return unless defined?(Rack::MiniProfiler)
2
4
 
3
5
  # https://github.com/MiniProfiler/rack-mini-profiler#configuration-options
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  return unless defined?(Sidekiq)
2
4
 
3
5
  # Disable SSL certificate verification if using Heroku Redis
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "puma/plugin"
2
4
 
3
5
  Puma::Plugin.create do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  return unless Rails.env.development?
2
4
 
3
5
  require "annotate"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  desc "Run erblint"
2
4
  task :erblint do
3
5
  sh "bin/erblint --lint-all"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  desc "Run ESLint"
2
4
  task :eslint do
3
5
  sh "yarn lint:js"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  return unless Gem.loaded_specs.key?("rubocop")
2
4
 
3
5
  require "rubocop/rake_task"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  desc "Run Stylelint"
2
4
  task :stylelint do
3
5
  sh "yarn lint:css"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rails_helper"
2
4
 
3
5
  RSpec.describe "<%= class_name %>" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ViteInlineSvgFileLoader
2
4
  class << self
3
5
  def named(filename)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec.configure do |config|
2
4
  config.include FactoryBot::Syntax::Methods
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec.configure do |config|
2
4
  config.before(:each) do
3
5
  ActionMailer::Base.deliveries.clear
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Shoulda::Matchers.configure do |config|
2
4
  config.integrate do |with|
3
5
  with.test_framework :rspec
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec.configure do |config|
2
4
  config.before(:each, type: :system) do
3
5
  driven_by :selenium,
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "webmock/rspec"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "test_helper"
2
4
 
3
5
  class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "test_helper"
2
4
  require "vite_helper"
3
5
 
@@ -1,12 +1,17 @@
1
- require "capybara/rails"
2
- <% if rspec? -%>
3
- require "capybara/rspec"
4
- <% end -%>
1
+ # frozen_string_literal: true
5
2
 
6
- Capybara.configure do |config|
7
- config.default_max_wait_time = 2
8
- config.save_path = "tmp/screenshots"
9
- config.enable_aria_label = true
10
- config.server = :puma, {Silent: true}
11
- config.test_id = "data-testid"
3
+ ActiveSupport.on_load(:action_dispatch_system_test_case) do
4
+ require "capybara"
5
+ require "capybara/rails"
6
+ <% if rspec? -%>
7
+ require "capybara/rspec"
8
+ <% end -%>
9
+
10
+ Capybara.configure do |config|
11
+ config.default_max_wait_time = 2
12
+ config.save_path = "tmp/screenshots"
13
+ config.enable_aria_label = true
14
+ config.server = :puma, {Silent: true}
15
+ config.test_id = "data-testid"
16
+ end
12
17
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ActiveSupport.on_load(:active_support_test_case) do
2
4
  include FactoryBot::Syntax::Methods
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ActiveSupport.on_load(:active_support_test_case) do
2
4
  setup { ActionMailer::Base.deliveries.clear }
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Shoulda::Matchers.configure do |config|
2
4
  config.integrate do |with|
3
5
  with.test_framework :minitest
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "vcr"
2
4
 
3
5
  VCR.configure do |config|
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "webmock/minitest"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  return if ViteRuby.config.auto_build
2
4
 
3
5
  # Compile assets once at the start of testing
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nextgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brictson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-30 00:00:00.000000000 Z
11
+ date: 2024-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  - !ruby/object:Gem::Version
223
223
  version: '0'
224
224
  requirements: []
225
- rubygems_version: 3.5.9
225
+ rubygems_version: 3.5.10
226
226
  signing_key:
227
227
  specification_version: 4
228
228
  summary: Generate your next Rails app interactively!