forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '7-1-stable' into es-translation-v7
- Loading branch information
Showing
3,345 changed files
with
192,194 additions
and
95,321 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# 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.0, 2, 2.7, 2.6 | ||
ARG VARIANT="3" | ||
FROM mcr.microsoft.com/devcontainers/ruby:${VARIANT} | ||
|
||
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 | ||
ARG NODE_VERSION="lts/*" | ||
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends \ | ||
mariadb-client libmariadb-dev \ | ||
postgresql-client postgresql-contrib libpq-dev \ | ||
ffmpeg mupdf mupdf-tools libvips poppler-utils | ||
|
||
|
||
ARG IMAGEMAGICK_VERSION="7.1.0-5" | ||
RUN wget -qO /tmp/im.tar.xz https://imagemagick.org/archive/releases/ImageMagick-$IMAGEMAGICK_VERSION.tar.xz \ | ||
&& wget -qO /tmp/im.sig https://imagemagick.org/archive/releases/ImageMagick-$IMAGEMAGICK_VERSION.tar.xz.asc \ | ||
&& gpg --batch --keyserver keyserver.ubuntu.com --recv 89AB63D48277377A \ | ||
&& gpg --batch --verify /tmp/im.sig /tmp/im.tar.xz \ | ||
&& tar xJf /tmp/im.tar.xz -C /tmp \ | ||
&& cd /tmp/ImageMagick-$IMAGEMAGICK_VERSION \ | ||
&& ./configure --with-rsvg && make -j 9 && make install \ | ||
&& ldconfig /usr/local/lib \ | ||
&& rm -rf /tmp/* | ||
|
||
# Add the Rails main Gemfile and install the gems. This means the gem install can be done | ||
# during build instead of on start. When a fork or branch has different gems, we still have an | ||
# advantage due to caching of the other gems. | ||
RUN mkdir -p /tmp/rails | ||
COPY Gemfile Gemfile.lock RAILS_VERSION rails.gemspec package.json yarn.lock /tmp/rails/ | ||
COPY actioncable/actioncable.gemspec /tmp/rails/actioncable/ | ||
COPY actionmailbox/actionmailbox.gemspec /tmp/rails/actionmailbox/ | ||
COPY actionmailer/actionmailer.gemspec /tmp/rails/actionmailer/ | ||
COPY actionpack/actionpack.gemspec /tmp/rails/actionpack/ | ||
COPY actiontext/actiontext.gemspec /tmp/rails/actiontext/ | ||
COPY actionview/actionview.gemspec /tmp/rails/actionview/ | ||
COPY activejob/activejob.gemspec /tmp/rails/activejob/ | ||
COPY activemodel/activemodel.gemspec /tmp/rails/activemodel/ | ||
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/ | ||
RUN cd /tmp/rails \ | ||
&& bundle install \ | ||
&& yarn install \ | ||
&& rm -rf /tmp/rails | ||
RUN chown -R vscode:vscode /usr/local/rvm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
bundle install | ||
yarn install | ||
|
||
sudo chown -R vscode:vscode /usr/local/bundle | ||
|
||
cd activerecord | ||
|
||
# Create PostgreSQL databases | ||
bundle exec rake db:postgresql:rebuild | ||
|
||
# Create MySQL databases | ||
MYSQL_CODESPACES=1 bundle exec rake db:mysql:rebuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "Rails project development", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "rails", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/devcontainers/features/github-cli:1": { | ||
"version": "latest" | ||
} | ||
}, | ||
|
||
"containerEnv": { | ||
"PGHOST": "postgres", | ||
"PGUSER": "postgres", | ||
"PGPASSWORD": "postgres", | ||
"MYSQL_HOST": "mariadb", | ||
"REDIS_URL": "redis://redis/0", | ||
"MEMCACHE_SERVERS": "memcached:11211" | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// This can be used to network with other containers or the host. | ||
// "forwardPorts": [3000, 5432], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": ".devcontainer/boot.sh", | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"Shopify.ruby-lsp" | ||
] | ||
} | ||
}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
version: '3' | ||
|
||
services: | ||
rails: | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile | ||
|
||
volumes: | ||
- ../..:/workspaces:cached | ||
|
||
# Overrides default command so things don't shut down after the process ends. | ||
command: sleep infinity | ||
|
||
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. | ||
networks: | ||
- default | ||
|
||
depends_on: | ||
- postgres | ||
- mariadb | ||
- redis | ||
- memcached | ||
|
||
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally. | ||
# (Adding the "ports" property to this file will not forward from a Codespace.) | ||
|
||
postgres: | ||
image: postgres:latest | ||
restart: unless-stopped | ||
networks: | ||
- default | ||
volumes: | ||
- postgres-data:/var/lib/postgresql/data | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_DB: postgres | ||
POSTGRES_PASSWORD: postgres | ||
|
||
mariadb: | ||
image: mariadb:latest | ||
restart: unless-stopped | ||
networks: | ||
- default | ||
volumes: | ||
- mariadb-data:/var/lib/mysql | ||
environment: | ||
MARIADB_ROOT_PASSWORD: root | ||
|
||
redis: | ||
image: redis:latest | ||
restart: unless-stopped | ||
networks: | ||
- default | ||
volumes: | ||
- redis-data:/data | ||
|
||
memcached: | ||
image: memcached:latest | ||
restart: unless-stopped | ||
command: ["-m", "1024"] | ||
networks: | ||
- default | ||
|
||
networks: | ||
default: | ||
|
||
volumes: | ||
postgres-data: | ||
mariadb-data: | ||
redis-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,45 @@ | ||
### Summary | ||
<!-- | ||
Thanks for contributing to Rails! | ||
<!-- Provide a general description of the code changes in your pull | ||
request... were there any bugs you had fixed? If so, mention them. If | ||
these bugs have open GitHub issues, be sure to tag them here as well, | ||
to keep the conversation linked together. --> | ||
Please do not make *Draft* pull requests, as they still send | ||
notifications to everyone watching the Rails repo. | ||
### Other Information | ||
Create a pull request when it is ready for review and feedback | ||
from the Rails team :). | ||
<!-- If there's anything else that's important and relevant to your pull | ||
request, mention that information here. This could include | ||
benchmarks, or other information. | ||
If you are updating any of the CHANGELOG files or are asked to update the | ||
CHANGELOG files by reviewers, please add the CHANGELOG entry at the top of the file. | ||
Finally, if your pull request affects documentation or any non-code | ||
If your pull request affects documentation or any non-code | ||
changes, guidelines for those changes are [available | ||
here](https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#contributing-to-the-rails-documentation) | ||
Thanks for contributing to Rails! --> | ||
About this template | ||
The following template aims to help contributors write a good description for their pull requests. | ||
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. | ||
Feel free to discard it if you need to (e.g. when you just fix a typo). --> | ||
|
||
### Motivation / Background | ||
|
||
<!-- | ||
Describe why this Pull Request needs to be merged. What bug have you fixed? What feature have you added? Why is it important? | ||
If you are fixing a specific issue, include "Fixes #ISSUE" (replace with the issue number, remove the quotes) and the issue will be linked to this PR. | ||
--> | ||
|
||
This Pull Request has been created because [REPLACE ME] | ||
|
||
### Detail | ||
|
||
This Pull Request changes [REPLACE ME] | ||
|
||
### Additional information | ||
|
||
<!-- Provide additional information such as benchmarks, reference to other repositories or alternative solutions. --> | ||
|
||
### Checklist | ||
|
||
Before submitting the PR make sure the following are checked: | ||
|
||
* [ ] This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs. | ||
* [ ] 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]` | ||
* [ ] Tests are added or updated if you fix a bug or add a feature. | ||
* [ ] 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Documentation: https://github.com/jonathanhefner/verba-sequentur | ||
|
||
"support request": | ||
comment: > | ||
This appears to be a request for technical support. We reserve the | ||
issue tracker for issues only. For technical support questions, | ||
please use the [rubyonrails-talk](https://discuss.rubyonrails.org/c/rubyonrails-talk/7) | ||
forum or [Stack Overflow](https://stackoverflow.com/questions/tagged/ruby-on-rails), | ||
where a wider community can help you. | ||
close: true | ||
|
||
"feature request": | ||
comment: > | ||
This appears to be a feature request. We generally do not take | ||
feature requests, and we reserve the issue tracker for issues only. | ||
We recommend you [try to implement the feature]( | ||
https://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#contributing-to-the-rails-code), | ||
and send us a pull request instead. If you are unsure if the feature | ||
would be accepted, please ask on the [rubyonrails-core]( | ||
https://discuss.rubyonrails.org/c/rubyonrails-core/5) forum. | ||
close: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
env: | ||
BUNDLE_WITHOUT: db:job:cable:storage:ujs | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby 3.2 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
|
||
- name: mdl | ||
run: bundle exec rake -f guides/Rakefile guides:lint | ||
|
||
- run: tools/railspect changelogs . | ||
- run: tools/railspect configuration . | ||
|
||
- uses: zzak/action-discord@v8 | ||
continue-on-error: true | ||
if: failure() && github.ref_name == 'main' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
webhook: ${{ secrets.DISCORD_WEBHOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Rail Inspector | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "tools/rail_inspector/**" | ||
push: | ||
paths: | ||
- "tools/rail_inspector/**" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
rail_inspector: | ||
name: rail_inspector tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
- run: cd tools/rail_inspector && bundle exec rake |
Oops, something went wrong.