Skip to content

Commit

Permalink
Merge branch 'main' into template-annotation-comment
Browse files Browse the repository at this point in the history
  • Loading branch information
siaw23 authored Nov 25, 2024
2 parents 419f680 + ce8a6f1 commit d93dd43
Show file tree
Hide file tree
Showing 695 changed files with 13,204 additions and 8,217 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.191.1/containers/ruby/.devcontainer/base.Dockerfile

# [Choice] Ruby version: 3, 3.3, 3.2, 3.1, 3.0, 2, 2.7, 2.6
ARG VARIANT="3.3.5"
ARG VARIANT="3.3.6"
FROM ghcr.io/rails/devcontainer/images/ruby:${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
Expand Down Expand Up @@ -29,6 +29,7 @@ COPY activerecord/activerecord.gemspec /tmp/rails/activerecord/
COPY activestorage/activestorage.gemspec /tmp/rails/activestorage/
COPY activesupport/activesupport.gemspec /tmp/rails/activesupport/
COPY railties/railties.gemspec /tmp/rails/railties/
COPY tools/releaser/releaser.gemspec /tmp/rails/tools/releaser/
# Docker does not support COPY as users other than root. So we need to chown this dir so we
# can bundle as vscode user and then remove the tmp dir
RUN chown -R vscode:vscode /tmp/rails
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// For format details, see https://aka.ms/devcontainer.json.
// For format details, see https://containers.dev/implementors/json_reference/.
{
"name": "Rails project development",
"dockerComposeFile": "compose.yaml",
Expand Down Expand Up @@ -41,6 +41,6 @@
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// Uncomment to connect as root instead. More info: https://containers.dev/implementors/json_reference/#remoteUser.
// "remoteUser": "root"
}
86 changes: 86 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Changes that are cosmetic and do not add anything substantial
# to the stability, functionality, or testability of Rails will
# generally not be accepted. Read more about our rationale behind
# this decision: https://github.com/rails/rails/pull/13771#issuecomment-32746700

# normalizes indentation and whitespace across the project
80e66cc4d90bf8c15d1a5f6e3152e90147f00772
# applies new string literal convention in *
adca8154c6ffce978a5dbc514273cceecbb15f8e
9ed740449884ba5841f756c4a5ccc0bce8f19082
92e2d16a3c75d549fcd9422a31acd3323b74abaa
78d3f84955bccad0ab161c5f2b4c1133813161a3
6b3719b7577ab81171bab94a0492ae383dd279fe
8b4e6bf23338e2080af537ea4f295e65a1d11388
783763bde97bea3d0c200038453008a8cfff1e88
69ab3eb57e8387b0dd9d672b5e8d9185395baa03
f8477f13bfe554064bd25a57e5289b4ebaabb504
b678eb57e93423ac8e2a0cc0b083ce556c6fb130
b91ff557ef6f621d1b921f358fd5b8a5d9e9090e
c3e7abddfb759eecb30cd59f27103fda4c4827dc
35b3de8021e68649cac963bd82a74cc75d1f60f0
628e51ff109334223094e30ad1365188bbd7f9c6
4b6c68dfb810c836f87587a16353317d1a180805
66a7cfa91045e05f134efc9ac0e226e66161e2e6
bde6547bb6a8ddf18fb687bf20893d3dc87e0358
93c9534c9871d4adad4bc33b5edc355672b59c61
4c208254573c3428d82bd8744860bd86e1c78acb
18a2513729ab90b04b1c86963e7d5b9213270c81
9617db2078e8a85c8944392c21dd748f932bbd80
4df2b779ddfcb27761c71e00e2b241bfa06a0950
a731125f12c5834de7eae3455fad63ea4d348034
d66e7835bea9505f7003e5038aa19b6ea95ceea1
e6ab70c439301d533f14b3387ee181d843a86b30
# modernizes hash syntax in *
1607ee299d15c133b2b63dcfc840eddfba7e525b
477568ee33bee0dc5e57b9df624142296e3951a4
5c315a8fa6296904f5e0ba8da919fc395548cf98
d22e522179c1c90e658c3ed0e9b972ec62306209
fa911a74e15ef34bb435812f7d9cf7324253476f
301ce2a6d11bc7a016f7ede71e3c6fd9fa0693a3
63fff600accb41b56a3e6ac403d9b1732de3086d
5b6eb1d58b48fada298215b2cccda89f993890c3
12a70404cd164008879e63cc320356e6afee3adc
60b67d76dc1d98e4269aac7705e9d8323eb42942
# [Tests only] Enable Minitest/AssertPredicate rule
19f8ab2e7d60dcdfd7664d6bea3a9fae55a3618c
# Standardize nodoc comments
18707ab17fa492eb25ad2e8f9818a320dc20b823
# Add Style/RedundantFreeze to remove redudant .freeze
aa3dcabd874a3e82e455e85a1c94a7abaac2900a
# Enable Performance/UnfreezeString cop
1b86d90136efb98c7b331a84ca163587307a49af
# Arel: rubocop -a
4c0a3d48804a363c7e9272519665a21f601b5248
# Add more rubocop rules about whitespaces
fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2
# Add three new rubocop rules
55f9b8129a50206513264824abb44088230793c2
# applies remaining conventions across the project
b326e82dc012d81e9698cb1f402502af1788c1e9
# remove redundant curlies from hash arguments
411ccbdab2608c62aabdb320d52cb02d446bb39c
# Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} ;)
b95d6e84b00bd926b1118f6a820eca7a870b8c35
b451de0d6de4df6bc66b274cec73b919f823d5ae
# Replace assert ! with assert_not
a1ac18671a90869ef81d02f2eafe8104e4eea34f
# Use respond_to test helpers
0d50cae996c51630361e8514e1f168b0c48957e1
# Change refute to assert_not
211adb47e76b358ea15a3f756431c042ab231c23
# Use assert_predicate and assert_not_predicate
94333a4c31bd10c1f358c538a167e6a4589bae2d
# Use assert_empty and assert_not_empty
82c39e1a0b5114e2d89a80883a41090567a83196
# Remove extra whitespace
fda1863e1a8c120294c56482631d8254ad6125ff
# Reduce string objects by using \ instead of + or << for concatenating strings
b70fc698e157f2a768ba42efac08c08f4786b01c
# Hash Syntax to 1.9 related changes
eebb9ddf9ba559a510975c486fe59a4edc9da97d
be4a4cd38ff2c2db0f6b69bb72fb3557bd5a6e21
d20a52930aa80d7f219465d6fc414a68b16ef2a8
3c580182ff3c16d2247aabc85100bf8c6edb0f82
5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3
a2c843885470dddbad9430963190464a22167921
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ markComment: >
The resources of the Rails team are limited, and so we are asking for your help.
If you can still reproduce this error on the `7-2-stable` branch or on `main`,
If you can still reproduce this error on the `8-0-stable` branch or on `main`,
please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/devcontainer-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
imageName: ghcr.io/rails/smoke-test-devcontainer
cacheFrom: ghcr.io/rails/smoke-test-devcontainer
imageTag: sqlite3
push: ${{ github.repository_owner == 'rails' && 'filter' || 'never' }}
push: ${{ github.repository == 'rails/rails' && 'filter' || 'never' }}
refFilterForPush: refs/heads/main
runCmd: bin/rails g scaffold Post && bin/rails db:migrate && bin/rails test

Expand All @@ -57,7 +57,7 @@ jobs:
imageName: ghcr.io/rails/smoke-test-devcontainer
cacheFrom: ghcr.io/rails/smoke-test-devcontainer
imageTag: postgresql
push: ${{ github.repository_owner == 'rails' && 'filter' || 'never' }}
push: ${{ github.repository == 'rails/rails' && 'filter' || 'never' }}
refFilterForPush: refs/heads/main
runCmd: bin/rails g scaffold Post && bin/rails db:migrate && bin/rails test && bin/rails test:system

Expand All @@ -74,7 +74,7 @@ jobs:
imageName: ghcr.io/rails/smoke-test-devcontainer
cacheFrom: ghcr.io/rails/smoke-test-devcontainer
imageTag: mysql
push: ${{ github.repository_owner == 'rails' && 'filter' || 'never' }}
push: ${{ github.repository == 'rails/rails' && 'filter' || 'never' }}
refFilterForPush: refs/heads/main
runCmd: bin/rails g scaffold Post && bin/rails db:migrate && bin/rails test

Expand All @@ -91,7 +91,7 @@ jobs:
imageName: ghcr.io/rails/smoke-test-devcontainer
cacheFrom: ghcr.io/rails/smoke-test-devcontainer
imageTag: trilogy
push: ${{ github.repository_owner == 'rails' && 'filter' || 'never' }}
push: ${{ github.repository == 'rails/rails' && 'filter' || 'never' }}
refFilterForPush: refs/heads/main
runCmd: bin/rails g scaffold Post && bin/rails db:migrate && bin/rails test

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/rails_releaser_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Rails releaser tests

on:
pull_request:
paths:
- "tools/releaser/**"
push:
paths:
- "tools/releaser/**"

permissions:
contents: read

jobs:
releaser_tests:
name: releaser tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
- name: Bundle install
run: bundle install
working-directory: tools/releaser
- run: bundle exec rake
working-directory: tools/releaser
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
release:
types: [published]

jobs:
release:
permissions:
contents: write
id-token: write

environment: release

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
- name: Configure trusted publishing credentials
uses: rubygems/[email protected]
- name: Bundle install
run: bundle install
working-directory: tools/releaser
- name: Run release rake task
run: bundle exec rake push
shell: bash
working-directory: tools/releaser
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Wait for release to propagate
run: gem exec rubygems-await pkg/*.gem
shell: bash
4 changes: 3 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require:
- rubocop-md

AllCops:
TargetRubyVersion: 3.1
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Expand Down Expand Up @@ -329,6 +328,9 @@ Style/OpenStructUse:
Style/ArrayIntersect:
Enabled: true

Style/KeywordArgumentsMerging:
Enabled: true

Performance/BindCall:
Enabled: true

Expand Down
20 changes: 6 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ gem "minitest"
# We need a newish Rake since Active Job sets its test tasks' descriptions.
gem "rake", ">= 13"

gem "releaser", path: "tools/releaser"

gem "sprockets-rails", ">= 2.0.0", require: false
gem "propshaft", ">= 0.1.7"
gem "propshaft", ">= 0.1.7", "!= 1.0.1"
gem "capybara", ">= 3.39"
gem "selenium-webdriver", ">= 4.20.0"

Expand All @@ -24,7 +26,7 @@ gem "dartsass-rails"
gem "solid_cache"
gem "solid_queue"
gem "solid_cable"
gem "kamal", ">= 2.0.0.rc2", require: false
gem "kamal", ">= 2.1.0", require: false
gem "thruster", require: false
# require: false so bcrypt is loaded only when has_secure_password is used.
# This is to avoid Active Model (and by extension the entire framework)
Expand All @@ -38,9 +40,6 @@ gem "terser", ">= 1.1.4", require: false
# Explicitly avoid 1.x that doesn't support Ruby 2.4+
gem "json", ">= 2.0.0", "!=2.7.0"

# Workaround until Ruby ships with cgi version 0.3.6 or higher.
gem "cgi", ">= 0.3.6", require: false

# Workaround until all supported Ruby versions ship with uri version 0.13.1 or higher.
gem "uri", ">= 0.13.1", require: false

Expand Down Expand Up @@ -104,11 +103,10 @@ group :job do
gem "resque", require: false
gem "resque-scheduler", require: false
gem "sidekiq", require: false
gem "delayed_job", require: false
gem "sucker_punch", require: false
gem "queue_classic", ">= 4.0.0", require: false, platforms: :ruby
gem "sneakers", require: false
gem "backburner", require: false
gem "delayed_job_active_record", require: false
end

# Action Cable
Expand Down Expand Up @@ -158,7 +156,7 @@ platforms :ruby, :windows do
gem "nokogiri", ">= 1.8.1", "!= 1.11.0"

# Active Record.
gem "sqlite3", ">= 2.0"
gem "sqlite3", ">= 2.1"

group :db do
gem "pg", "~> 1.3"
Expand All @@ -170,10 +168,4 @@ end
gem "tzinfo-data", platforms: [:windows, :jruby]
gem "wdm", ">= 0.1.0", platforms: [:windows]

# The error_highlight gem only works on CRuby 3.1 or later.
# Also, Rails depends on a new API available since error_highlight 0.4.0.
# (Note that Ruby 3.1 bundles error_highlight 0.3.0.)
if RUBY_VERSION < "3.2"
gem "error_highlight", ">= 0.4.0", platforms: [:ruby]
end
gem "launchy"
Loading

0 comments on commit d93dd43

Please sign in to comment.