suspenders 20240516.0 → 20250317.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 +29 -8
- data/Rakefile +4 -0
- data/lib/generators/suspenders/accessibility_generator.rb +1 -1
- data/lib/generators/suspenders/ci_generator.rb +2 -5
- data/lib/generators/suspenders/install/web_generator.rb +17 -3
- data/lib/generators/suspenders/testing_generator.rb +3 -3
- data/lib/install/web.rb +18 -2
- data/lib/suspenders/cleanup/generate_readme.rb +2 -2
- data/lib/suspenders/version.rb +2 -2
- metadata +4 -5
- data/lib/generators/templates/ci/dependabot.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 494ebf99fa586fde71df727f66ed14b7bc5aa1c321ba9034f69df6a72612bd56
|
4
|
+
data.tar.gz: f1dcea1032dd82cf9c1bb3cc6f1a7a5090b53a31d31b3a099e92ded52ba6668a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31849bf47e48b831ed1bd4a78c8de47177dcf6bcfd01043855678b09b7ed5fc03745dd7fd281c8d596297aff963030780b2de179bc7dfef78b1a2909863a1804
|
7
|
+
data.tar.gz: '058ce4ed4596b39b7bb8b7849e7164bceb1eeacd25c14e84e62b67125aeb070d3a0c91791adeca584b176c146bd353437e80f4e9079e8c804c07f46eb94fbfc3'
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ like missing deadlines.
|
|
16
16
|
|
17
17
|
## Requirements
|
18
18
|
|
19
|
-
- Rails `~>
|
19
|
+
- Rails `~> 8.0`
|
20
20
|
- Ruby `>= 3.1`
|
21
21
|
- Node `>= 20.0.0`
|
22
22
|
|
@@ -33,8 +33,24 @@ application with Suspenders.
|
|
33
33
|
We skip the [default test framework][] in favor of [RSpec][], and [prefer
|
34
34
|
PostgreSQL][] as our database.
|
35
35
|
|
36
|
+
We skip [RuboCop rules by default][] in favor of our [holistic linting rules][].
|
37
|
+
|
38
|
+
#### Use the latest suspenders release:
|
39
|
+
|
36
40
|
```
|
37
41
|
rails new app_name \
|
42
|
+
--skip-rubocop \
|
43
|
+
--skip-test \
|
44
|
+
-d=postgresql \
|
45
|
+
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
|
46
|
+
```
|
47
|
+
|
48
|
+
#### OR use the current (possibly unreleased) `main` branch of suspenders:
|
49
|
+
|
50
|
+
```
|
51
|
+
rails new app_name \
|
52
|
+
--suspenders-main \
|
53
|
+
--skip-rubocop \
|
38
54
|
--skip-test \
|
39
55
|
-d=postgresql \
|
40
56
|
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
|
@@ -46,6 +62,7 @@ Alternatively, if you're using our [dotfiles][], then you can just run `rails ne
|
|
46
62
|
app_name`, or create your own [railsrc][] file with the following configuration:
|
47
63
|
|
48
64
|
```
|
65
|
+
--skip-rubocop
|
49
66
|
--skip-test
|
50
67
|
--database=postgresql
|
51
68
|
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
|
@@ -57,6 +74,8 @@ app_name`, or create your own [railsrc][] file with the following configuration:
|
|
57
74
|
[prefer PostgreSQL]: https://github.com/thoughtbot/dotfiles/pull/728
|
58
75
|
[dotfiles]: https://github.com/thoughtbot/dotfiles
|
59
76
|
[railsrc]: https://github.com/rails/rails/blob/7f7f9df8641e35a076fe26bd097f6a1b22cb4e2d/railties/lib/rails/generators/rails/app/USAGE#L5C1-L7
|
77
|
+
[RuboCop rules by default]: https://guides.rubyonrails.org/v7.2/7_2_release_notes.html#add-omakase-rubocop-rules-by-default
|
78
|
+
[holistic linting rules]: https://github.com/thoughtbot/suspenders/blob/main/FEATURES.md#linting
|
60
79
|
|
61
80
|
### With Existing Rails Applications
|
62
81
|
|
@@ -115,18 +134,20 @@ under the terms specified in the [LICENSE] file.
|
|
115
134
|
|
116
135
|
[LICENSE]: /LICENSE
|
117
136
|
|
118
|
-
|
137
|
+
<!-- START /templates/footer.md -->
|
138
|
+
## About thoughtbot
|
119
139
|
|
120
|
-
|
140
|
+

|
121
141
|
|
122
|
-
|
123
|
-
|
124
|
-
Suspenders is maintained and funded by thoughtbot, inc.
|
142
|
+
This repo is maintained and funded by thoughtbot, inc.
|
125
143
|
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
126
144
|
|
127
145
|
We love open source software!
|
128
|
-
See [our other projects][community]
|
129
|
-
|
146
|
+
See [our other projects][community].
|
147
|
+
We are [available for hire][hire].
|
130
148
|
|
131
149
|
[community]: https://thoughtbot.com/community?utm_source=github
|
132
150
|
[hire]: https://thoughtbot.com/hire-us?utm_source=github
|
151
|
+
|
152
|
+
|
153
|
+
<!-- END /templates/footer.md -->
|
data/Rakefile
CHANGED
@@ -3,6 +3,10 @@ require "bundler/gem_tasks"
|
|
3
3
|
require "minitest/test_task"
|
4
4
|
require "standard/rake"
|
5
5
|
|
6
|
+
require File.expand_path("test/dummy/config/application", __dir__)
|
7
|
+
|
8
|
+
Rails.application.load_tasks
|
9
|
+
|
6
10
|
Minitest::TestTask.create(:test) do |t|
|
7
11
|
t.libs << "test"
|
8
12
|
t.libs << "lib"
|
@@ -15,7 +15,7 @@ module Suspenders
|
|
15
15
|
def add_capybara_gems
|
16
16
|
gem_group :test do
|
17
17
|
gem "capybara_accessibility_audit", github: "thoughtbot/capybara_accessibility_audit"
|
18
|
-
gem "capybara_accessible_selectors", github: "citizensadvice/capybara_accessible_selectors"
|
18
|
+
gem "capybara_accessible_selectors", github: "citizensadvice/capybara_accessible_selectors", tag: "v0.12.0"
|
19
19
|
end
|
20
20
|
Bundler.with_unbundled_env { run "bundle install" }
|
21
21
|
end
|
@@ -6,16 +6,13 @@ module Suspenders
|
|
6
6
|
|
7
7
|
source_root File.expand_path("../../templates/ci", __FILE__)
|
8
8
|
desc <<~MARKDOWN
|
9
|
-
Uses [GitHub Actions][] for CI
|
9
|
+
Uses [GitHub Actions][] for CI
|
10
10
|
|
11
11
|
[GitHub Actions]: https://docs.github.com/en/actions
|
12
|
-
[Dependabot]: https://docs.github.com/en/code-security/dependabot/working-with-dependabot
|
13
12
|
MARKDOWN
|
14
13
|
|
15
14
|
def ci_files
|
16
|
-
|
17
|
-
template "ci.yml", ".github/workflows/ci.yaml"
|
18
|
-
template "dependabot.yml", ".github/dependabot.yaml"
|
15
|
+
template "ci.yml", ".github/workflows/ci.yml", force: true
|
19
16
|
end
|
20
17
|
|
21
18
|
private
|
@@ -13,10 +13,24 @@ module Suspenders
|
|
13
13
|
|
14
14
|
This generatator is intended to be invoked as part of an [application template][].
|
15
15
|
|
16
|
+
#### Use the latest suspenders release:
|
17
|
+
|
18
|
+
```
|
19
|
+
rails new <app_name> \\
|
20
|
+
--skip-rubocop \\
|
21
|
+
--skip-test \\
|
22
|
+
-d=postgresql \\
|
23
|
+
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
|
24
|
+
```
|
25
|
+
|
26
|
+
#### OR use the current (possibly unreleased) `main` branch of suspenders:
|
27
|
+
|
16
28
|
```
|
17
|
-
rails new
|
18
|
-
--
|
19
|
-
-
|
29
|
+
rails new app_name \\
|
30
|
+
--suspenders-main \\
|
31
|
+
--skip-rubocop \\
|
32
|
+
--skip-test \\
|
33
|
+
-d=postgresql \\
|
20
34
|
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
|
21
35
|
```
|
22
36
|
|
@@ -15,18 +15,18 @@ module Suspenders
|
|
15
15
|
spec/support/action_mailer.rb
|
16
16
|
spec/support/driver.rb
|
17
17
|
spec/support/i18n.rb
|
18
|
-
spec/support/
|
18
|
+
spec/support/shoulda_matchers.rb
|
19
19
|
```
|
20
20
|
|
21
21
|
- Uses [action_dispatch-testing-integration-capybara][] to introduce Capybara assertions into Request specs.
|
22
|
-
- Uses [
|
22
|
+
- Uses [shoulda-matchers][] for simple one-liner tests for common Rails functionality.
|
23
23
|
- Uses [webmock][] for stubbing and setting expectations on HTTP requests in Ruby.
|
24
24
|
|
25
25
|
[RSpec]: http://rspec.info
|
26
26
|
[RSpec Rails]: https://github.com/rspec/rspec-rails
|
27
27
|
[default test suite]: https://guides.rubyonrails.org/testing.html
|
28
28
|
[action_dispatch-testing-integration-capybara]: https://github.com/thoughtbot/action_dispatch-testing-integration-capybara
|
29
|
-
[
|
29
|
+
[shoulda-matchers]: https://github.com/thoughtbot/shoulda-matchers
|
30
30
|
[webmock]: https://github.com/bblimke/webmock
|
31
31
|
MARKDOWN
|
32
32
|
|
data/lib/install/web.rb
CHANGED
@@ -22,16 +22,21 @@ def apply_template!
|
|
22
22
|
|
23
23
|
fail Rails::Generators::Error, message
|
24
24
|
end
|
25
|
-
if options[:database] == "postgresql" && options[:skip_test]
|
25
|
+
if options[:database] == "postgresql" && options[:skip_test] && options[:skip_rubocop]
|
26
26
|
after_bundle do
|
27
27
|
gem_group :development, :test do
|
28
|
-
|
28
|
+
if ARGV.include?("--suspenders-main")
|
29
|
+
gem "suspenders", github: "thoughtbot/suspenders", branch: "main"
|
30
|
+
else
|
31
|
+
gem "suspenders"
|
32
|
+
end
|
29
33
|
end
|
30
34
|
|
31
35
|
run "bundle install"
|
32
36
|
|
33
37
|
generate "suspenders:install:web"
|
34
38
|
rails_command "db:prepare"
|
39
|
+
rails_command "db:migrate"
|
35
40
|
|
36
41
|
say "\nCongratulations! You just pulled our suspenders."
|
37
42
|
end
|
@@ -41,10 +46,21 @@ def apply_template!
|
|
41
46
|
|
42
47
|
=== Please use the correct options ===
|
43
48
|
|
49
|
+
# Use the latest suspenders release:
|
44
50
|
rails new <app_name> \\
|
51
|
+
--skip-rubocop \\
|
45
52
|
--skip-test \\
|
46
53
|
-d=postgresql \\
|
47
54
|
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
|
55
|
+
|
56
|
+
# OR use the current (possibly unreleased) `main` branch of suspenders:
|
57
|
+
rails new <app_name> \\
|
58
|
+
--suspenders-main \\
|
59
|
+
--skip-rubocop \\
|
60
|
+
--skip-test \\
|
61
|
+
-d=postgresql \\
|
62
|
+
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
|
63
|
+
|
48
64
|
ERROR
|
49
65
|
|
50
66
|
fail Rails::Generators::Error, message
|
@@ -62,7 +62,7 @@ module Suspenders
|
|
62
62
|
heading "Accessibility", level: 2
|
63
63
|
description_for Suspenders::Generators::AccessibilityGenerator
|
64
64
|
content <<~MARKDOWN
|
65
|
-
For more information, review the [Accessibility Tooling][] section in
|
65
|
+
For more information, review the [Accessibility Tooling][] section in
|
66
66
|
the [CONTRIBUTING][] guide.
|
67
67
|
|
68
68
|
[Accessibility Tooling]: ./CONTRIBUTING.md#accessibility-tooling
|
@@ -125,7 +125,7 @@ module Suspenders
|
|
125
125
|
### Running the Development Server
|
126
126
|
|
127
127
|
```
|
128
|
-
bin/
|
128
|
+
bin/dev
|
129
129
|
```
|
130
130
|
|
131
131
|
### Seed Data
|
data/lib/suspenders/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '20250317.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '8.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '8.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: climate_control
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,7 +99,6 @@ files:
|
|
99
99
|
- lib/generators/suspenders/testing_generator.rb
|
100
100
|
- lib/generators/suspenders/views_generator.rb
|
101
101
|
- lib/generators/templates/ci/ci.yml.tt
|
102
|
-
- lib/generators/templates/ci/dependabot.yml
|
103
102
|
- lib/generators/templates/email/email_interceptor.rb
|
104
103
|
- lib/generators/templates/factories/factories.rb
|
105
104
|
- lib/generators/templates/factories/factories_spec.rb
|