Skip to content

Commit 20563f4

Browse files
authored
Merge branch 'main' into support_unencrypted_data-true
2 parents d2ddf62 + b97a762 commit 20563f4

File tree

1,868 files changed

+73639
-40167
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,868 files changed

+73639
-40167
lines changed

.devcontainer/Dockerfile

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,15 @@
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.3, 3.2, 3.1, 3.0, 2, 2.7, 2.6
4-
ARG VARIANT="3.3"
5-
FROM mcr.microsoft.com/devcontainers/ruby:${VARIANT}
3+
# [Choice] Ruby version: 3.4, 3.3, 3.2
4+
ARG VARIANT="3.4.2"
5+
FROM ghcr.io/rails/devcontainer/images/ruby:${VARIANT}
66

7-
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
8-
ARG NODE_VERSION="lts/*"
9-
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
10-
11-
# [Optional] Uncomment this section to install additional OS packages.
12-
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
13-
&& apt-get -y install --no-install-recommends \
7+
RUN sudo apt-get update && export DEBIAN_FRONTEND=noninteractive \
8+
&& sudo apt-get -y install --no-install-recommends \
149
mariadb-client libmariadb-dev \
1510
postgresql-client postgresql-contrib libpq-dev \
16-
ffmpeg mupdf mupdf-tools libvips poppler-utils
17-
18-
19-
ARG IMAGEMAGICK_VERSION="7.1.0-5"
20-
RUN wget -qO /tmp/im.tar.xz https://imagemagick.org/archive/releases/ImageMagick-$IMAGEMAGICK_VERSION.tar.xz \
21-
&& wget -qO /tmp/im.sig https://imagemagick.org/archive/releases/ImageMagick-$IMAGEMAGICK_VERSION.tar.xz.asc \
22-
&& gpg --batch --keyserver keyserver.ubuntu.com --recv 89AB63D48277377A \
23-
&& gpg --batch --verify /tmp/im.sig /tmp/im.tar.xz \
24-
&& tar xJf /tmp/im.tar.xz -C /tmp \
25-
&& cd /tmp/ImageMagick-$IMAGEMAGICK_VERSION \
26-
&& ./configure --with-rsvg && make -j 9 && make install \
27-
&& ldconfig /usr/local/lib \
28-
&& rm -rf /tmp/*
11+
ffmpeg mupdf mupdf-tools libvips-dev poppler-utils \
12+
libxml2-dev sqlite3 imagemagick
2913

3014
# Add the Rails main Gemfile and install the gems. This means the gem install can be done
3115
# during build instead of on start. When a fork or branch has different gems, we still have an
@@ -44,8 +28,11 @@ COPY activerecord/activerecord.gemspec /tmp/rails/activerecord/
4428
COPY activestorage/activestorage.gemspec /tmp/rails/activestorage/
4529
COPY activesupport/activesupport.gemspec /tmp/rails/activesupport/
4630
COPY railties/railties.gemspec /tmp/rails/railties/
31+
COPY tools/releaser/releaser.gemspec /tmp/rails/tools/releaser/
32+
# Docker does not support COPY as users other than root. So we need to chown this dir so we
33+
# can bundle as vscode user and then remove the tmp dir
34+
RUN sudo chown -R vscode:vscode /tmp/rails
35+
USER vscode
4736
RUN cd /tmp/rails \
48-
&& bundle install \
49-
&& yarn install \
37+
&& /home/vscode/.rbenv/shims/bundle install \
5038
&& rm -rf /tmp/rails
51-
RUN chown -R vscode:vscode /usr/local/rvm

.devcontainer/boot.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
#!/bin/sh
2+
3+
bundle update --bundler
14
bundle install
2-
yarn install
35

4-
sudo chown -R vscode:vscode /usr/local/bundle
6+
if [ -n "${NVM_DIR}" ]; then
7+
# shellcheck disable=SC1091
8+
. "${NVM_DIR}/nvm.sh" && nvm install --lts
9+
yarn install
10+
fi
511

6-
cd activerecord
12+
cd activerecord || { echo "activerecord directory doesn't exist"; exit; }
713

814
# Create PostgreSQL databases
915
bundle exec rake db:postgresql:rebuild
1016

1117
# Create MySQL databases
12-
MYSQL_CODESPACES=1 bundle exec rake db:mysql:rebuild
18+
bundle exec rake db:mysql:rebuild

.devcontainer/compose.yaml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
rails:
53
build:
@@ -12,24 +10,21 @@ services:
1210
# Overrides default command so things don't shut down after the process ends.
1311
command: sleep infinity
1412

15-
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
16-
networks:
17-
- default
18-
1913
depends_on:
2014
- postgres
2115
- mariadb
2216
- redis
2317
- memcached
2418

19+
environment:
20+
MYSQL_CODESPACES: "1"
21+
2522
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
2623
# (Adding the "ports" property to this file will not forward from a Codespace.)
2724

2825
postgres:
2926
image: postgres:latest
3027
restart: unless-stopped
31-
networks:
32-
- default
3328
volumes:
3429
- postgres-data:/var/lib/postgresql/data
3530
environment:
@@ -38,32 +33,23 @@ services:
3833
POSTGRES_PASSWORD: postgres
3934

4035
mariadb:
41-
image: mariadb:latest
36+
image: mariadb:lts
4237
restart: unless-stopped
43-
networks:
44-
- default
4538
volumes:
4639
- mariadb-data:/var/lib/mysql
4740
environment:
4841
MARIADB_ROOT_PASSWORD: root
4942

5043
redis:
51-
image: redis:latest
44+
image: valkey/valkey:8
5245
restart: unless-stopped
53-
networks:
54-
- default
5546
volumes:
5647
- redis-data:/data
5748

5849
memcached:
5950
image: memcached:latest
6051
restart: unless-stopped
6152
command: ["-m", "1024"]
62-
networks:
63-
- default
64-
65-
networks:
66-
default:
6753

6854
volumes:
6955
postgres-data:

.devcontainer/devcontainer.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// For format details, see https://aka.ms/devcontainer.json.
1+
// For format details, see https://containers.dev/implementors/json_reference/.
22
{
33
"name": "Rails project development",
44
"dockerComposeFile": "compose.yaml",
@@ -9,6 +9,12 @@
99
"features": {
1010
"ghcr.io/devcontainers/features/github-cli:1": {
1111
"version": "latest"
12+
},
13+
"ghcr.io/devcontainers/features/node:1": {
14+
"version": "latest"
15+
},
16+
"ghcr.io/rails/devcontainer/features/postgres-client:1.1.1": {
17+
"version": "17"
1218
}
1319
},
1420

@@ -36,8 +42,8 @@
3642
"Shopify.ruby-lsp"
3743
]
3844
}
39-
},
45+
}
4046

41-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
47+
// Uncomment to connect as root instead. More info: https://containers.dev/implementors/json_reference/#remoteUser.
4248
// "remoteUser": "root"
4349
}

.git-blame-ignore-revs

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Changes that are cosmetic and do not add anything substantial
2+
# to the stability, functionality, or testability of Rails will
3+
# generally not be accepted. Read more about our rationale behind
4+
# this decision: https://github.com/rails/rails/pull/13771#issuecomment-32746700
5+
6+
# normalizes indentation and whitespace across the project
7+
80e66cc4d90bf8c15d1a5f6e3152e90147f00772
8+
# applies new string literal convention in *
9+
adca8154c6ffce978a5dbc514273cceecbb15f8e
10+
9ed740449884ba5841f756c4a5ccc0bce8f19082
11+
92e2d16a3c75d549fcd9422a31acd3323b74abaa
12+
78d3f84955bccad0ab161c5f2b4c1133813161a3
13+
6b3719b7577ab81171bab94a0492ae383dd279fe
14+
8b4e6bf23338e2080af537ea4f295e65a1d11388
15+
783763bde97bea3d0c200038453008a8cfff1e88
16+
69ab3eb57e8387b0dd9d672b5e8d9185395baa03
17+
f8477f13bfe554064bd25a57e5289b4ebaabb504
18+
b678eb57e93423ac8e2a0cc0b083ce556c6fb130
19+
b91ff557ef6f621d1b921f358fd5b8a5d9e9090e
20+
c3e7abddfb759eecb30cd59f27103fda4c4827dc
21+
35b3de8021e68649cac963bd82a74cc75d1f60f0
22+
628e51ff109334223094e30ad1365188bbd7f9c6
23+
4b6c68dfb810c836f87587a16353317d1a180805
24+
66a7cfa91045e05f134efc9ac0e226e66161e2e6
25+
bde6547bb6a8ddf18fb687bf20893d3dc87e0358
26+
93c9534c9871d4adad4bc33b5edc355672b59c61
27+
4c208254573c3428d82bd8744860bd86e1c78acb
28+
18a2513729ab90b04b1c86963e7d5b9213270c81
29+
9617db2078e8a85c8944392c21dd748f932bbd80
30+
4df2b779ddfcb27761c71e00e2b241bfa06a0950
31+
a731125f12c5834de7eae3455fad63ea4d348034
32+
d66e7835bea9505f7003e5038aa19b6ea95ceea1
33+
e6ab70c439301d533f14b3387ee181d843a86b30
34+
# modernizes hash syntax in *
35+
1607ee299d15c133b2b63dcfc840eddfba7e525b
36+
477568ee33bee0dc5e57b9df624142296e3951a4
37+
5c315a8fa6296904f5e0ba8da919fc395548cf98
38+
d22e522179c1c90e658c3ed0e9b972ec62306209
39+
fa911a74e15ef34bb435812f7d9cf7324253476f
40+
301ce2a6d11bc7a016f7ede71e3c6fd9fa0693a3
41+
63fff600accb41b56a3e6ac403d9b1732de3086d
42+
5b6eb1d58b48fada298215b2cccda89f993890c3
43+
12a70404cd164008879e63cc320356e6afee3adc
44+
60b67d76dc1d98e4269aac7705e9d8323eb42942
45+
# [Tests only] Enable Minitest/AssertPredicate rule
46+
19f8ab2e7d60dcdfd7664d6bea3a9fae55a3618c
47+
# Standardize nodoc comments
48+
18707ab17fa492eb25ad2e8f9818a320dc20b823
49+
# Add Style/RedundantFreeze to remove redudant .freeze
50+
aa3dcabd874a3e82e455e85a1c94a7abaac2900a
51+
# Enable Performance/UnfreezeString cop
52+
1b86d90136efb98c7b331a84ca163587307a49af
53+
# Arel: rubocop -a
54+
4c0a3d48804a363c7e9272519665a21f601b5248
55+
# Add more rubocop rules about whitespaces
56+
fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2
57+
# Add three new rubocop rules
58+
55f9b8129a50206513264824abb44088230793c2
59+
# applies remaining conventions across the project
60+
b326e82dc012d81e9698cb1f402502af1788c1e9
61+
# remove redundant curlies from hash arguments
62+
411ccbdab2608c62aabdb320d52cb02d446bb39c
63+
# Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} ;)
64+
b95d6e84b00bd926b1118f6a820eca7a870b8c35
65+
b451de0d6de4df6bc66b274cec73b919f823d5ae
66+
# Replace assert ! with assert_not
67+
a1ac18671a90869ef81d02f2eafe8104e4eea34f
68+
# Use respond_to test helpers
69+
0d50cae996c51630361e8514e1f168b0c48957e1
70+
# Change refute to assert_not
71+
211adb47e76b358ea15a3f756431c042ab231c23
72+
# Use assert_predicate and assert_not_predicate
73+
94333a4c31bd10c1f358c538a167e6a4589bae2d
74+
# Use assert_empty and assert_not_empty
75+
82c39e1a0b5114e2d89a80883a41090567a83196
76+
# Remove extra whitespace
77+
fda1863e1a8c120294c56482631d8254ad6125ff
78+
# Reduce string objects by using \ instead of + or << for concatenating strings
79+
b70fc698e157f2a768ba42efac08c08f4786b01c
80+
# Hash Syntax to 1.9 related changes
81+
eebb9ddf9ba559a510975c486fe59a4edc9da97d
82+
be4a4cd38ff2c2db0f6b69bb72fb3557bd5a6e21
83+
d20a52930aa80d7f219465d6fc414a68b16ef2a8
84+
3c580182ff3c16d2247aabc85100bf8c6edb0f82
85+
5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3
86+
a2c843885470dddbad9430963190464a22167921
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
---
2+
name: Bug report
3+
about: Report an issue with Rails you've discovered
4+
---
5+
16
### Steps to reproduce
7+
28
<!-- (Guidelines for creating a bug report are [available
39
here](https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#creating-a-bug-report)) -->
410

@@ -8,12 +14,15 @@ here](https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#crea
814
```
915

1016
### Expected behavior
17+
1118
<!-- Tell us what should happen -->
1219

1320
### Actual behavior
21+
1422
<!-- Tell us what happens instead -->
1523

1624
### System configuration
17-
**Rails version**:
1825

19-
**Ruby version**:
26+
**Rails version**:
27+
28+
**Ruby version**:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/pull_request_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ here](https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#cont
1414
About this template
1515
1616
The following template aims to help contributors write a good description for their pull requests.
17-
We'd like you to provide a description of the changes in your pull request (i.e. bugs fixed or features added), motivation behind the changes, and complete the checklist below before opening a pull request.
17+
We'd like you to provide a description of the changes in your pull request (i.e. bugs fixed or features added), the motivation behind the changes, and complete the checklist below before opening a pull request.
1818
1919
Feel free to discard it if you need to (e.g. when you just fix a typo). -->
2020

@@ -33,13 +33,13 @@ This Pull Request changes [REPLACE ME]
3333

3434
### Additional information
3535

36-
<!-- Provide additional information such as benchmarks, reference to other repositories or alternative solutions. -->
36+
<!-- Provide additional information such as benchmarks, references to other repositories, or alternative solutions. -->
3737

3838
### Checklist
3939

4040
Before submitting the PR make sure the following are checked:
4141

42-
* [ ] This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
42+
* [ ] This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
4343
* [ ] Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: `[Fix #issue-number]`
4444
* [ ] Tests are added or updated if you fix a bug or add a feature.
4545
* [ ] CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

.github/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ markComment: >
2020
2121
The resources of the Rails team are limited, and so we are asking for your help.
2222
23-
If you can still reproduce this error on the `7-1-stable` branch or on `main`,
23+
If you can still reproduce this error on the `8-0-stable` branch or on `main`,
2424
please reply with all of the information you have about it in order to keep the issue open.
2525
2626
Thank you for all your contributions.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Devcontainer Shellcheck
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".devcontainer/**/*.sh"
7+
push:
8+
paths:
9+
- ".devcontainer/**/*.sh"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
devcontainer_shellcheck:
16+
name: Devcontainer Shellcheck
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout (GitHub)
20+
uses: actions/checkout@v4
21+
22+
- name: Lint Devcontainer Scripts
23+
run: |
24+
find .devcontainer/ -name '*.sh' -print0 | xargs -0 shellcheck

0 commit comments

Comments
 (0)