nextgen 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/nextgen +1 -0
- data/lib/nextgen/actions/bundler.rb +3 -1
- data/lib/nextgen/actions/git.rb +2 -0
- data/lib/nextgen/actions/yarn.rb +2 -0
- data/lib/nextgen/actions.rb +5 -3
- data/lib/nextgen/cli.rb +2 -0
- data/lib/nextgen/commands/create.rb +2 -0
- data/lib/nextgen/ext/prompt/list.rb +2 -0
- data/lib/nextgen/ext/prompt/multilist.rb +2 -0
- data/lib/nextgen/generators/action_mailer.rb +2 -0
- data/lib/nextgen/generators/annotate.rb +2 -0
- data/lib/nextgen/generators/base.rb +4 -0
- data/lib/nextgen/generators/basic_auth.rb +2 -0
- data/lib/nextgen/generators/brakeman.rb +2 -0
- data/lib/nextgen/generators/bundler_audit.rb +2 -0
- data/lib/nextgen/generators/capybara_lockstep.rb +9 -1
- data/lib/nextgen/generators/clean_gemfile.rb +2 -0
- data/lib/nextgen/generators/dotenv.rb +2 -0
- data/lib/nextgen/generators/erb_lint.rb +2 -0
- data/lib/nextgen/generators/eslint.rb +2 -0
- data/lib/nextgen/generators/factory_bot_rails.rb +2 -0
- data/lib/nextgen/generators/git_safe.rb +2 -0
- data/lib/nextgen/generators/github_actions.rb +2 -0
- data/lib/nextgen/generators/github_pr_template.rb +2 -0
- data/lib/nextgen/generators/good_migrations.rb +2 -0
- data/lib/nextgen/generators/home_controller.rb +2 -0
- data/lib/nextgen/generators/initial_git_commit.rb +2 -0
- data/lib/nextgen/generators/letter_opener.rb +2 -0
- data/lib/nextgen/generators/node.rb +2 -0
- data/lib/nextgen/generators/open_browser_on_start.rb +2 -0
- data/lib/nextgen/generators/overcommit.rb +2 -0
- data/lib/nextgen/generators/pgcli_rails.rb +2 -0
- data/lib/nextgen/generators/rack_canonical_host.rb +2 -0
- data/lib/nextgen/generators/rack_mini_profiler.rb +2 -0
- data/lib/nextgen/generators/rspec_rails.rb +2 -0
- data/lib/nextgen/generators/rspec_system_testing.rb +3 -1
- data/lib/nextgen/generators/rubocop.rb +2 -0
- data/lib/nextgen/generators/shoulda.rb +2 -0
- data/lib/nextgen/generators/sidekiq.rb +2 -0
- data/lib/nextgen/generators/staging.rb +2 -0
- data/lib/nextgen/generators/stylelint.rb +2 -0
- data/lib/nextgen/generators/thor.rb +2 -0
- data/lib/nextgen/generators/tomo.rb +2 -0
- data/lib/nextgen/generators/vcr.rb +2 -0
- data/lib/nextgen/generators/vite.rb +2 -0
- data/lib/nextgen/generators.rb +2 -0
- data/lib/nextgen/rails.rb +2 -0
- data/lib/nextgen/rails_options.rb +2 -0
- data/lib/nextgen/thor_extensions.rb +2 -0
- data/lib/nextgen/tidy_gemfile.rb +4 -2
- data/lib/nextgen/version.rb +3 -1
- data/lib/nextgen.rb +2 -0
- data/template/.erb-lint.yml.tt +2 -0
- data/template/.rubocop.yml.tt +0 -3
- data/template/Thorfile +2 -0
- data/template/app/controllers/concerns/basic_auth.rb +2 -0
- data/template/app/controllers/home_controller.rb +2 -0
- data/template/app/helpers/inline_svg_helper.rb +2 -0
- data/template/bin/setup +1 -0
- data/template/config/environments/staging.rb +2 -0
- data/template/config/initializers/generators.rb +2 -0
- data/template/config/initializers/rack_mini_profiler.rb +2 -0
- data/template/config/initializers/sidekiq.rb +2 -0
- data/template/lib/puma/plugin/open.rb +2 -0
- data/template/lib/tasks/auto_annotate_models.rake +2 -0
- data/template/lib/tasks/erblint.rake +2 -0
- data/template/lib/tasks/eslint.rake +2 -0
- data/template/lib/tasks/rubocop.rake +2 -0
- data/template/lib/tasks/stylelint.rake +2 -0
- data/template/lib/templates/rspec/system/system_spec.rb +2 -0
- data/template/lib/vite_inline_svg_file_loader.rb +2 -0
- data/template/spec/support/factory_bot.rb +2 -0
- data/template/spec/support/mailer.rb +2 -0
- data/template/spec/support/shoulda.rb +2 -0
- data/template/spec/support/system.rb +2 -0
- data/template/spec/support/webmock.rb +2 -0
- data/template/test/application_system_test_case.rb +2 -0
- data/template/test/helpers/inline_svg_helper_test.rb +2 -0
- data/template/test/support/capybara.rb.tt +15 -10
- data/template/test/support/factory_bot.rb +2 -0
- data/template/test/support/mailer.rb +2 -0
- data/template/test/support/shoulda.rb +2 -0
- data/template/test/support/vcr.rb.tt +2 -0
- data/template/test/support/webmock.rb +2 -0
- data/template/test/vite_helper.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8205ff3de045b2343981785aeba004a4730b708915c47e989ed2ddf566adfb5
|
4
|
+
data.tar.gz: ab88579fb4a7e827bd8464176368f27cfb3c595145d11279a0422bbc33a02b3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcecb49b31305607a4b0ad25e83625d2743f69b5e5a33a91d0daa778c60037cd61d2b708bfc856457774bc5958a46acec33a578f11d9a8b55438d168696fe152
|
7
|
+
data.tar.gz: 42bb4e8a64a011d3aa7d09fc1fb4160313c7c636bc6ade2ef2bfabe8e459561bc4654660a837a03867c2b18bbc1ff148fef47fee5be58649b9c746226aa0d0a1
|
data/exe/nextgen
CHANGED
@@ -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
|
26
|
+
cmd += " --quiet" if noisy_bundler_version?
|
25
27
|
bundle_command! cmd
|
26
28
|
end
|
27
29
|
alias install_gem install_gems
|
data/lib/nextgen/actions/git.rb
CHANGED
data/lib/nextgen/actions/yarn.rb
CHANGED
data/lib/nextgen/actions.rb
CHANGED
@@ -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
|
86
|
-
insertion
|
87
|
-
insertion
|
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
|
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,4 +1,12 @@
|
|
1
|
-
|
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".*$/
|
data/lib/nextgen/generators.rb
CHANGED
data/lib/nextgen/rails.rb
CHANGED
data/lib/nextgen/tidy_gemfile.rb
CHANGED
@@ -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
|
66
|
-
line
|
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
|
data/lib/nextgen/version.rb
CHANGED
data/lib/nextgen.rb
CHANGED
data/template/.erb-lint.yml.tt
CHANGED
data/template/.rubocop.yml.tt
CHANGED
data/template/Thorfile
CHANGED
data/template/bin/setup
CHANGED
@@ -1,12 +1,17 @@
|
|
1
|
-
|
2
|
-
<% if rspec? -%>
|
3
|
-
require "capybara/rspec"
|
4
|
-
<% end -%>
|
1
|
+
# frozen_string_literal: true
|
5
2
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
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.
|
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-
|
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.
|
225
|
+
rubygems_version: 3.5.10
|
226
226
|
signing_key:
|
227
227
|
specification_version: 4
|
228
228
|
summary: Generate your next Rails app interactively!
|