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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c2709f640163cac9a711d3fbc428db7771bf0082f8052f0e37cf1b60357fcbf
4
- data.tar.gz: 8a2d49d93399ead80a3ef658124bd3657fb68bc923b3091bc42f390c22b9abf4
3
+ metadata.gz: 494ebf99fa586fde71df727f66ed14b7bc5aa1c321ba9034f69df6a72612bd56
4
+ data.tar.gz: f1dcea1032dd82cf9c1bb3cc6f1a7a5090b53a31d31b3a099e92ded52ba6668a
5
5
  SHA512:
6
- metadata.gz: ad3ba6902b12457e407ac81beade17ec912918d64a0e58eb7874c8214f861deead37497e06214fbae8effc30e7dfff02b4c0006a23a7b6bf0a03f4977538a18b
7
- data.tar.gz: f3e992788aa0424a1b198ae611a9bed2542d80c12b321946a02fdf17fc05126f6f9b7a86fccbe2470aba77a72bc02612603fcfa072fba621b458e5c3d9981afe
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 `~> 7.0`
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
- ## About
137
+ <!-- START /templates/footer.md -->
138
+ ## About thoughtbot
119
139
 
120
- Suspenders is maintained by [thoughtbot].
140
+ ![thoughtbot](https://thoughtbot.com/thoughtbot-logo-for-readmes.svg)
121
141
 
122
- ![thoughtbot](https://thoughtbot.com/brand_assets/93:44.svg)
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
- or [hire us][hire] to help build your product.
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, and [Dependabot][] for dependency updates.
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
- empty_directory ".github/workflows"
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 suspenders_qa \
18
- --skip-test \
19
- -d=postgresql \
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/should_matchers.rb
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 [should-matchers][] for simple one-liner tests for common Rails functionality.
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
- [should-matchers]: https://github.com/thoughtbot/shoulda-matchers
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
- gem "suspenders", github: "thoughtbot/suspenders"
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/rails dev
128
+ bin/dev
129
129
  ```
130
130
 
131
131
  ### Seed Data
@@ -1,6 +1,6 @@
1
1
  module Suspenders
2
- VERSION = "20240516.0".freeze
3
- RAILS_VERSION = "~> 7.0".freeze
2
+ VERSION = "20250317.0".freeze
3
+ RAILS_VERSION = "~> 8.0".freeze
4
4
  MINIMUM_RUBY_VERSION = ">= 3.1".freeze
5
5
  MINIMUM_NODE_VERSION = "20.0.0".freeze
6
6
  end
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: '20240516.0'
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: 2024-05-16 00:00:00.000000000 Z
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: '7.0'
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: '7.0'
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
@@ -1,7 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: bundler
4
- directory: '/'
5
- schedule:
6
- interval: daily
7
- open-pull-requests-limit: 10