nextgen 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -4
- data/config/generators.yml +0 -4
- data/config/rails_versions.yml +2 -1
- data/lib/nextgen/actions.rb +2 -2
- data/lib/nextgen/generators/base.rb +3 -2
- data/lib/nextgen/generators/erb_lint.rb +1 -0
- data/lib/nextgen/version.rb +1 -1
- data/template/.overcommit.yml.tt +1 -1
- data/template/lib/tasks/erb_lint.rake +1 -1
- data/template/test/vite_helper.rb +1 -2
- metadata +4 -5
- data/lib/nextgen/generators/bundler_audit.rb +0 -26
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0547fc9946683f3753ce175848f7a7a5b0e96e9212e21d8cdd1f69430fecea05
|
|
4
|
+
data.tar.gz: 72fa1da52395f08d06291dc3c43b6cf38f932b3073dc0b17476780dba2b6ceb0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f455f1ee06e99bab86cab8dee4ccc955279bb7de8ae2261e5724f36ee01afa59813b20509de74a745cbe15253d465f92311c00df0d4f42928cde202a903bddd2
|
|
7
|
+
data.tar.gz: 11ff219399baaebe36d497109b0b150f52681087fdfdcc52761ce12e78f33a05936f71e01500cf159e0ac528fe536342f08285fd16eb14f075a77fd31d1d19a3
|
data/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Nextgen is an **interactive** and flexible alternative to `rails new` that inclu
|
|
|
25
25
|
|
|
26
26
|
## Requirements
|
|
27
27
|
|
|
28
|
-
Nextgen generates apps using **Rails 8.
|
|
28
|
+
Nextgen generates apps using **Rails 8.1**.
|
|
29
29
|
|
|
30
30
|
- **Ruby 3.2+** is required
|
|
31
31
|
- **Rubygems 3.4.8+** is required (run `gem update --system` to get it)
|
|
@@ -53,7 +53,7 @@ Check out the [examples directory](./examples) to see some Rails apps that were
|
|
|
53
53
|
|
|
54
54
|
## What's included
|
|
55
55
|
|
|
56
|
-
**Nextgen starts with the "omakase" default behavior of `rails new`,** so you get the great things included in Rails 8.
|
|
56
|
+
**Nextgen starts with the "omakase" default behavior of `rails new`,** so you get the great things included in Rails 8.1 like RuboCop, a GitHub Actions CI workflow, your choice of database platform, CSS framework, etc. You can also interactively disable parts of the default stack that you don't need, like JBuilder or Action Mailbox.
|
|
57
57
|
|
|
58
58
|
On top of that foundation, Nextgen offers dozens of useful enhancements to the vanilla Rails experience. You are free to pick and choose which (if any) of these to apply to your new project. Behind the scenes, **each enhancement is applied in a separate git commit,** so that you can later see what was applied and why, and revert the suggestions if necessary.
|
|
59
59
|
|
|
@@ -75,7 +75,7 @@ Prefer RSpec? Nextgen can set you up with RSpec, plus the gems and configuration
|
|
|
75
75
|
Prefer npm? Nextgen allows you to choose Yarn or npm to manage your app's JavaScript dependencies. Your Dockerfile, CI jobs, `bin/setup` script, etc. will be adjusted appropriately.
|
|
76
76
|
|
|
77
77
|
> [!NOTE]
|
|
78
|
-
> As of Rails 8.
|
|
78
|
+
> As of Rails 8.1, `rails new` is still hard-coded to use Yarn in some places. Therefore you may still need Yarn installed on your system in order to generate a new app. Nextgen will remove these Yarn references from your generated project if you select the npm option.
|
|
79
79
|
|
|
80
80
|
### Opinionated RuboCop Config
|
|
81
81
|
|
|
@@ -86,7 +86,6 @@ By default, Rails apps include RuboCop with a config defined by the [rubocop-rai
|
|
|
86
86
|
Nextgen can install and configure your choice of these recommended gems:
|
|
87
87
|
|
|
88
88
|
- [annotaterb](https://github.com/drwl/annotaterb)
|
|
89
|
-
- [bundler-audit](https://github.com/rubysec/bundler-audit)
|
|
90
89
|
- [capybara-lockstep](https://github.com/makandra/capybara-lockstep)
|
|
91
90
|
- [dotenv](https://github.com/bkeepers/dotenv)
|
|
92
91
|
- [erb_lint](https://github.com/Shopify/erb_lint)
|
data/config/generators.yml
CHANGED
|
@@ -45,10 +45,6 @@ basic_auth:
|
|
|
45
45
|
prompt: "BasicAuth controller concern"
|
|
46
46
|
description: "Allow app to be secured with ENV-based basic auth credentials"
|
|
47
47
|
|
|
48
|
-
bundler_audit:
|
|
49
|
-
prompt: "Bundler Audit"
|
|
50
|
-
description: "Install bundler-audit gem to detect CVEs in Ruby dependencies"
|
|
51
|
-
|
|
52
48
|
capybara_lockstep:
|
|
53
49
|
prompt: "capybara-lockstep"
|
|
54
50
|
description: "Install capybara-lockstep gem for less-flaky browser testing"
|
data/config/rails_versions.yml
CHANGED
|
@@ -18,6 +18,7 @@ current: ¤t
|
|
|
18
18
|
mariadb-trilogy: MariaDB-Trilogy
|
|
19
19
|
default_features:
|
|
20
20
|
brakeman: Brakeman
|
|
21
|
+
bundler-audit: bundler-audit
|
|
21
22
|
ci: GitHub Actions CI
|
|
22
23
|
kamal: Kamal
|
|
23
24
|
rubocop: RuboCop
|
|
@@ -29,7 +30,7 @@ current: ¤t
|
|
|
29
30
|
edge:
|
|
30
31
|
<<: *current
|
|
31
32
|
args: ["--edge"]
|
|
32
|
-
label: "edge (8-
|
|
33
|
+
label: "edge (8-1-stable)"
|
|
33
34
|
|
|
34
35
|
main:
|
|
35
36
|
<<: *current
|
data/lib/nextgen/actions.rb
CHANGED
|
@@ -143,9 +143,9 @@ module Nextgen
|
|
|
143
143
|
|
|
144
144
|
paths.reverse_each do |path|
|
|
145
145
|
gsub_file("config/application.rb", /autoload_lib\(ignore: %w.*$/) do |match|
|
|
146
|
-
next match if match.match?(/%w.*[
|
|
146
|
+
next match if match.match?(/%w.*[(\[ ]#{Regexp.quote(path)}[ )\]]/)
|
|
147
147
|
|
|
148
|
-
match.sub(/%w[
|
|
148
|
+
match.sub(/%w[(\[]/, '\0' + path + " ")
|
|
149
149
|
end
|
|
150
150
|
end
|
|
151
151
|
end
|
|
@@ -41,7 +41,9 @@ if File.exist?("test/application_system_test_case.rb")
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
missing_ruby_decl = !File.read("Gemfile").match?(/^ruby /)
|
|
44
|
-
if missing_ruby_decl &&
|
|
44
|
+
if missing_ruby_decl &&
|
|
45
|
+
File.exist?(".ruby-version") &&
|
|
46
|
+
File.read(".ruby-version").match?(/\A(ruby-)?\d+\.\d+.\d+.\s*\z/m)
|
|
45
47
|
say_git "Add ruby declaration to Gemfile"
|
|
46
48
|
ruby_decl = if bundler_ruby_file_supported?
|
|
47
49
|
'ruby file: ".ruby-version"'
|
|
@@ -58,7 +60,6 @@ if File.exist?("app/views/layouts/application.html.erb")
|
|
|
58
60
|
gsub_file "app/views/layouts/application.html.erb", "<html>", '<html lang="en">'
|
|
59
61
|
gsub_file "app/views/layouts/application.html.erb", %r{^\s*<title>.*</title>}, <<~ERB.gsub(/^/, " ").rstrip
|
|
60
62
|
<title><%= content_for?(:title) ? strip_tags(yield(:title)) : #{app_const_base.titleize.inspect} %></title>
|
|
61
|
-
<meta name="apple-mobile-web-app-title" content="#{app_const_base.titleize}">
|
|
62
63
|
ERB
|
|
63
64
|
end
|
|
64
65
|
|
data/lib/nextgen/version.rb
CHANGED
data/template/.overcommit.yml.tt
CHANGED
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
return if ViteRuby.config.auto_build
|
|
4
4
|
|
|
5
5
|
# Compile assets once at the start of testing
|
|
6
|
-
|
|
7
|
-
seconds = Benchmark.realtime { ViteRuby.commands.build }
|
|
6
|
+
seconds = ActiveSupport::Benchmark.realtime { ViteRuby.commands.build }
|
|
8
7
|
puts format("Built Vite assets (%.1fms)", seconds * 1_000)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nextgen
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.37.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Brictson
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 8.
|
|
18
|
+
version: 8.1.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 8.
|
|
25
|
+
version: 8.1.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: thor
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -107,7 +107,6 @@ files:
|
|
|
107
107
|
- lib/nextgen/generators/annotaterb.rb
|
|
108
108
|
- lib/nextgen/generators/base.rb
|
|
109
109
|
- lib/nextgen/generators/basic_auth.rb
|
|
110
|
-
- lib/nextgen/generators/bundler_audit.rb
|
|
111
110
|
- lib/nextgen/generators/capybara_lockstep.rb
|
|
112
111
|
- lib/nextgen/generators/clean_gemfile.rb
|
|
113
112
|
- lib/nextgen/generators/dotenv.rb
|
|
@@ -225,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
225
224
|
- !ruby/object:Gem::Version
|
|
226
225
|
version: '0'
|
|
227
226
|
requirements: []
|
|
228
|
-
rubygems_version: 3.
|
|
227
|
+
rubygems_version: 3.7.2
|
|
229
228
|
specification_version: 4
|
|
230
229
|
summary: Generate your next Rails app interactively!
|
|
231
230
|
test_files: []
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
install_gem "bundler-audit", group: :development, require: false
|
|
4
|
-
binstub "bundler-audit"
|
|
5
|
-
|
|
6
|
-
if File.exist?(".github/workflows/ci.yml")
|
|
7
|
-
say_git "Add bundle-audit job to CI workflow"
|
|
8
|
-
inject_into_file ".github/workflows/ci.yml", <<-YAML, after: /^jobs:\n/
|
|
9
|
-
scan_gems:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout code
|
|
14
|
-
uses: actions/checkout@v5
|
|
15
|
-
|
|
16
|
-
- name: Set up Ruby
|
|
17
|
-
uses: ruby/setup-ruby@v1
|
|
18
|
-
with:
|
|
19
|
-
ruby-version: .ruby-version
|
|
20
|
-
bundler-cache: true
|
|
21
|
-
|
|
22
|
-
- name: Scan for security vulnerabilities in Ruby dependencies
|
|
23
|
-
run: bundle exec bundle-audit check --update -v
|
|
24
|
-
|
|
25
|
-
YAML
|
|
26
|
-
end
|