suspenders 1.56.1 → 20230113.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/.ruby-version +1 -1
- data/CONTRIBUTING.md +1 -1
- data/NEWS.md +13 -0
- data/README.md +9 -5
- data/docs/rails_7.md +5 -0
- data/lib/suspenders/actions.rb +21 -0
- data/lib/suspenders/app_builder.rb +21 -8
- data/lib/suspenders/generators/accessibility_generator.rb +12 -0
- data/lib/suspenders/generators/advisories_generator.rb +1 -1
- data/lib/suspenders/generators/app_generator.rb +11 -12
- data/lib/suspenders/generators/jobs_generator.rb +7 -8
- data/lib/suspenders/generators/production/manifest_generator.rb +1 -1
- data/lib/suspenders/generators/stylesheet_base_generator.rb +5 -20
- data/lib/suspenders/generators/views_generator.rb +0 -5
- data/lib/suspenders/version.rb +2 -2
- data/lib/suspenders.rb +1 -0
- data/templates/Gemfile.erb +8 -4
- data/templates/Procfile +1 -1
- data/templates/active_job.rb +1 -0
- data/templates/application.postcss.css +1 -0
- data/templates/bin_yarn +18 -0
- data/templates/descriptions/jobs.md +1 -1
- data/templates/descriptions/runner.md +1 -1
- data/templates/descriptions/stylesheet_base.md +1 -4
- data/templates/postcss.config.js +8 -0
- data/templates/sample_env +1 -0
- data/templates/suspenders_layout.html.erb.erb +6 -4
- metadata +15 -26
- data/templates/_javascript.html.erb +0 -3
- data/templates/application.scss +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 606737b8d87f3fe7ccfae7c15d214df27de810600e1cb77873025d1af0f17f3d
|
|
4
|
+
data.tar.gz: 10ab96b1b4eb893b86cb9ddd40146fdb49c99d51fe03aecf579148ca7a6cbf46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8d8f0be9c9c48c24cbd459575552dba6f3a93ad669472235e3e2a00bbe26c7cd114a798a527b8b0faeb226aaeb91bad8a98930502e82cf4e2995c90f40070d02
|
|
7
|
+
data.tar.gz: '08f52691df274a0187571d59020ca241a564ce442ac5b60427eb7a93087563fc3bb73b1719042ec957d38ed84071d0c06260a2cd18c2ca0124a7cbfd57e05ad1'
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.0.5
|
data/CONTRIBUTING.md
CHANGED
|
@@ -20,7 +20,7 @@ Make sure the tests pass:
|
|
|
20
20
|
Make your change. Write tests. Follow our [style guide][style]. Make the tests
|
|
21
21
|
pass:
|
|
22
22
|
|
|
23
|
-
[style]: https://github.com/thoughtbot/guides/
|
|
23
|
+
[style]: https://github.com/thoughtbot/guides/blob/main/ruby/README.md
|
|
24
24
|
|
|
25
25
|
rake
|
|
26
26
|
|
data/NEWS.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
20230113.0 (January, 13, 2023)
|
|
2
|
+
|
|
3
|
+
Support Rails 7 and Ruby 3. Introduce CalVer.
|
|
4
|
+
|
|
5
|
+
* Upgraded: Ruby to 3.0.5
|
|
6
|
+
* Upgraded: Supported Rails version to 7.0.0
|
|
7
|
+
* Removed: Bourbon
|
|
8
|
+
* Removed: Bitters
|
|
9
|
+
* Removed: Autoprefixer Rails
|
|
10
|
+
* Added: cssbundling-rails
|
|
11
|
+
* Added: PostCSS Autoprefixer
|
|
12
|
+
* Added: PostCSS Normalize
|
|
13
|
+
|
|
1
14
|
1.56.1 (July 17, 2022)
|
|
2
15
|
|
|
3
16
|
Fixes a critical error with the previous release
|
data/README.md
CHANGED
|
@@ -34,14 +34,10 @@ generated projectname/Gemfile.
|
|
|
34
34
|
|
|
35
35
|
It includes application gems like:
|
|
36
36
|
|
|
37
|
-
* [
|
|
38
|
-
* [Bourbon](https://github.com/thoughtbot/bourbon) for Sass mixins
|
|
39
|
-
* [Bitters](https://github.com/thoughtbot/bitters) for scaffold application styles
|
|
40
|
-
* [Delayed Job](https://github.com/collectiveidea/delayed_job) for background
|
|
37
|
+
* [Sidekiq](https://github.com/mperham/sidekiq) for background
|
|
41
38
|
processing
|
|
42
39
|
* [High Voltage](https://github.com/thoughtbot/high_voltage) for static pages
|
|
43
40
|
* [Honeybadger](https://www.honeybadger.io/?affiliate=A43uwl) for exception notification
|
|
44
|
-
* [Normalize](https://necolas.github.io/normalize.css/) for resetting browser styles
|
|
45
41
|
* [Oj](http://www.ohler.com/oj/)
|
|
46
42
|
* [Postgres](https://github.com/ged/ruby-pg) for access to the Postgres database
|
|
47
43
|
* [Rack Canonical Host](https://github.com/tylerhunt/rack-canonical-host) to
|
|
@@ -75,6 +71,8 @@ And testing gems like:
|
|
|
75
71
|
* [Capybara](https://github.com/jnicklas/capybara) and
|
|
76
72
|
[Google Chromedriver]
|
|
77
73
|
integration testing
|
|
74
|
+
* [capybara_accessibility_audit](https://github.com/thoughtbot/capybara_accessibility_audit) and
|
|
75
|
+
[capybara_accessible_selectors](https://github.com/citizensadvice/capybara_accessible_selectors)
|
|
78
76
|
* [Factory Bot](https://github.com/thoughtbot/factory_bot) for test data
|
|
79
77
|
* [Formulaic](https://github.com/thoughtbot/formulaic) for integration testing
|
|
80
78
|
HTML forms
|
|
@@ -103,6 +101,8 @@ Suspenders also comes with:
|
|
|
103
101
|
* Configuration for [stylelint][stylelint]
|
|
104
102
|
* The analytics adapter [Segment][segment] (and therefore config for Google
|
|
105
103
|
Analytics, Intercom, Facebook Ads, Twitter Ads, etc.)
|
|
104
|
+
* [PostCSS Autoprefixer][autoprefixer] for CSS vendor prefixes
|
|
105
|
+
* [PostCSS Normalize][normalize] for resetting browser styles
|
|
106
106
|
|
|
107
107
|
[setup]: https://robots.thoughtbot.com/bin-setup
|
|
108
108
|
[compress]: https://robots.thoughtbot.com/content-compression-with-rack-deflater
|
|
@@ -113,6 +113,8 @@ Suspenders also comes with:
|
|
|
113
113
|
[hound]: https://houndci.com
|
|
114
114
|
[stylelint]: https://stylelint.io/
|
|
115
115
|
[segment]: https://segment.com
|
|
116
|
+
[autoprefixer]: https://github.com/postcss/autoprefixer
|
|
117
|
+
[normalize]: https://github.com/csstools/postcss-normalize
|
|
116
118
|
|
|
117
119
|
## Heroku
|
|
118
120
|
|
|
@@ -183,6 +185,8 @@ requires Google Chrome or Chromium.
|
|
|
183
185
|
|
|
184
186
|
PostgreSQL needs to be installed and running for the `db:create` rake task.
|
|
185
187
|
|
|
188
|
+
Redis needs to be installed and running for Sidekiq
|
|
189
|
+
|
|
186
190
|
## Issues
|
|
187
191
|
|
|
188
192
|
If you have problems, please create a
|
data/docs/rails_7.md
ADDED
data/lib/suspenders/actions.rb
CHANGED
|
@@ -31,6 +31,27 @@ module Suspenders
|
|
|
31
31
|
action ExpandJson.new(destination_root, file, data)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
def gem(*args)
|
|
35
|
+
options = args.extract_options!
|
|
36
|
+
name, *versions = args
|
|
37
|
+
|
|
38
|
+
parts = [quote(name)]
|
|
39
|
+
|
|
40
|
+
if (versions = versions.any? ? versions : options.delete(:version))
|
|
41
|
+
versions = Array(versions)
|
|
42
|
+
versions.each do |version|
|
|
43
|
+
parts << quote(version)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
parts << quote(options) unless options.empty?
|
|
48
|
+
|
|
49
|
+
str = []
|
|
50
|
+
str << indentation
|
|
51
|
+
str << "gem #{parts.join(", ")}"
|
|
52
|
+
append_file "Gemfile", %(\n#{str.join}\n), verbose: false
|
|
53
|
+
end
|
|
54
|
+
|
|
34
55
|
class ExpandJson
|
|
35
56
|
def initialize(destination_root, file, data)
|
|
36
57
|
@destination_root = destination_root
|
|
@@ -75,6 +75,11 @@ module Suspenders
|
|
|
75
75
|
run "chmod a+x bin/setup"
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
+
def provide_yarn_script
|
|
79
|
+
template "bin_yarn", "bin/yarn", force: true
|
|
80
|
+
run "chmod a+x bin/yarn"
|
|
81
|
+
end
|
|
82
|
+
|
|
78
83
|
def configure_generators
|
|
79
84
|
config = <<-RUBY
|
|
80
85
|
|
|
@@ -100,13 +105,13 @@ module Suspenders
|
|
|
100
105
|
|
|
101
106
|
def setup_asset_host
|
|
102
107
|
replace_in_file "config/environments/production.rb",
|
|
103
|
-
|
|
104
|
-
'config.
|
|
108
|
+
%(# config.asset_host = "http://assets.example.com"),
|
|
109
|
+
'config.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("APPLICATION_HOST"))'
|
|
105
110
|
|
|
106
111
|
if File.exist?("config/initializers/assets.rb")
|
|
107
112
|
replace_in_file "config/initializers/assets.rb",
|
|
108
|
-
|
|
109
|
-
'config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")'
|
|
113
|
+
%(Rails.application.config.assets.version = "1.0"),
|
|
114
|
+
'Rails.application.config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")'
|
|
110
115
|
end
|
|
111
116
|
|
|
112
117
|
config = <<~EOD
|
|
@@ -139,10 +144,10 @@ module Suspenders
|
|
|
139
144
|
bundle_command "exec rails db:migrate"
|
|
140
145
|
end
|
|
141
146
|
|
|
142
|
-
def replace_gemfile
|
|
147
|
+
def replace_gemfile
|
|
143
148
|
template "Gemfile.erb", "Gemfile", force: true do |content|
|
|
144
|
-
if
|
|
145
|
-
content.gsub(%r{gem .suspenders.}) { |s| %(#{s}, path: "#{
|
|
149
|
+
if development_env?
|
|
150
|
+
content.gsub(%r{gem .suspenders.}) { |s| %(#{s}, path: "#{root_path}") }
|
|
146
151
|
else
|
|
147
152
|
content
|
|
148
153
|
end
|
|
@@ -241,8 +246,16 @@ module Suspenders
|
|
|
241
246
|
|
|
242
247
|
private
|
|
243
248
|
|
|
249
|
+
def root_path
|
|
250
|
+
@root_path ||= Pathname(__dir__).join("..", "..").expand_path
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
def development_env?
|
|
254
|
+
root_path.join("suspenders.gemspec").exist?
|
|
255
|
+
end
|
|
256
|
+
|
|
244
257
|
def raise_on_missing_translations_in(environment)
|
|
245
|
-
config = "config.
|
|
258
|
+
config = "config.i18n.raise_on_missing_translations = true"
|
|
246
259
|
|
|
247
260
|
uncomment_lines("config/environments/#{environment}.rb", config)
|
|
248
261
|
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require_relative "base"
|
|
2
|
+
|
|
3
|
+
module Suspenders
|
|
4
|
+
class AccessibilityGenerator < Generators::Base
|
|
5
|
+
def capybara_gems
|
|
6
|
+
gem "capybara_accessibility_audit", group: [:test]
|
|
7
|
+
gem "capybara_accessible_selectors", group: [:test],
|
|
8
|
+
github: "citizensadvice/capybara_accessible_selectors"
|
|
9
|
+
Bundler.with_unbundled_env { run "bundle install" }
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -3,7 +3,7 @@ require_relative "base"
|
|
|
3
3
|
module Suspenders
|
|
4
4
|
class AdvisoriesGenerator < Generators::Base
|
|
5
5
|
def bundler_audit_gem
|
|
6
|
-
gem "bundler-audit", ">= 0.7.0", require: false, group:
|
|
6
|
+
gem "bundler-audit", ">= 0.7.0", require: false, group: [:development, :test]
|
|
7
7
|
Bundler.with_unbundled_env { run "bundle install" }
|
|
8
8
|
end
|
|
9
9
|
|
|
@@ -25,26 +25,25 @@ module Suspenders
|
|
|
25
25
|
class_option :help, type: :boolean, aliases: "-h", group: :suspenders,
|
|
26
26
|
desc: "Show this help message and quit"
|
|
27
27
|
|
|
28
|
-
class_option :path, type: :string, default: nil,
|
|
29
|
-
desc: "Path to the gem"
|
|
30
|
-
|
|
31
28
|
class_option :skip_test, type: :boolean, default: true,
|
|
32
29
|
desc: "Skip Test Unit"
|
|
33
30
|
|
|
34
31
|
class_option :skip_system_test,
|
|
35
32
|
type: :boolean, default: true, desc: "Skip system test files"
|
|
36
33
|
|
|
37
|
-
class_option :
|
|
38
|
-
type: :
|
|
39
|
-
|
|
40
|
-
class_option :skip_spring, type: :boolean, default: true,
|
|
41
|
-
desc: class_options[:skip_spring].description
|
|
34
|
+
class_option :css,
|
|
35
|
+
type: :string, default: "postcss", aliases: "-c", desc: "Choose CSS processor"
|
|
42
36
|
|
|
43
37
|
def finish_template
|
|
44
38
|
invoke :suspenders_customization
|
|
45
39
|
super
|
|
46
40
|
end
|
|
47
41
|
|
|
42
|
+
def leftovers
|
|
43
|
+
generate("suspenders:stylesheet_base") unless options[:api] || options[:css] != "postcss"
|
|
44
|
+
invoke :outro
|
|
45
|
+
end
|
|
46
|
+
|
|
48
47
|
def suspenders_customization
|
|
49
48
|
invoke :customize_gemfile
|
|
50
49
|
invoke :setup_development_environment
|
|
@@ -60,11 +59,11 @@ module Suspenders
|
|
|
60
59
|
invoke :remove_config_comment_lines
|
|
61
60
|
invoke :remove_routes_comment_lines
|
|
62
61
|
invoke :run_database_migrations
|
|
63
|
-
invoke :
|
|
62
|
+
invoke :generate_views
|
|
64
63
|
end
|
|
65
64
|
|
|
66
65
|
def customize_gemfile
|
|
67
|
-
build :replace_gemfile
|
|
66
|
+
build :replace_gemfile
|
|
68
67
|
bundle_command "install"
|
|
69
68
|
end
|
|
70
69
|
|
|
@@ -86,6 +85,7 @@ module Suspenders
|
|
|
86
85
|
build :set_test_delivery_method
|
|
87
86
|
build :raise_on_unpermitted_parameters
|
|
88
87
|
build :provide_setup_script
|
|
88
|
+
build :provide_yarn_script
|
|
89
89
|
build :configure_generators
|
|
90
90
|
build :configure_i18n_for_missing_translations
|
|
91
91
|
build :configure_quiet_assets
|
|
@@ -153,7 +153,6 @@ module Suspenders
|
|
|
153
153
|
generate("suspenders:profiler")
|
|
154
154
|
generate("suspenders:json")
|
|
155
155
|
generate("suspenders:static")
|
|
156
|
-
generate("suspenders:stylesheet_base") unless options[:api]
|
|
157
156
|
generate("suspenders:testing")
|
|
158
157
|
generate("suspenders:ci")
|
|
159
158
|
generate("suspenders:js_driver")
|
|
@@ -183,7 +182,7 @@ module Suspenders
|
|
|
183
182
|
end
|
|
184
183
|
|
|
185
184
|
def outro
|
|
186
|
-
say "
|
|
185
|
+
say "\nCongratulations! You just pulled our suspenders."
|
|
187
186
|
say honeybadger_outro
|
|
188
187
|
end
|
|
189
188
|
|
|
@@ -3,14 +3,10 @@ require_relative "base"
|
|
|
3
3
|
module Suspenders
|
|
4
4
|
class JobsGenerator < Generators::Base
|
|
5
5
|
def add_jobs_gem
|
|
6
|
-
gem "
|
|
6
|
+
gem "sidekiq"
|
|
7
7
|
Bundler.with_unbundled_env { run "bundle install" }
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
def configure_background_jobs_for_rspec
|
|
11
|
-
generate "delayed_job:active_record"
|
|
12
|
-
end
|
|
13
|
-
|
|
14
10
|
def initialize_active_job
|
|
15
11
|
copy_file(
|
|
16
12
|
"active_job.rb",
|
|
@@ -19,9 +15,12 @@ module Suspenders
|
|
|
19
15
|
end
|
|
20
16
|
|
|
21
17
|
def configure_active_job
|
|
22
|
-
configure_application_file(
|
|
23
|
-
|
|
24
|
-
)
|
|
18
|
+
configure_application_file("config.active_job.queue_adapter = :sidekiq")
|
|
19
|
+
configure_application_file("config.action_mailer.deliver_later_queue_name = nil")
|
|
20
|
+
configure_application_file("config.action_mailbox.queues.routing = nil")
|
|
21
|
+
configure_application_file("config.active_storage.queues.analysis = nil")
|
|
22
|
+
configure_application_file("config.active_storage.queues.purge = nil")
|
|
23
|
+
configure_application_file("config.active_storage.queues.mirror = nil")
|
|
25
24
|
configure_environment "test", "config.active_job.queue_adapter = :inline"
|
|
26
25
|
end
|
|
27
26
|
|
|
@@ -2,29 +2,14 @@ require_relative "base"
|
|
|
2
2
|
|
|
3
3
|
module Suspenders
|
|
4
4
|
class StylesheetBaseGenerator < Generators::Base
|
|
5
|
-
def
|
|
6
|
-
|
|
7
|
-
Bundler.with_unbundled_env { run "bundle install" }
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def remove_prior_config
|
|
11
|
-
remove_file "app/assets/stylesheets/application.css"
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def add_css_config
|
|
5
|
+
def setup_normalize
|
|
6
|
+
run "yarn add postcss-normalize"
|
|
15
7
|
copy_file(
|
|
16
|
-
"application.
|
|
17
|
-
"app/assets/stylesheets/application.
|
|
8
|
+
"application.postcss.css",
|
|
9
|
+
"app/assets/stylesheets/application.postcss.css",
|
|
18
10
|
force: true
|
|
19
11
|
)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def install_bitters
|
|
23
|
-
run "bitters install --path app/assets/stylesheets"
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def install_normalize_css
|
|
27
|
-
run "bin/yarn add normalize.css"
|
|
12
|
+
copy_file "postcss.config.js", "postcss.config.js", force: true
|
|
28
13
|
end
|
|
29
14
|
end
|
|
30
15
|
end
|
|
@@ -11,11 +11,6 @@ module Suspenders
|
|
|
11
11
|
copy_file "flashes_helper.rb", "app/helpers/flashes_helper.rb"
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def create_shared_javascripts
|
|
15
|
-
copy_file "_javascript.html.erb",
|
|
16
|
-
"app/views/application/_javascript.html.erb"
|
|
17
|
-
end
|
|
18
|
-
|
|
19
14
|
def create_shared_css_overrides
|
|
20
15
|
copy_file "_css_overrides.html.erb",
|
|
21
16
|
"app/views/application/_css_overrides.html.erb"
|
data/lib/suspenders/version.rb
CHANGED
data/lib/suspenders.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require "suspenders/version"
|
|
2
2
|
require "suspenders/exit_on_failure"
|
|
3
|
+
require "suspenders/generators/accessibility_generator"
|
|
3
4
|
require "suspenders/generators/advisories_generator"
|
|
4
5
|
require "suspenders/generators/app_generator"
|
|
5
6
|
require "suspenders/generators/static_generator"
|
data/templates/Gemfile.erb
CHANGED
|
@@ -7,11 +7,14 @@ end
|
|
|
7
7
|
|
|
8
8
|
ruby "<%= Suspenders::RUBY_VERSION %>"
|
|
9
9
|
|
|
10
|
-
<%
|
|
11
|
-
gem "
|
|
10
|
+
<% if options[:api] %>
|
|
11
|
+
gem "sprockets", "< 4"
|
|
12
12
|
<% end %>
|
|
13
|
+
|
|
13
14
|
gem "bootsnap", require: false
|
|
15
|
+
gem "cssbundling-rails"
|
|
14
16
|
gem "honeybadger"
|
|
17
|
+
gem "jsbundling-rails"
|
|
15
18
|
gem "pg"
|
|
16
19
|
gem "puma"
|
|
17
20
|
gem "rack-canonical-host"
|
|
@@ -19,10 +22,11 @@ gem "rails", "<%= Suspenders::RAILS_VERSION %>"
|
|
|
19
22
|
gem "recipient_interceptor"
|
|
20
23
|
gem "sassc-rails"
|
|
21
24
|
gem "skylight"
|
|
22
|
-
gem "sprockets"
|
|
25
|
+
gem "sprockets-rails"
|
|
26
|
+
gem "stimulus-rails"
|
|
23
27
|
gem "title"
|
|
28
|
+
gem "turbo-rails"
|
|
24
29
|
gem "tzinfo-data", platforms: [:mingw, :x64_mingw, :mswin, :jruby]
|
|
25
|
-
gem "webpacker"
|
|
26
30
|
|
|
27
31
|
group :development do
|
|
28
32
|
gem "listen"
|
data/templates/Procfile
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
web: bundle exec puma -p $PORT -C ./config/puma.rb
|
|
2
|
-
worker: bundle exec
|
|
2
|
+
worker: bundle exec sidekiq
|
data/templates/active_job.rb
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "normalize.css"
|
data/templates/bin_yarn
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
APP_ROOT = File.expand_path("..", __dir__)
|
|
4
|
+
Dir.chdir(APP_ROOT) do
|
|
5
|
+
yarn = ENV["PATH"].split(File::PATH_SEPARATOR)
|
|
6
|
+
.select { |dir| File.expand_path(dir) != __dir__ }
|
|
7
|
+
.product(["yarn", "yarnpkg", "yarn.cmd", "yarn.ps1"])
|
|
8
|
+
.map { |dir, file| File.expand_path(file, dir) }
|
|
9
|
+
.find { |file| File.executable?(file) }
|
|
10
|
+
|
|
11
|
+
if yarn
|
|
12
|
+
exec yarn, *ARGV
|
|
13
|
+
else
|
|
14
|
+
warn "Yarn executable was not detected in the system."
|
|
15
|
+
warn "Download Yarn at https://yarnpkg.com/en/docs/install"
|
|
16
|
+
exit 1
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Set up the app to run locally with ease.
|
|
2
2
|
|
|
3
|
-
Use Puma and
|
|
3
|
+
Use Puma and Sidekiq to run the app. This can be done via either
|
|
4
4
|
`heroku local` or any Foreman-compatible project runner (e.g. `foreman start`).
|
|
5
5
|
|
|
6
6
|
Configure your app using `.env`. Installs a basic `.sample.env` that is meant
|
data/templates/sample_env
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="<%= I18n.locale %>">
|
|
3
3
|
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
6
4
|
<%%#
|
|
7
5
|
Configure default and controller-, and view-specific titles in
|
|
8
6
|
config/locales/en.yml. For more see:
|
|
9
7
|
https://github.com/calebthompson/title#usage
|
|
10
8
|
%>
|
|
11
9
|
<title><%%= title %></title>
|
|
12
|
-
|
|
10
|
+
<meta charset="utf-8" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
13
12
|
<%%= csrf_meta_tags %>
|
|
13
|
+
<%%= csp_meta_tag %>
|
|
14
|
+
|
|
15
|
+
<%%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
|
16
|
+
<%%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
|
|
14
17
|
</head>
|
|
15
18
|
<body>
|
|
16
19
|
<%%= render "flashes" -%>
|
|
17
20
|
<%%= yield %>
|
|
18
|
-
<%%= render "javascript" %>
|
|
19
21
|
<%%= render "css_overrides" %>
|
|
20
22
|
</body>
|
|
21
23
|
</html>
|
metadata
CHANGED
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: suspenders
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: '20230113.0'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thoughtbot
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-01-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: bitters
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - ">="
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: 2.0.4
|
|
20
|
-
type: :runtime
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - ">="
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: 2.0.4
|
|
27
13
|
- !ruby/object:Gem::Dependency
|
|
28
14
|
name: parser
|
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -58,14 +44,14 @@ dependencies:
|
|
|
58
44
|
requirements:
|
|
59
45
|
- - "~>"
|
|
60
46
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
47
|
+
version: 7.0.0
|
|
62
48
|
type: :runtime
|
|
63
49
|
prerelease: false
|
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
51
|
requirements:
|
|
66
52
|
- - "~>"
|
|
67
53
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
54
|
+
version: 7.0.0
|
|
69
55
|
- !ruby/object:Gem::Dependency
|
|
70
56
|
name: pry
|
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -129,12 +115,14 @@ files:
|
|
|
129
115
|
- RELEASING.md
|
|
130
116
|
- bin/suspenders
|
|
131
117
|
- docs/heroku_deploy.md
|
|
118
|
+
- docs/rails_7.md
|
|
132
119
|
- lib/suspenders.rb
|
|
133
120
|
- lib/suspenders/actions.rb
|
|
134
121
|
- lib/suspenders/actions/strip_comments_action.rb
|
|
135
122
|
- lib/suspenders/adapters/heroku.rb
|
|
136
123
|
- lib/suspenders/app_builder.rb
|
|
137
124
|
- lib/suspenders/exit_on_failure.rb
|
|
125
|
+
- lib/suspenders/generators/accessibility_generator.rb
|
|
138
126
|
- lib/suspenders/generators/advisories_generator.rb
|
|
139
127
|
- lib/suspenders/generators/analytics_generator.rb
|
|
140
128
|
- lib/suspenders/generators/app_generator.rb
|
|
@@ -170,14 +158,14 @@ files:
|
|
|
170
158
|
- templates/_analytics.html.erb
|
|
171
159
|
- templates/_css_overrides.html.erb
|
|
172
160
|
- templates/_flashes.html.erb
|
|
173
|
-
- templates/_javascript.html.erb
|
|
174
161
|
- templates/action_mailer.rb
|
|
175
162
|
- templates/active_job.rb
|
|
176
|
-
- templates/application.
|
|
163
|
+
- templates/application.postcss.css
|
|
177
164
|
- templates/bin_auto_migrate
|
|
178
165
|
- templates/bin_deploy
|
|
179
166
|
- templates/bin_setup
|
|
180
167
|
- templates/bin_setup_review_app.erb
|
|
168
|
+
- templates/bin_yarn
|
|
181
169
|
- templates/bundler_audit.rake
|
|
182
170
|
- templates/capybara_silence_puma.rb
|
|
183
171
|
- templates/chromedriver.rb
|
|
@@ -228,6 +216,7 @@ files:
|
|
|
228
216
|
- templates/partials/pull_requests_config.rb
|
|
229
217
|
- templates/partials/runner_readme.md
|
|
230
218
|
- templates/partials/runner_setup.rb
|
|
219
|
+
- templates/postcss.config.js
|
|
231
220
|
- templates/postgresql_database.yml.erb
|
|
232
221
|
- templates/rack_mini_profiler.rb
|
|
233
222
|
- templates/rails_helper.rb
|
|
@@ -243,7 +232,7 @@ homepage: http://github.com/thoughtbot/suspenders
|
|
|
243
232
|
licenses:
|
|
244
233
|
- MIT
|
|
245
234
|
metadata: {}
|
|
246
|
-
post_install_message:
|
|
235
|
+
post_install_message:
|
|
247
236
|
rdoc_options:
|
|
248
237
|
- "--charset=UTF-8"
|
|
249
238
|
require_paths:
|
|
@@ -252,15 +241,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
252
241
|
requirements:
|
|
253
242
|
- - ">="
|
|
254
243
|
- !ruby/object:Gem::Version
|
|
255
|
-
version:
|
|
244
|
+
version: 3.0.5
|
|
256
245
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
246
|
requirements:
|
|
258
247
|
- - ">="
|
|
259
248
|
- !ruby/object:Gem::Version
|
|
260
|
-
version:
|
|
249
|
+
version: 3.0.0
|
|
261
250
|
requirements: []
|
|
262
|
-
rubygems_version: 3.
|
|
263
|
-
signing_key:
|
|
251
|
+
rubygems_version: 3.2.33
|
|
252
|
+
signing_key:
|
|
264
253
|
specification_version: 4
|
|
265
254
|
summary: Generate a Rails app using thoughtbot's best practices.
|
|
266
255
|
test_files: []
|