Skip to content

Commit

Permalink
Merge branch '7-1-stable' into es-translation-v7
Browse files Browse the repository at this point in the history
  • Loading branch information
latinadeveloper committed Feb 14, 2024
2 parents c38b665 + 0ae4ca3 commit 1f4c33c
Show file tree
Hide file tree
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.
51 changes: 51 additions & 0 deletions .devcontainer/Dockerfile
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
12 changes: 12 additions & 0 deletions .devcontainer/boot.sh
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
43 changes: 43 additions & 0 deletions .devcontainer/devcontainer.json
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"
}
71 changes: 71 additions & 0 deletions .devcontainer/docker-compose.yml
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:
5 changes: 5 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<!-- (Guidelines for creating a bug report are [available
here](https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#creating-a-bug-report)) -->

<!-- Paste your executable test case created from one of the scripts found [here](https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#create-an-executable-test-case) below: -->
```ruby
# Your reproduction script goes here
```

### Expected behavior
<!-- Tell us what should happen -->

Expand Down
54 changes: 39 additions & 15 deletions .github/pull_request_template.md
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.
4 changes: 2 additions & 2 deletions .github/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
## Reporting a Vulnerability

**Do not open up a GitHub issue if the bug is a security vulnerability in Rails**.
Instead refer to our [security policy](https://rubyonrails.org/security/).
Instead, refer to our [security policy](https://rubyonrails.org/security).

## Supported Versions

Security backports are provided for some previous release series. For details
of which release series are currently receiving security backports see our
[security policy](https://rubyonrails.org/security/).
[security policy](https://rubyonrails.org/security).
13 changes: 5 additions & 8 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ exemptLabels:
- attached PR
- regression
- release blocker
# Issues on a milestone will never be considered stale
exemptMilestones: true
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
Expand All @@ -18,16 +20,11 @@ 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 `6-0-stable` branch or on `master`,
If you can still reproduce this error on the `7-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.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

pulls:
markComment: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.
# Limit to only `issues` or `pulls`
only: issues
21 changes: 21 additions & 0 deletions .github/verba-sequentur.yml
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
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
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 }}
24 changes: 24 additions & 0 deletions .github/workflows/rail_inspector.yml
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
Loading

0 comments on commit 1f4c33c

Please sign in to comment.