nextgen 0.19.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/config/generators.yml +5 -0
- data/lib/nextgen/generators/mocha.rb +4 -0
- data/lib/nextgen/generators/vite.rb +5 -6
- data/lib/nextgen/rails_options.rb +4 -0
- data/lib/nextgen/version.rb +1 -1
- data/template/bin/{dev-yarn → dev-node} +1 -1
- data/template/run-pty.json +16 -0
- data/template/test/support/mocha.rb +10 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5e200d3e6e25f5397dfa61209e92088f53115e54fed6aeee753899fa3978011
|
4
|
+
data.tar.gz: 87e09910259c3d83d974d4fb974fda1172566196dc0062910ced93f7f9a540c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8a17ffed163b4a3e1490d0ef48ee02514bd508d1c6f09739c60b58b79e2085aef6c0cf9002d8a5c5fb0a82fd5ba3f79821e4e058521c5cab5e5467401e6814d
|
7
|
+
data.tar.gz: 385623e44d389433962b84fb87fe4afa6b6a26e07a0e6c79decdfb7def59a00a86095c6c1d31330622545a5624650234ad3a7e23dac0040e304a4007292b10fa
|
data/README.md
CHANGED
@@ -54,7 +54,7 @@ Check out the [examples directory](./examples) to see some Rails apps that were
|
|
54
54
|
|
55
55
|
## What's included
|
56
56
|
|
57
|
-
**Nextgen starts with the "omakase" default behavior of `rails new`,** so you get the great things included in Rails 7.
|
57
|
+
**Nextgen starts with the "omakase" default behavior of `rails new`,** so you get the great things included in Rails 7.2 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.
|
58
58
|
|
59
59
|
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.
|
60
60
|
|
@@ -87,6 +87,7 @@ Nextgen can install and configure your choice of these recommended gems:
|
|
87
87
|
- [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails)
|
88
88
|
- [good_migrations](https://github.com/testdouble/good-migrations)
|
89
89
|
- [letter_opener](https://github.com/ryanb/letter_opener)
|
90
|
+
- [mocha](https://github.com/freerange/mocha)
|
90
91
|
- [overcommit](https://github.com/sds/overcommit)
|
91
92
|
- [pgcli-rails](https://github.com/mattbrictson/pgcli-rails)
|
92
93
|
- [rack-canonical-host](https://github.com/tylerhunt/rack-canonical-host)
|
data/config/generators.yml
CHANGED
@@ -90,6 +90,11 @@ letter_opener:
|
|
90
90
|
description: "Install letter_opener gem to use with Action Mailer in dev"
|
91
91
|
requires: action_mailer
|
92
92
|
|
93
|
+
mocha:
|
94
|
+
prompt: "mocha"
|
95
|
+
description: "Install mocha gem for fluent stubs/mocks in minitest"
|
96
|
+
requires: minitest
|
97
|
+
|
93
98
|
open_browser_on_start:
|
94
99
|
prompt: "Open browser on startup"
|
95
100
|
description: "Configure puma to launch browser on startup in development"
|
@@ -61,7 +61,7 @@ if File.exist?("test/application_system_test_case.rb")
|
|
61
61
|
end
|
62
62
|
|
63
63
|
say_git "Install modern-normalize and base stylesheets"
|
64
|
-
add_yarn_package "modern-normalize@^
|
64
|
+
add_yarn_package "modern-normalize@^3.0.0"
|
65
65
|
copy_file "app/frontend/stylesheets/index.css"
|
66
66
|
copy_file "app/frontend/stylesheets/base.css"
|
67
67
|
copy_file "app/frontend/stylesheets/reset.css"
|
@@ -96,11 +96,10 @@ copy_file "app/frontend/images/example.svg"
|
|
96
96
|
# TODO: rspec support
|
97
97
|
copy_file "test/helpers/inline_svg_helper_test.rb" if File.exist?("test/vite_helper.rb")
|
98
98
|
|
99
|
-
say_git "Add a `
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
copy_file "bin/dev-yarn", "bin/dev", mode: :preserve, force: true
|
99
|
+
say_git "Add a `bin/dev` script that uses run-pty"
|
100
|
+
add_yarn_package "run-pty@^5", dev: true
|
101
|
+
copy_file "bin/dev-node", "bin/dev", mode: :preserve, force: true
|
102
|
+
copy_file "run-pty.json"
|
104
103
|
remove_file "Procfile.dev"
|
105
104
|
|
106
105
|
say_git "Add Safari cache workaround in development"
|
data/lib/nextgen/version.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "mocha/minitest"
|
4
|
+
|
5
|
+
# Reference: https://rubydoc.info/gems/mocha/Mocha/Configuration
|
6
|
+
Mocha.configure do |config|
|
7
|
+
config.strict_keyword_argument_matching = true
|
8
|
+
config.stubbing_method_on_nil = :prevent
|
9
|
+
config.stubbing_non_existent_method = :prevent
|
10
|
+
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.21.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-08-
|
11
|
+
date: 2024-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- lib/nextgen/generators/home_controller.rb
|
121
121
|
- lib/nextgen/generators/initial_git_commit.rb
|
122
122
|
- lib/nextgen/generators/letter_opener.rb
|
123
|
+
- lib/nextgen/generators/mocha.rb
|
123
124
|
- lib/nextgen/generators/node.rb
|
124
125
|
- lib/nextgen/generators/open_browser_on_start.rb
|
125
126
|
- lib/nextgen/generators/overcommit.rb
|
@@ -165,7 +166,7 @@ files:
|
|
165
166
|
- template/app/helpers/inline_svg_helper.rb
|
166
167
|
- template/app/views/home/index.html.erb.tt
|
167
168
|
- template/bin/dev
|
168
|
-
- template/bin/dev-
|
169
|
+
- template/bin/dev-node
|
169
170
|
- template/bin/setup
|
170
171
|
- template/config/environments/staging.rb
|
171
172
|
- template/config/initializers/generators.rb
|
@@ -183,6 +184,7 @@ files:
|
|
183
184
|
- template/lib/vite_inline_svg_file_loader.rb
|
184
185
|
- template/package.json
|
185
186
|
- template/postcss.config.cjs
|
187
|
+
- template/run-pty.json
|
186
188
|
- template/spec/support/factory_bot.rb
|
187
189
|
- template/spec/support/mailer.rb
|
188
190
|
- template/spec/support/shoulda.rb
|
@@ -193,6 +195,7 @@ files:
|
|
193
195
|
- template/test/support/capybara.rb.tt
|
194
196
|
- template/test/support/factory_bot.rb
|
195
197
|
- template/test/support/mailer.rb
|
198
|
+
- template/test/support/mocha.rb
|
196
199
|
- template/test/support/shoulda.rb
|
197
200
|
- template/test/support/vcr.rb.tt
|
198
201
|
- template/test/support/webmock.rb
|
@@ -221,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
224
|
- !ruby/object:Gem::Version
|
222
225
|
version: '0'
|
223
226
|
requirements: []
|
224
|
-
rubygems_version: 3.5.
|
227
|
+
rubygems_version: 3.5.18
|
225
228
|
signing_key:
|
226
229
|
specification_version: 4
|
227
230
|
summary: Generate your next Rails app interactively!
|