Skip to content

Commit 4a91897

Browse files
authored
Merge branch 'rails:main' into main
2 parents f61a5d6 + 23af6f3 commit 4a91897

File tree

1,073 files changed

+22930
-18662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,073 files changed

+22930
-18662
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.191.1/containers/ruby/.devcontainer/base.Dockerfile
22

3-
# [Choice] Ruby version: 3, 3.0, 2, 2.7, 2.6
4-
ARG VARIANT="3"
3+
# [Choice] Ruby version: 3, 3.3, 3.2, 3.1, 3.0, 2, 2.7, 2.6
4+
ARG VARIANT="3.3"
55
FROM mcr.microsoft.com/devcontainers/ruby:${VARIANT}
66

77
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
File renamed without changes.

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// For format details, see https://aka.ms/devcontainer.json.
22
{
33
"name": "Rails project development",
4-
"dockerComposeFile": "docker-compose.yml",
4+
"dockerComposeFile": "compose.yaml",
55
"service": "rails",
66
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
77

.github/workflows/lint.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,23 @@ jobs:
99
lint:
1010
runs-on: ubuntu-latest
1111
env:
12-
BUNDLE_WITHOUT: db:job:cable:storage:ujs
12+
BUNDLE_WITHOUT: db:job:cable:storage
1313

1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
- name: Set up Ruby 3.2
17+
- name: Remove Gemfile.lock
18+
run: rm -f Gemfile.lock
19+
20+
- name: Set up Ruby 3.3
1821
uses: ruby/setup-ruby@v1
1922
with:
20-
ruby-version: 3.2
23+
ruby-version: 3.3
2124
bundler-cache: true
2225

2326
- name: mdl
2427
run: bundle exec rake -f guides/Rakefile guides:lint
2528

26-
- name: Set up Python
27-
uses: actions/setup-python@v3
28-
with:
29-
python-version: "3.10"
30-
31-
- name: Install dependencies
32-
run: |
33-
python -m pip install --upgrade pip
34-
pip install codespell==2.1.0
35-
- name: Check spelling with codespell
36-
run: codespell --ignore-words=codespell.txt --skip="./vendor/bundle,./actionview/test/ujs/public/vendor/qunit.js,./actiontext/app/assets/javascripts/trix.js,./yarn.lock" || exit 1
37-
3829
- run: tools/railspect changelogs .
3930
- run: tools/railspect configuration .
4031

.github/workflows/rail_inspector.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
20-
- uses: ruby/setup-ruby@v1
20+
- name: Remove Gemfile.lock
21+
run: rm -f Gemfile.lock
22+
- name: Set up Ruby 3.3
23+
uses: ruby/setup-ruby@v1
2124
with:
22-
ruby-version: 3.2
25+
ruby-version: 3.3
2326
bundler-cache: true
2427
- run: cd tools/rail_inspector && bundle exec rake

.github/workflows/rails-new-docker.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@ name: rails-new-docker
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
env:
69
APP_NAME: devrails
710
APP_PATH: dev/devrails
8-
BUNDLE_WITHOUT: db:job:cable:storage:ujs
11+
BUNDLE_WITHOUT: db:job:cable:storage
912

1013
jobs:
1114
rails-new-docker:
1215
runs-on: ubuntu-latest
1316
steps:
1417
- uses: actions/checkout@v4
15-
- uses: ruby/setup-ruby@v1
18+
- name: Remove Gemfile.lock
19+
run: rm -f Gemfile.lock
20+
- name: Set up Ruby 3.3
21+
uses: ruby/setup-ruby@v1
1622
with:
17-
ruby-version: '3.2'
23+
ruby-version: 3.3
1824
bundler-cache: true
1925
- name: Generate --dev app
2026
run: |
@@ -30,6 +36,7 @@ jobs:
3036
podman run --name $APP_NAME \
3137
-v $(pwd):$(pwd) \
3238
-e SECRET_KEY_BASE_DUMMY=1 \
39+
-e DATABASE_URL=sqlite3:storage/production.sqlite3 \
3340
-p 3000:3000 $APP_NAME &
3441
- name: Test container
3542
run: ruby -r ./.github/workflows/scripts/test-container.rb

.github/workflows/rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
- name: Set up Ruby 3.2
17+
- name: Set up Ruby 3.3
1818
uses: ruby/setup-ruby@v1
1919
with:
20-
ruby-version: 3.2
20+
ruby-version: 3.3
2121
bundler-cache: true
2222

2323
- name: Run RuboCop

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/dist/
1010
/doc/
1111
/guides/output/
12+
/preview/
1213
Brewfile.lock.json
1314
debug.log*
1415
node_modules/

.rubocop.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require:
66
- rubocop-md
77

88
AllCops:
9-
TargetRubyVersion: 2.7
9+
TargetRubyVersion: 3.1
1010
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
1111
# to ignore them, so only the ones explicitly set in this file are enabled.
1212
DisabledByDefault: true
@@ -69,6 +69,9 @@ Layout/ClosingParenthesisIndentation:
6969
Layout/CommentIndentation:
7070
Enabled: true
7171

72+
Layout/DefEndAlignment:
73+
Enabled: true
74+
7275
Layout/ElseAlignment:
7376
Enabled: true
7477

@@ -107,6 +110,7 @@ Layout/EmptyLinesAroundModuleBody:
107110
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
108111
Style/HashSyntax:
109112
Enabled: true
113+
EnforcedShorthandSyntax: either
110114

111115
# Method definitions after `private` or `protected` isolated calls need one
112116
# extra level of indentation.
@@ -238,10 +242,19 @@ Lint/ErbNewArguments:
238242
Lint/EnsureReturn:
239243
Enabled: true
240244

245+
Lint/MissingCopEnableDirective:
246+
Enabled: true
247+
241248
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
242249
Lint/RequireParentheses:
243250
Enabled: true
244251

252+
Lint/RedundantCopDisableDirective:
253+
Enabled: true
254+
255+
Lint/RedundantCopEnableDirective:
256+
Enabled: true
257+
245258
Lint/RedundantStringCoercion:
246259
Enabled: true
247260

@@ -262,6 +275,9 @@ Lint/InterpolationCheck:
262275
Exclude:
263276
- '**/test/**/*'
264277

278+
Lint/SafeNavigationChain:
279+
Enabled: true
280+
265281
Style/EvalWithLocation:
266282
Enabled: true
267283
Exclude:
@@ -304,6 +320,9 @@ Style/RedundantCondition:
304320
Style/RedundantDoubleSplatHashBraces:
305321
Enabled: true
306322

323+
Style/ArrayIntersect:
324+
Enabled: true
325+
307326
Performance/BindCall:
308327
Enabled: true
309328

@@ -367,6 +386,9 @@ Minitest/AssertWithExpectedArgument:
367386
Minitest/LiteralAsActualArgument:
368387
Enabled: true
369388

389+
Minitest/NonExecutableTestMethod:
390+
Enabled: true
391+
370392
Minitest/SkipEnsure:
371393
Enabled: true
372394

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/rails/rails/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
1616

1717
* If possible, use the relevant bug report templates to create the issue. Simply copy the content of the appropriate template into a .rb file, make the necessary changes to demonstrate the issue, and **paste the content into the issue description**:
18-
* [**Active Record** (models, database) issues](https://github.com/rails/rails/blob/main/guides/bug_report_templates/active_record_main.rb)
19-
* [**Action Pack** (controllers, routing) issues](https://github.com/rails/rails/blob/main/guides/bug_report_templates/action_controller_main.rb)
20-
* [**Generic template** for other issues](https://github.com/rails/rails/blob/main/guides/bug_report_templates/generic_main.rb)
18+
* [**Active Record** (models, database) issues](https://github.com/rails/rails/blob/main/guides/bug_report_templates/active_record.rb)
19+
* [**Action Pack** (controllers, routing) issues](https://github.com/rails/rails/blob/main/guides/bug_report_templates/action_controller.rb)
20+
* [**Generic template** for other issues](https://github.com/rails/rails/blob/main/guides/bug_report_templates/generic.rb)
2121

2222
* For more detailed information on submitting a bug report and creating an issue, visit our [reporting guidelines](https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#reporting-an-issue).
2323

0 commit comments

Comments
 (0)