-
Notifications
You must be signed in to change notification settings - Fork 75
Rails 7.2.2.2へのアップグレードとWebpackerからShakapackerへの移行 #9101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,3 +1,3 @@ | ||
| [tools] | ||
| ruby = "3.1.6" | ||
| node = "20.9.0" | ||
| node = "22.19.0" |
This file contains hidden or 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 +1 @@ | ||
| 20.9.0 | ||
| 22.19.0 |
This file contains hidden or 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 +1 @@ | ||
| 20.9.0 | ||
| 22.19.0 |
This file contains hidden or 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,2 +1,2 @@ | ||
| ruby 3.1.6 | ||
| nodejs 20.9.0 | ||
| nodejs 22.19.0 |
This file contains hidden or 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,42 @@ | ||
| # Repository Guidelines | ||
|
|
||
| ## Project Structure & Module Organization | ||
| - `app/` Rails app code: `models/`, `controllers/`, `views/`, `jobs/`, `helpers/`, and frontend under `javascript/` (Shakapacker). | ||
| - `config/` environment, routes, and lints (see `.rubocop.yml`, `config/slim_lint.yml`). | ||
| - `db/` migrations and schema; `lib/` app-specific utilities; `public/` static assets. | ||
| - `test/` Minitest suite: `system/`, `models/`, `controllers/`, fixtures in `test/fixtures/`. | ||
| - `bin/` helper scripts; `Procfile.dev` runs Rails and asset dev server. | ||
|
|
||
| ## Build, Test, and Development Commands | ||
| - Setup: `bin/setup` — install gems, prepare DB, yarn, etc. | ||
| - Run (dev): `foreman start -f Procfile.dev` — Rails on `:3000` + Shakapacker. | ||
| - Tests (headless): `rails test:all`. | ||
| - Tests (browser): `HEADFUL=1 rails test:all`. | ||
| - Tests (no parallel): `PARALLEL_WORKERS=1 rails test:all`. | ||
| - Lint: `./bin/lint` — RuboCop (auto-correct), Slim-Lint, ESLint/Prettier. | ||
| - Profiler: `PROFILE=1 rails server` to enable rack-mini-profiler. | ||
|
|
||
| ## Coding Style & Naming Conventions | ||
| - Ruby: 2-space indent, snake_case methods, CamelCase classes; enforced by RuboCop (`.rubocop.yml`). | ||
| - Views: Slim templates, linted by `config/slim_lint.yml`. | ||
| - JS/TS: Code in `app/javascript/`; ESLint + Prettier via `yarn lint` scripts; React 17 and Shakapacker/Webpack 5. | ||
| - Files follow Rails conventions (e.g., `app/models/user.rb`, test `test/models/user_test.rb`). | ||
|
|
||
| ## Testing Guidelines | ||
| - Frameworks: Minitest + Capybara for system tests. | ||
| - Structure: place unit/integration tests under matching `test/*` directories; name files `*_test.rb`. | ||
| - Run a single test or line: `rails test test/models/user_test.rb:42`. | ||
| - Keep tests deterministic; use fixtures in `test/fixtures/`. | ||
|
|
||
| ## Commit & Pull Request Guidelines | ||
| - Commits: imperative mood and focused scope; reference issues (e.g., "Fix profile validation #123"). | ||
| - PRs: clear description, linked issues, screenshots for UI changes, migration notes, and rollback plan if relevant. | ||
| - Quality gates: all linters pass (`bin/lint`) and CI (CircleCI) green; add/adjust tests when changing behavior. | ||
|
|
||
| ## Security & Configuration Tips | ||
| - Never commit secrets; use `.env.local`. Respect `.ruby-version`, `.tool-versions`, and Node versions in `.node-version`/`.nvmrc`. | ||
| - Use `bin/setup` for local DB and dependencies; avoid manual tweaks in `config/` without discussion. | ||
|
|
||
| ## Agent-Specific Instructions | ||
| - Follow these guidelines for any edits. Keep changes minimal, scoped to the task, and update docs/tests when adding commands or changing behavior. | ||
|
|
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.