From c3421bb4dfb198cd2896a393bd31169edd700197 Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Wed, 26 Aug 2020 18:34:03 +0900 Subject: [PATCH 01/36] Add docker-compose.yml to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index ebc25cbd86..d90a44f348 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,5 @@ /node_modules yarn-error.log + +docker-compose.yml From bf4e8dbe50e564f75c32a062af5d53a9727a2cd1 Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Wed, 26 Aug 2020 18:36:19 +0900 Subject: [PATCH 02/36] Add development tools --- Gemfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index 9acac00fb2..c02bcf2424 100644 --- a/Gemfile +++ b/Gemfile @@ -90,6 +90,10 @@ end group :development do gem 'listen', '~> 3.3' gem "yard" + gem "guard" + gem "guard-minitest" + gem "pry", "<= 0.12.2" if RUBY_VERSION < '2.4' + gem "pry-byebug" end group :test do From afc769372747d98df76bf4562e4ab3cc5117bc5b Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Wed, 26 Aug 2020 18:42:54 +0900 Subject: [PATCH 03/36] Add Guardfile --- Guardfile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Guardfile diff --git a/Guardfile b/Guardfile new file mode 100644 index 0000000000..2ee21bd185 --- /dev/null +++ b/Guardfile @@ -0,0 +1,3 @@ +guard :minitest, all_on_start: false do + watch(%r{^test/(.*)test(.*)\.rb$}) +end From a8a55c42c791add8b0fa5efe441e65010dcaa691 Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Fri, 28 Aug 2020 10:49:44 +0900 Subject: [PATCH 04/36] Add docker-compose and database.yml for mysql2 and postgresql --- config/database.mysql.yml | 18 ++++++++++++++++++ config/database.postgres.yml | 19 +++++++++++++++++++ docker-compose.mysql.yml | 14 ++++++++++++++ docker-compose.postgres.yml | 15 +++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 config/database.mysql.yml create mode 100644 config/database.postgres.yml create mode 100644 docker-compose.mysql.yml create mode 100644 docker-compose.postgres.yml diff --git a/config/database.mysql.yml b/config/database.mysql.yml new file mode 100644 index 0000000000..3a9ec22916 --- /dev/null +++ b/config/database.mysql.yml @@ -0,0 +1,18 @@ +default: &default + adapter: mysql2 + host: <%= ENV.fetch('DB_HOST', '127.0.0.1') %> + port: <%= ENV.fetch('DB_PORT', '3306') %> + username: root + password: password + +production: + <<: *default + database: redmine_production + +development: + <<: *default + database: redmine_development + +test: + <<: *default + database: redmine_test diff --git a/config/database.postgres.yml b/config/database.postgres.yml new file mode 100644 index 0000000000..20d7dd38e0 --- /dev/null +++ b/config/database.postgres.yml @@ -0,0 +1,19 @@ +default: &default + adapter: postgresql + encoding: utf8 + host: <%= ENV.fetch('DB_HOST', 'localhost') %> + port: <%= ENV.fetch('DB_PORT', '5432') %> + username: postgres + password: postgres + +production: + <<: *default + database: redmine_production + +development: + <<: *default + database: redmine_development + +test: + <<: *default + database: redmine_test diff --git a/docker-compose.mysql.yml b/docker-compose.mysql.yml new file mode 100644 index 0000000000..d6033fe553 --- /dev/null +++ b/docker-compose.mysql.yml @@ -0,0 +1,14 @@ +version: '3.4' +services: + db: + image: mysql:${DB_VERSION:-latest} + environment: + MYSQL_ROOT_PASSWORD: password + volumes: + - mysql_data:/var/lib/mysql + ports: + - "3306:3306" + + +volumes: + mysql_data: diff --git a/docker-compose.postgres.yml b/docker-compose.postgres.yml new file mode 100644 index 0000000000..ad21b712e7 --- /dev/null +++ b/docker-compose.postgres.yml @@ -0,0 +1,15 @@ +version: '3.4' +services: + db: + image: postgres:${DB_VERSION:-latest} + volumes: + - postgres_data:/var/lib/postgresql + ports: + - "5432:5432" + environment: + LANG: C.UTF-8 + POSTGRES_INITDB_ARGS: --locale=C.UTF-8 + POSTGRES_PASSWORD: postgres + +volumes: + postgres_data: From 31ee4a44d34cfdad45cf609621646fe0b3e9e35f Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Sat, 5 Sep 2020 11:32:46 +0900 Subject: [PATCH 05/36] Add workflows for unit tests --- .github/actions/test-with-db.sh | 11 ++++ .github/workflows/test.yml | 93 +++++++++++++++++++++++++++++++++ config/database.sqlite.yml | 18 +++++++ 3 files changed, 122 insertions(+) create mode 100755 .github/actions/test-with-db.sh create mode 100644 .github/workflows/test.yml create mode 100644 config/database.sqlite.yml diff --git a/.github/actions/test-with-db.sh b/.github/actions/test-with-db.sh new file mode 100755 index 0000000000..2aac7b33a7 --- /dev/null +++ b/.github/actions/test-with-db.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -x + +database=$1 + +cp ./config/database.$database.yml ./config/database.yml +bundle install --path vendor/bundle --without minimagick +bundle update +bundle exec rake db:create db:migrate +bundle exec rake test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..2e29e08f57 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,93 @@ +name: Test + +on: + push: + branches-ignore: + - master + - development + +jobs: + test-with-mysql: + strategy: + fail-fast: false + matrix: + ruby: [2.3, 2.4, 2.5, 2.6] + db_version: [5.7] + runs-on: ubuntu-latest + container: + image: ruby:${{ matrix.ruby }} + services: + db: + image: mysql:${{ matrix.db_version }} + env: + MYSQL_ROOT_PASSWORD: password + ports: + - 3306:3306 + steps: + - uses: actions/checkout@v2 + - name: Cache gems + uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ matrix.ruby }}-mysql-${{ hashFiles('**/Gemfile') }} + restore-keys: | + ${{ matrix.ruby }}-mysql- + ${{ matrix.ruby }}- + - name: Install & run tests + run: ./.github/actions/test-with-db.sh mysql + env: + DB_HOST: db + test-with-postgres: + strategy: + fail-fast: false + matrix: + ruby: [2.3, 2.4, 2.5, 2.6] + db_version: [9.5] + runs-on: ubuntu-latest + container: + image: ruby:${{ matrix.ruby }} + services: + db: + image: postgres:${{ matrix.db_version }} + env: + LANG: C.UTF-8 + POSTGRES_INITDB_ARGS: --locale=C.UTF-8 + POSTGRES_PASSWORD: postgres + ports: + - 5432:5432 + # needed because the postgres container does not provide a healthcheck + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + steps: + - uses: actions/checkout@v2 + - name: Cache gems + uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ matrix.ruby }}-postgres-${{ hashFiles('**/Gemfile') }} + restore-keys: | + ${{ matrix.ruby }}-postgres- + ${{ matrix.ruby }}- + - name: Install & run tests + run: ./.github/actions/test-with-db.sh postgres + env: + DB_HOST: db + test-with-sqlite: + strategy: + fail-fast: false + matrix: + ruby: [2.3, 2.4, 2.5, 2.6] + runs-on: ubuntu-latest + container: + image: ruby:${{ matrix.ruby }} + steps: + - uses: actions/checkout@v2 + - name: Cache gems + uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ matrix.ruby }}-sqlite-${{ hashFiles('**/Gemfile') }} + restore-keys: | + ${{ matrix.ruby }}-sqlite- + ${{ matrix.ruby }}- + - name: Install & run tests + run: ./.github/actions/test-with-db.sh sqlite diff --git a/config/database.sqlite.yml b/config/database.sqlite.yml new file mode 100644 index 0000000000..0d72b884a5 --- /dev/null +++ b/config/database.sqlite.yml @@ -0,0 +1,18 @@ +# Default setup is given for MySQL 5.7.7 or later. +# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end. +# Line indentation must be 2 spaces (no tabs). + +default: &default + adapter: sqlite3 + +production: + <<: *default + database: db/redmine_production.sqlite3 + +development: + <<: *default + database: db/redmine_development.sqlite3 + +test: + <<: *default + database: db/redmine_test.sqlite3 From 8438d5d54e91e01b8b60fb7aed3734653fda759e Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Mon, 14 Sep 2020 12:01:53 +0900 Subject: [PATCH 06/36] Create patch of current branch and store it as artifact --- .github/workflows/create-patch.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/create-patch.yml diff --git a/.github/workflows/create-patch.yml b/.github/workflows/create-patch.yml new file mode 100644 index 0000000000..2b4ad36ac3 --- /dev/null +++ b/.github/workflows/create-patch.yml @@ -0,0 +1,32 @@ +name: Create Patch + +on: + push: + branches-ignore: + - master + - development + +jobs: + create-patch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Create Patch + run: | + git rev-parse --abbrev-ref HEAD > .branch-name + git checkout development + git checkout -b patch + git merge --squash `cat .branch-name` + git config --global user.email "$AUTHOR_EMAIL" + git config --global user.name "$AUTHOR_NAME" + git commit -m "Patch for `cat .branch-name`" + git format-patch development..HEAD --stdout -k > patch.diff + env: + AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }} + AUTHOR_NAME: ${{ github.event.head_commit.author.name }} + - uses: actions/upload-artifact@v2 + with: + name: patch + path: patch.diff From 0ebbed335b6e10819164e0017d278480d2387b14 Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Tue, 15 Sep 2020 13:02:50 +0900 Subject: [PATCH 07/36] Comment link to patch as comment --- .github/actions/comment_patch_url.rb | 76 ++++++++++++++++++++++++++++ .github/workflows/comment-patch.yml | 24 +++++++++ 2 files changed, 100 insertions(+) create mode 100755 .github/actions/comment_patch_url.rb create mode 100644 .github/workflows/comment-patch.yml diff --git a/.github/actions/comment_patch_url.rb b/.github/actions/comment_patch_url.rb new file mode 100755 index 0000000000..9da290bdbb --- /dev/null +++ b/.github/actions/comment_patch_url.rb @@ -0,0 +1,76 @@ +#!/usr/bin/env ruby + +require 'json' + +require 'faraday' + +REPO = 'redmine-patch-meetup/redmine-dev-mirror' + +WORKFLOW_RUN = JSON.parse ENV['WORKFLOW_RUN_JSON'] + +CONNECTION = Faraday.new('https://api.github.com/') do |conn| + conn.response :raise_error + conn.adapter Faraday.default_adapter +end + +def repo_resource(resource) + "repos/#{REPO}/#{resource}" +end + +def get_repo_resource(resource) + response = CONNECTION.get repo_resource(resource) + JSON.parse response.body +end + +def post_to_repo_resource(resource, body) + response = CONNECTION.post repo_resource(resource), + body.to_json, + "Content-Type" => "application/json", + "Authorization" => "token #{ENV['GITHUB_TOKEN']}" + JSON.parse response.body +end + +def patch_artifact_id + response = JSON.parse CONNECTION.get(WORKFLOW_RUN['artifacts_url']).body + patch_artifact = response['artifacts'].find { |artifact| artifact['name'] == 'patch' } + patch_artifact['id'] +end + +def get_suite_id + suite_url = WORKFLOW_RUN['check_suite_url'] + id_start_index = suite_url.rindex('/') + 1 + suite_url[id_start_index..-1] +end + +def patch_artifact_download_url + "https://github.com/#{REPO}/suites/#{get_suite_id}/artifacts/#{patch_artifact_id}" +end + +def pull_request_number + WORKFLOW_RUN['pull_requests'][0]['number'] +end + +def post_pr_comment(pr_number, comment) + post_to_repo_resource "issues/#{pr_number}/comments", { body: comment } +end + +def find_previous_comment_id(pr_number) + comments = get_repo_resource "issues/#{pr_number}/comments" + previous_comment = comments.find { |comment| + comment['body'].include?('Patch can be downloaded [here]') && comment['user']['login'].include?('github-actions') + } + previous_comment['id'] if previous_comment +end + +def delete_comment(comment_id) + CONNECTION.delete repo_resource("issues/comments/#{comment_id}"), nil, "Authorization" => "token #{ENV['GITHUB_TOKEN']}" +end + +def main + existing_comment_id = find_previous_comment_id(pull_request_number) + delete_comment(existing_comment_id) if existing_comment_id + + post_pr_comment pull_request_number, "Patch can be downloaded [here](#{patch_artifact_download_url})" +end + +main if __FILE__ == $0 diff --git a/.github/workflows/comment-patch.yml b/.github/workflows/comment-patch.yml new file mode 100644 index 0000000000..121118ed25 --- /dev/null +++ b/.github/workflows/comment-patch.yml @@ -0,0 +1,24 @@ +name: Comment Patch + +on: + workflow_run: + workflows: + - Create Patch + types: + - completed + branches-ignore: + - master + - development + +jobs: + create-patch: + runs-on: ubuntu-latest + steps: + - name: Install gems + run: sudo gem install faraday + - uses: actions/checkout@v2 + - name: Comment Patch URL + run: ./.github/actions/comment_patch_url.rb + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WORKFLOW_RUN_JSON: ${{ toJSON(github.event.workflow_run) }} From ce60fd18eef6f1653cf834b3ddfea6f6b09c46db Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Fri, 23 Oct 2020 11:17:48 +0900 Subject: [PATCH 08/36] Remove 2.3 support, add 2.7 support --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e29e08f57..6d950828dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.3, 2.4, 2.5, 2.6] + ruby: [2.4, 2.5, 2.6, 2.7] db_version: [5.7] runs-on: ubuntu-latest container: @@ -41,7 +41,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.3, 2.4, 2.5, 2.6] + ruby: [2.4, 2.5, 2.6, 2.7] db_version: [9.5] runs-on: ubuntu-latest container: @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.3, 2.4, 2.5, 2.6] + ruby: [2.4, 2.5, 2.6, 2.7] runs-on: ubuntu-latest container: image: ruby:${{ matrix.ruby }} From f741646371f450b0c28942ac02990120df1faab2 Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Fri, 23 Oct 2020 11:25:19 +0900 Subject: [PATCH 09/36] Change patch file name to "Branch Name".patch --- .github/workflows/create-patch.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-patch.yml b/.github/workflows/create-patch.yml index 2b4ad36ac3..9f09e9989c 100644 --- a/.github/workflows/create-patch.yml +++ b/.github/workflows/create-patch.yml @@ -22,11 +22,14 @@ jobs: git config --global user.email "$AUTHOR_EMAIL" git config --global user.name "$AUTHOR_NAME" git commit -m "Patch for `cat .branch-name`" - git format-patch development..HEAD --stdout -k > patch.diff + PATCH_FILE=`cat .branch-name | sed 's/\//_/g'`.patch # Replace forward slash in branch name with _ + git format-patch development..HEAD --stdout -k > $PATCH_FILE + echo "::set-output name=PATCH_FILE::$PATCH_FILE" + id: patch-creator env: AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }} AUTHOR_NAME: ${{ github.event.head_commit.author.name }} - uses: actions/upload-artifact@v2 with: name: patch - path: patch.diff + path: ${{ steps.patch-creator.outputs.PATCH_FILE }} From b713de99c52eafe6bf2ad5bac283f105b016f7d3 Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Sat, 24 Oct 2020 13:32:14 +0900 Subject: [PATCH 10/36] development branch -> develop --- .github/workflows/comment-patch.yml | 2 +- .github/workflows/create-patch.yml | 6 +++--- .github/workflows/test.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/comment-patch.yml b/.github/workflows/comment-patch.yml index 121118ed25..0bdcb1d602 100644 --- a/.github/workflows/comment-patch.yml +++ b/.github/workflows/comment-patch.yml @@ -8,7 +8,7 @@ on: - completed branches-ignore: - master - - development + - develop jobs: create-patch: diff --git a/.github/workflows/create-patch.yml b/.github/workflows/create-patch.yml index 9f09e9989c..c1e2b6bd02 100644 --- a/.github/workflows/create-patch.yml +++ b/.github/workflows/create-patch.yml @@ -4,7 +4,7 @@ on: push: branches-ignore: - master - - development + - develop jobs: create-patch: @@ -16,14 +16,14 @@ jobs: - name: Create Patch run: | git rev-parse --abbrev-ref HEAD > .branch-name - git checkout development + git checkout develop git checkout -b patch git merge --squash `cat .branch-name` git config --global user.email "$AUTHOR_EMAIL" git config --global user.name "$AUTHOR_NAME" git commit -m "Patch for `cat .branch-name`" PATCH_FILE=`cat .branch-name | sed 's/\//_/g'`.patch # Replace forward slash in branch name with _ - git format-patch development..HEAD --stdout -k > $PATCH_FILE + git format-patch develop..HEAD --stdout -k > $PATCH_FILE echo "::set-output name=PATCH_FILE::$PATCH_FILE" id: patch-creator env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d950828dd..0a4226f48a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: push: branches-ignore: - master - - development + - develop jobs: test-with-mysql: From 4eaf4c711c032a48b45cf71f7d45dfe5f3503a8a Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Fri, 5 Feb 2021 17:52:52 +0900 Subject: [PATCH 11/36] Fix setting of identity for commenting patch --- .github/workflows/create-patch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-patch.yml b/.github/workflows/create-patch.yml index c1e2b6bd02..87acdd8e8c 100644 --- a/.github/workflows/create-patch.yml +++ b/.github/workflows/create-patch.yml @@ -15,12 +15,12 @@ jobs: fetch-depth: 0 - name: Create Patch run: | + git config user.email "$AUTHOR_EMAIL" + git config user.name "$AUTHOR_NAME" git rev-parse --abbrev-ref HEAD > .branch-name git checkout develop git checkout -b patch git merge --squash `cat .branch-name` - git config --global user.email "$AUTHOR_EMAIL" - git config --global user.name "$AUTHOR_NAME" git commit -m "Patch for `cat .branch-name`" PATCH_FILE=`cat .branch-name | sed 's/\//_/g'`.patch # Replace forward slash in branch name with _ git format-patch develop..HEAD --stdout -k > $PATCH_FILE From e209429a987f83732a8100dcd951ae22d1f6e2eb Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Fri, 5 Feb 2021 17:55:18 +0900 Subject: [PATCH 12/36] Only post patch comment when Pull Request exists --- .github/actions/comment_patch_url.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/comment_patch_url.rb b/.github/actions/comment_patch_url.rb index 9da290bdbb..6483c20e59 100755 --- a/.github/actions/comment_patch_url.rb +++ b/.github/actions/comment_patch_url.rb @@ -47,7 +47,7 @@ def patch_artifact_download_url end def pull_request_number - WORKFLOW_RUN['pull_requests'][0]['number'] + WORKFLOW_RUN.dig('pull_requests', 0, 'number') end def post_pr_comment(pr_number, comment) @@ -70,7 +70,7 @@ def main existing_comment_id = find_previous_comment_id(pull_request_number) delete_comment(existing_comment_id) if existing_comment_id - post_pr_comment pull_request_number, "Patch can be downloaded [here](#{patch_artifact_download_url})" + post_pr_comment pull_request_number, "Patch can be downloaded [here](#{patch_artifact_download_url})" if pull_request_number end main if __FILE__ == $0 From 0ed14cd5e90ba1ea0cc320ac9d00262c7d9285d5 Mon Sep 17 00:00:00 2001 From: Kevin Fischer Date: Sat, 13 Feb 2021 16:55:11 +0900 Subject: [PATCH 13/36] Update PR template --- .github/PULL_REQUEST_TEMPLATE.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b501ea9a58..d08f0d19f3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,13 +1,5 @@ +redmine.orgのチケットURL: https://www.redmine.org/issues/xxxx -____________________________________________________________________ - -Your contributions to Redmine are welcome! - -Please **open an issue on the [official website]** instead of sending pull requests. - -Since the development of Redmine is not conducted on GitHub but on the [official website] and core developers are not monitoring the GitHub repo, pull requests might not get reviewed. - -For more detail about how to contribute, please see the wiki page [Contribute] on the [official website]. - -[official website]: https://www.redmine.org/ -[Contribute]: https://www.redmine.org/projects/redmine/wiki/Contribute +TODO: +- [ ] 単体テストかく +- [ ] ... From 2da4d184cf541575c46fd32f7d3622743581f6af Mon Sep 17 00:00:00 2001 From: Mizuki Ishikawa Date: Sat, 13 Feb 2021 17:07:21 +0900 Subject: [PATCH 14/36] Change README (#33) --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ README.rdoc | 5 ----- 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 README.md delete mode 100644 README.rdoc diff --git a/README.md b/README.md new file mode 100644 index 0000000000..2e0ca56282 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# Redmineパッチ会 + +Redmine本体の改善をできる人を増やし、Redmineパッチ会を継続的に行っていけることを目的として、2020年7月から基本毎月オンライン開催しています。 + +基本は複数人のチームに分かれて、相談しながらパッチを書いています。 +(一人でもOK、今後参加者を中心にやり方が変わっていくかも) + +## このリポジトリ + +オープンソースのプロジェクト管理システム、[Redmine](https://redmine.org/projects/redmine)のフォークリポジトリです。 +このリポジトリでRedmineのバグ修正や機能改善を行い、Redmine本体に取り込んでもらうことでRedmineをより良くしていけるよう活動しています。 + +## Redmineパッチ会に参加したい + +Redmineの改善に興味ある方であればどなたでも。 +プログラミングせずに画面の文言変更でもパッチは送れます。 +一緒に仕様を考えて、本家にチケットを作成するだけでもやれることはあります。 Ruby・Railsのプログラミング経験があると更に幅は広がります。 + +初参加の場合、見学からでもお気軽にどうぞ(^^ + +### 1. Connpassでイベントを公開しているので、参加申し込みをしてみましょう! + +https://redmine-patch.connpass.com/ + +### 2. 参加登録をしたら、オンラインのやりとり・当日の会場として利用しているDiscordに参加しよう! + +イベントに参加登録をした方にのみ参加用URLが確認可能です。 +参加の上で不安な点、わからない点があったらテキストチャンネルで気軽に相談してください👍 + +### 3. チーム開発に参加できる環境を整えよう!(プログラミング以外での参加の場合は不要) + +主に通話にDiscord、複数人でのコーディングにVisual Studio CodeのLive Share拡張を利用しています。 +**VSCodeのLive Shareでモブプロのように参加できるため、Redmineが動く開発環境がなくても参加できます。** + +* [Visual Studio Code](https://code.visualstudio.com/)をインストール +* Visual Studio Codeを開いて、拡張機能 [Live Share](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare)をインストール +* (ない人は)Githubのアカウントを作成 + +### 4. イベントの時間になったらDiscordを開いて、ボイスチャンネルに参加しよう! + +(時間になったら他の参加者も参加しているはず) \ No newline at end of file diff --git a/README.rdoc b/README.rdoc deleted file mode 100644 index 4132fb86e7..0000000000 --- a/README.rdoc +++ /dev/null @@ -1,5 +0,0 @@ -= Redmine - -Redmine is a flexible project management web application written using Ruby on Rails framework. - -More details can be found in the doc directory or on the official website http://www.redmine.org From 7e41873089a0c941fb4878ade9e463e77039fe6d Mon Sep 17 00:00:00 2001 From: Juno NISHIZAKI Date: Sat, 8 May 2021 15:38:23 +0900 Subject: [PATCH 15/36] Update test.yml (#41) --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a4226f48a..58e4270fc6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.4, 2.5, 2.6, 2.7] + ruby: [2.5, 2.6, 2.7] db_version: [5.7] runs-on: ubuntu-latest container: @@ -41,7 +41,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.4, 2.5, 2.6, 2.7] + ruby: [2.5, 2.6, 2.7] db_version: [9.5] runs-on: ubuntu-latest container: @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.4, 2.5, 2.6, 2.7] + ruby: [2.5, 2.6, 2.7] runs-on: ubuntu-latest container: image: ruby:${{ matrix.ruby }} From bb838319e7c61ff43a21a2275fa6b05363a903d5 Mon Sep 17 00:00:00 2001 From: Akihiro MATOBA Date: Thu, 19 May 2022 00:51:43 +0900 Subject: [PATCH 16/36] Upgrade ci postgreSQL version from 9.5 to 10 (#76) * add postgres 10.21, 11.16, 12.11, 13.7, 14.3 * use versions existing on hub.docker.com (10.20, 11.15, 12.10, 13.6, 14.2) * Upgrade ci postgres version from 9.5 to 10 (drop 10.20, 11.15, 12.10, 13.6, 14.2) Co-authored-by: Ko Nagase --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 58e4270fc6..93581f5c5d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: fail-fast: false matrix: ruby: [2.5, 2.6, 2.7] - db_version: [9.5] + db_version: [10] runs-on: ubuntu-latest container: image: ruby:${{ matrix.ruby }} From 627d9535b2467c48f2a1f44a0b06c3875d7f9323 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Sun, 12 Jun 2022 10:23:36 +0900 Subject: [PATCH 17/36] Remove 2.5 support, add 3.0 and 3.1 support (#78) --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93581f5c5d..b65d13b92d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.5, 2.6, 2.7] + ruby: [2.6, 2.7, 3.0, 3.1] db_version: [5.7] runs-on: ubuntu-latest container: @@ -41,7 +41,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.5, 2.6, 2.7] + ruby: [2.6, 2.7, 3.0, 3.1] db_version: [10] runs-on: ubuntu-latest container: @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.5, 2.6, 2.7] + ruby: [2.6, 2.7, 3.0, 3.1] runs-on: ubuntu-latest container: image: ruby:${{ matrix.ruby }} From bb4482b5262ac4e5a9cb6722d11452b3243c954f Mon Sep 17 00:00:00 2001 From: Mizuki Ishikawa Date: Fri, 12 Aug 2022 16:25:10 +0900 Subject: [PATCH 18/36] =?UTF-8?q?Add=20VSCode=20devcontainer=E7=94=A8?= =?UTF-8?q?=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=82=92=E8=BF=BD=E5=8A=A0=20(#82)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add VSCode devcontainer用の設定を追加 * Add docker-compose.yml * Move Dockerfile-for-redmine-dev-mirror to .devcontainer/Dockerfile * Fix Rubyのバージョン変更の手順 * Update README.md * Update DockerfileでADDしなくなったことによって機能しなくなっていたコードを削除 --- .devcontainer/.env | 5 + .devcontainer/Dockerfile | 17 +++ .devcontainer/create-db-user.sql | 2 + .devcontainer/devcontainer.json | 44 +++++++ .devcontainer/docker-compose.yml | 66 ++++++++++ .devcontainer/files/.vscode/launch.json | 17 +++ .devcontainer/files/Gemfile.local | 16 +++ .devcontainer/files/additional_environment.rb | 4 + .devcontainer/files/configuration.yml | 10 ++ .devcontainer/files/database.yml | 23 ++++ .devcontainer/scripts/postCreateCommand.sh | 15 +++ .devcontainer/scripts/postStartCommand.sh | 9 ++ .gitignore | 4 +- README.md | 123 +++++++++++++++++- 14 files changed, 353 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/.env create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/create-db-user.sql create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/docker-compose.yml create mode 100644 .devcontainer/files/.vscode/launch.json create mode 100644 .devcontainer/files/Gemfile.local create mode 100644 .devcontainer/files/additional_environment.rb create mode 100644 .devcontainer/files/configuration.yml create mode 100644 .devcontainer/files/database.yml create mode 100644 .devcontainer/scripts/postCreateCommand.sh create mode 100644 .devcontainer/scripts/postStartCommand.sh diff --git a/.devcontainer/.env b/.devcontainer/.env new file mode 100644 index 0000000000..e287b6e88b --- /dev/null +++ b/.devcontainer/.env @@ -0,0 +1,5 @@ +APP_PORT=8000 +SELENIUM_PORT_1=4444 +SELENIUM_PORT_2=5900 +MAILCATCHER_PORT=1080 +RAILS_DB_ADAPTER=postgresql diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..f4adf9bb64 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,17 @@ +# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.1, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.1-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.1-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster +ARG VARIANT=3.1-bullseye +FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT} + +# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service +# The value is a comma-separated list of allowed domains +ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev" + +# [Choice] Node.js version: lts/*, 16, 14, 12, 10 +ARG NODE_VERSION="lts/*" +RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1" + +# [Optional] Uncomment this section to install additional OS packages. +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends bzr gsfonts imagemagick libmagick++-dev + +EXPOSE $APP_PORT diff --git a/.devcontainer/create-db-user.sql b/.devcontainer/create-db-user.sql new file mode 100644 index 0000000000..24417a9bd4 --- /dev/null +++ b/.devcontainer/create-db-user.sql @@ -0,0 +1,2 @@ +CREATE USER vscode CREATEDB; +CREATE DATABASE vscode WITH OWNER vscode; \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..eb4acf502c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,44 @@ +// Update the VARIANT arg in docker-compose.yml to pick a Ruby version +{ + "name": "Redmine dev mirror", + "dockerComposeFile": "docker-compose.yml", + "service": "app", + "workspaceFolder": "/workspace", + "shutdownAction": "stopCompose", + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "rebornix.ruby", + "eamodio.gitlens", + "kaiwood.endwise", + "mtxr.sqltools", + "mtxr.sqltools-driver-pg", + "ms-vsliveshare.vsliveshare" + ], + "settings": { + "workbench.colorCustomizations": { + "activityBar.background": "#ab3e3e" + }, + "sqltools.connections": [ + { + "previewLimit": 50, + "server": "postgresdb", + "port": 5432, + "driver": "PostgreSQL", + "name": "app_development", + "database": "app_development", + "username": "db_user", + "password": "password" + } + ] + } + } + }, + "postCreateCommand": "bash .devcontainer/scripts/postCreateCommand.sh", + "postStartCommand": "bash .devcontainer/scripts/postStartCommand.sh", + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode" +} \ No newline at end of file diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000000..bd519dda28 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,66 @@ +version: '3' +services: + + # PostgreSQL + postgresdb: + image: postgres:14 + restart: on-failure:5 + volumes: + - ./create-db-user.sql:/docker-entrypoint-initdb.d/create-db-user.sql + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + + # MySQL + # mysqldb: + # image: mysql:5 + # restart: on-failure:5 + # environment: + # MYSQL_ROOT_PASSWORD: password + # MYSQL_PASSWORD: password + # MYSQL_USER: db_user + + app: + build: + context: .. + dockerfile: .devcontainer/Dockerfile + args: + APP_PORT: $APP_PORT + # Update 'VARIANT' to pick a version of Ruby: 3, 3.1, 3.0, 2, 2.7, 2.6 + # Append -bullseye or -buster to pin to an OS version. + # Use -bullseye variants on local arm64/Apple Silicon. + VARIANT: "3.0-bullseye" + # Optional Node.js version to install + NODE_VERSION: "14" + environment: + RAILS_DB_ADAPTER: postgresql + RAILS_DB_HOST: postgresdb + RAILS_DB: app + RAILS_DB_USERNAME: postgres + RAILS_DB_PASSWORD: postgres + RAILS_DB_ENCODING: utf8 + RAILS_ENV: development + env_file: .env + tty: true + ports: + - $APP_PORT:3000 + depends_on: + - postgresdb + # - mysqldb + command: sleep infinity + volumes: + - ..:/workspace:cached + + # For selenium test + # chrome: + # M1の場合はselenium/standalone-chrome-debugが動かないため、seleniarm/standalone-chromium:latestを代わりに使うこと。 + # image: selenium/standalone-chrome-debug:3.141.59-20210913 + # ports: + # - $SELENIUM_PORT_1:4444 + # - $SELENIUM_PORT_2:5900 + # shm_size: 2gb + + smtp: + image: schickling/mailcatcher + ports: + - $MAILCATCHER_PORT:1080 diff --git a/.devcontainer/files/.vscode/launch.json b/.devcontainer/files/.vscode/launch.json new file mode 100644 index 0000000000..95285ae0cd --- /dev/null +++ b/.devcontainer/files/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Rails server", + "type": "Ruby", + "request": "launch", + "cwd": "${workspaceRoot}", + "program": "${workspaceRoot}/bin/rails", + "args": [ + "server", + "-b", + "0" + ] + } + ] +} diff --git a/.devcontainer/files/Gemfile.local b/.devcontainer/files/Gemfile.local new file mode 100644 index 0000000000..ddfc5cca2b --- /dev/null +++ b/.devcontainer/files/Gemfile.local @@ -0,0 +1,16 @@ +gem 'pry-rails' +gem 'pry-byebug' +gem 'binding_of_caller' +gem 'better_errors' +gem 'view_source_map' +gem 'parallel_tests' +gem 'benchmark-ips' +gem 'activeresource' +gem 'timecop' +if Gem.ruby_version < Gem::Version.new('3.1.0') + gem 'ruby-debug-ide' + gem 'debase', '~> 0.2.5beta2' +end +if Gem.ruby_version >= Gem::Version.new('2.7.0') + gem 'debug' +end diff --git a/.devcontainer/files/additional_environment.rb b/.devcontainer/files/additional_environment.rb new file mode 100644 index 0000000000..cb4d7a099e --- /dev/null +++ b/.devcontainer/files/additional_environment.rb @@ -0,0 +1,4 @@ +# redmine-dev-mirror用ファイル + +# ログの保存箇所をvolumesの対象外にして同期による負かを軽くする +config.logger = Logger.new('/logs/redmine.log', 2, 1000000) diff --git a/.devcontainer/files/configuration.yml b/.devcontainer/files/configuration.yml new file mode 100644 index 0000000000..6053be2184 --- /dev/null +++ b/.devcontainer/files/configuration.yml @@ -0,0 +1,10 @@ +# redmine-dev-mirror + +development: + email_delivery: + delivery_method: :smtp + smtp_settings: + address: 'smtp' + port: 1025 +test: +production: diff --git a/.devcontainer/files/database.yml b/.devcontainer/files/database.yml new file mode 100644 index 0000000000..929f9f4d0b --- /dev/null +++ b/.devcontainer/files/database.yml @@ -0,0 +1,23 @@ +# redmine-dev-mirror + +production: + adapter: <%= ENV['RAILS_DB_ADAPTER'] %> + database: <%= ENV['RAILS_DB'] %> + username: <%= ENV['RAILS_DB_USERNAME'] %> + password: <%= ENV['RAILS_DB_PASSWORD'] %> + host: <%= ENV['RAILS_DB_HOST'] %> + encoding: <%= ENV['RAILS_DB_ENCODING'] %> +development: + adapter: <%= ENV['RAILS_DB_ADAPTER'] %> + database: <%= ENV['RAILS_DB'] %>_development + username: <%= ENV['RAILS_DB_USERNAME'] %> + password: <%= ENV['RAILS_DB_PASSWORD'] %> + host: <%= ENV['RAILS_DB_HOST'] %> + encoding: <%= ENV['RAILS_DB_ENCODING'] %> +test: + adapter: <%= ENV['RAILS_DB_ADAPTER'] %> + database: <%= ENV['RAILS_DB'] %>_test + username: <%= ENV['RAILS_DB_USERNAME'] %> + password: <%= ENV['RAILS_DB_PASSWORD'] %> + host: <%= ENV['RAILS_DB_HOST'] %> + encoding: <%= ENV['RAILS_DB_ENCODING'] %> \ No newline at end of file diff --git a/.devcontainer/scripts/postCreateCommand.sh b/.devcontainer/scripts/postCreateCommand.sh new file mode 100644 index 0000000000..391fa1ecf5 --- /dev/null +++ b/.devcontainer/scripts/postCreateCommand.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +cp .devcontainer/files/Gemfile.local Gemfile.local +cp .devcontainer/files/database.yml config/database.yml +cp .devcontainer/files/configuration.yml config/configuration.yml +cp .devcontainer/files/additional_environment.rb config/additional_environment.rb +cp -r .devcontainer/files/.vscode .vscode + +sudo mkdir /logs +sudo touch /logs/redmine.log +sudo chown -R vscode /logs + +bundle install + +rake db:create diff --git a/.devcontainer/scripts/postStartCommand.sh b/.devcontainer/scripts/postStartCommand.sh new file mode 100644 index 0000000000..53b70d08ac --- /dev/null +++ b/.devcontainer/scripts/postStartCommand.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +bundle update +rake generate_secret_token + +rake db:migrate +rake redmine:plugins:migrate + +rake log:clear diff --git a/.gitignore b/.gitignore index d90a44f348..f3e4ea2546 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,6 @@ /node_modules yarn-error.log -docker-compose.yml +/docker-compose.yml + +/.vscode \ No newline at end of file diff --git a/README.md b/README.md index 2e0ca56282..7895a2911b 100644 --- a/README.md +++ b/README.md @@ -38,4 +38,125 @@ https://redmine-patch.connpass.com/ ### 4. イベントの時間になったらDiscordを開いて、ボイスチャンネルに参加しよう! -(時間になったら他の参加者も参加しているはず) \ No newline at end of file +(時間になったら他の参加者も参加しているはず) + +## VSCode Remote ContainerによるRedmineの開発環境の作り方 / 機能 + +Redmineの開発環境を作るやり方のうちの一つです。開発環境がすでにある人はこの手順を使わなくても大丈夫です。 + +### 前提条件 + +* Docker Desktopを起動している +* Visual Studio Codeが利用できる + +### 利用手順 + +* このリポジトリを手元にClone + +```bash session +git clone --config=core.autocrlf=input https://github.com/redmine-patch-meetup/redmine-dev-mirror.git +cd ./redmine-dev-mirror +``` + +* 必要に応じて.devcontainer/.envを書き換える(portの衝突がなければデフォルトでも動きます) + +```bash +# 開発中のRedmineに http://localhost:8000 でアクセス出来るようになる。8000を既に使っている場合は変える +APP_PORT=8000 +# Seleniumのテストを実行するときに利用するポート。4444, 5900を既に使っている場合は変える +SELENIUM_PORT_1=4444 +SELENIUM_PORT_2=5900 +# Redmineから送信したメールを http://localhost:1080 で確認出来るようになる。1080を既に使っている場合は変える +MAILCATCHER_PORT=1080 +# mysqlやsqlite3に変えても良い。mysqlの場合、.devcontainer/docker-compose.ymlのMySQL関連のコメントアウトを外す +RAILS_DB_ADAPTER=postgresql +``` + +* VScodeに拡張機能[Remote-Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)をインストール + +* VScodeで/your/path/redmine-dev-mirror を開く + +フォルダを開く様子 + +* 右下に出てくるポップアップのReopen in Containerを選択(出てこなかったらVSCodeのコマンドパレットからRemote Containers: Rebuild and Reopen in Containerを選択) => ビルドが始まるはず + +Reopen in Containerボタン + +* VSCodeの左側のバーが赤くなり、左側のファイルツリーも表示されたらコンテナ内に入れている状態 + +画面下のターミナルに"Press any key"と表示されるため、「キー入力を行い(ターミナルが閉じる)、メニューからターミナルを開く」か 「"Press any key"を放置したままターミナル右上のプラスを押す」 という流れでコマンドを入力できるようにする。 + +Press any keyと表示されている画面 +↓ +コマンドを入力可能になった画面 + +* 画面下のターミナル内で +```bash +rails s -b 0.0.0.0 +``` +* 少し待つと、ブラウザから http://localhost:[.devcontainer/.envで指定したAPP_PORT] でRedmineにアクセスできるようになる。 + +Railsアプリケーションを起動できた画面 + +* テストの実行 +```bash +bundle exec rake test RAILS_ENV=test +``` + +### おまけ + +#### 1. VSCodeの拡張機能を増やしたい + +.devcontainer/devcontainer.jsonのextensionsに拡張機能を追加し、VSCodeのコマンドパレットからRebuild and Reopen container + +#### 2. Redmineから送信されるメールの内容をチェック + +http://localhost:[.devcontainer/.envで指定したMAILCATCHER_PORT] でにアクセスするとメールキャッチャーを開ける + +#### 3. Ruby3.0系以外のバージョンで動作検証やテストをしたい + +.devcontainer/docker-compose.yml ファイルの `VARIANT: "3.0-bullseye"` の3.0-bulleseye 部分を利用したいバージョンに書き換えて、VSCodeのコマンドパレットからRebuild and Reopen container + +#### 4. test/systemのテストを実行する場合 + +.devcontainer/docker-compose.yml内のchrome:の塊のコメントアウトを外し、VSCodeのコマンドパレットからRebuild and Reopen container + + selenium/standalone-chrome-debugイメージから持ってきたchromeを動かすためにCapybara周りで下のように設定を追加する。 + app == docker-composeでrailsアプリケーションが動いているところのサービス名 + chrome:4444 == docker-compose selenium/standalone-chrome-debugイメージのサービス名 + port + +```diff +diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb +index 1a1e0cb4a..fedbe7d15 100644 +--- a/test/application_system_test_case.rb ++++ b/test/application_system_test_case.rb +@@ -43,13 +43,17 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + } + } + ) +- ++ options[:browser] = :remote ++ Capybara.server_host = 'app' ++ Capybara.server_port = <.devcontainer/.envのAPP_PORT(デフォルト8000)に入れた値に書き換える> + driven_by( + :selenium, using: :chrome, screen_size: [1024, 900], + options: options + ) + + setup do ++ Capybara.app_host = "http://#{Capybara.server_host}:#{Capybara.server_port}" + # Allow defining a custom app host (useful when using a remote Selenium hub) + if ENV['CAPYBARA_APP_HOST'] + Capybara.configure do |config| + +``` + +``` + bundle exec rake test TEST=test/system RAILS_ENV=test +``` + +そのときホスト側で +``` +open vnc://localhost:5900 +``` +を実行すると実際に動いているChromeの画面を見ることができる。 (パスワードを要求されたら `secret` と入れる) From eb1aa133e46c09dfd1dc1cf2b46434038142fb67 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Thu, 23 Feb 2023 19:32:34 +0900 Subject: [PATCH 19/36] =?UTF-8?q?devcontainer=E3=81=AEDB=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E5=91=A8=E3=82=8A=E3=81=AE=E5=A4=89=E6=9B=B4=20(#84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adjust docker-compose.yml MySQL settings and expose PostgreSQL/MySQL ports * Adjust SQLTools MySQL driver and connections --- .devcontainer/.env | 2 ++ .devcontainer/devcontainer.json | 17 ++++++++++++++--- .devcontainer/docker-compose.yml | 16 ++++++++++++++-- README.md | 3 +++ 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/.devcontainer/.env b/.devcontainer/.env index e287b6e88b..d86563608b 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -3,3 +3,5 @@ SELENIUM_PORT_1=4444 SELENIUM_PORT_2=5900 MAILCATCHER_PORT=1080 RAILS_DB_ADAPTER=postgresql +POSTGRES_PORT=5433 +MYSQL_PORT=3307 \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index eb4acf502c..766143e1b5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -16,6 +16,7 @@ "kaiwood.endwise", "mtxr.sqltools", "mtxr.sqltools-driver-pg", + "mtxr.sqltools-driver-mysql", "ms-vsliveshare.vsliveshare" ], "settings": { @@ -30,9 +31,19 @@ "driver": "PostgreSQL", "name": "app_development", "database": "app_development", - "username": "db_user", - "password": "password" - } + "username": "postgres", + "password": "postgres" + }, + { + "previewLimit": 50, + "server": "mysqldb", + "port": 3306, + "driver": "MySQL", + "name": "app_development", + "database": "app_development", + "username": "root", + "password": "password" + }, ] } } diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index bd519dda28..057d05732a 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -10,15 +10,18 @@ services: environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + ports: + - $POSTGRES_PORT:5432 # MySQL # mysqldb: # image: mysql:5 + # platform: linux/amd64 # restart: on-failure:5 # environment: # MYSQL_ROOT_PASSWORD: password - # MYSQL_PASSWORD: password - # MYSQL_USER: db_user + # ports: + # - $MYSQL_PORT:3306 app: build: @@ -33,6 +36,7 @@ services: # Optional Node.js version to install NODE_VERSION: "14" environment: + # PostgreSQL RAILS_DB_ADAPTER: postgresql RAILS_DB_HOST: postgresdb RAILS_DB: app @@ -40,6 +44,14 @@ services: RAILS_DB_PASSWORD: postgres RAILS_DB_ENCODING: utf8 RAILS_ENV: development + # # MySQL + # RAILS_DB_ADAPTER: mysql2 + # RAILS_DB_HOST: mysqldb + # RAILS_DB: app + # RAILS_DB_USERNAME: root + # RAILS_DB_PASSWORD: password + # RAILS_DB_ENCODING: utf8mb4 + # RAILS_ENV: development env_file: .env tty: true ports: diff --git a/README.md b/README.md index 7895a2911b..871af948e2 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,9 @@ SELENIUM_PORT_2=5900 MAILCATCHER_PORT=1080 # mysqlやsqlite3に変えても良い。mysqlの場合、.devcontainer/docker-compose.ymlのMySQL関連のコメントアウトを外す RAILS_DB_ADAPTER=postgresql +# postgres、mysqlのホスト側への公開ポート。ホスト側で既に使っている場合は変える +POSTGRES_PORT=5433 +MYSQL_PORT=3307 ``` * VScodeに拡張機能[Remote-Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)をインストール From 758042cc467b96820667d1714d35dffe1323b9c4 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Thu, 23 Feb 2023 19:33:51 +0900 Subject: [PATCH 20/36] Update test.yml matrix ruby versions (#86) --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b65d13b92d..94288ac7dc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.6, 2.7, 3.0, 3.1] + ruby: ['2.7', '3.0', '3.1', '3.2'] db_version: [5.7] runs-on: ubuntu-latest container: @@ -41,7 +41,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.6, 2.7, 3.0, 3.1] + ruby: ['2.7', '3.0', '3.1', '3.2'] db_version: [10] runs-on: ubuntu-latest container: @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.6, 2.7, 3.0, 3.1] + ruby: ['2.7', '3.0', '3.1', '3.2'] runs-on: ubuntu-latest container: image: ruby:${{ matrix.ruby }} From efe19eae97d1580d2e2a4f00f408e3b210ee0e55 Mon Sep 17 00:00:00 2001 From: asakura Date: Fri, 2 Jun 2023 17:03:39 +0900 Subject: [PATCH 21/36] =?UTF-8?q?fix:=20=E3=83=91=E3=83=83=E3=83=81?= =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=81=AE=E9=80=81=E4=BF=A1?= =?UTF-8?q?=E5=85=88=E3=83=AA=E3=83=9D=E3=82=B8=E3=83=88=E3=83=AA=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/comment_patch_url.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/comment_patch_url.rb b/.github/actions/comment_patch_url.rb index 6483c20e59..dd4f72dbfb 100755 --- a/.github/actions/comment_patch_url.rb +++ b/.github/actions/comment_patch_url.rb @@ -4,7 +4,7 @@ require 'faraday' -REPO = 'redmine-patch-meetup/redmine-dev-mirror' +REPO = 'agileware-jp/redmine-dev-mirror' WORKFLOW_RUN = JSON.parse ENV['WORKFLOW_RUN_JSON'] From 54099a1db0b9ce0e5020d781c78646ebe6bfe957 Mon Sep 17 00:00:00 2001 From: asakura Date: Fri, 2 Jun 2023 16:39:09 +0900 Subject: [PATCH 22/36] =?UTF-8?q?fix:=20develop=E3=81=A7test=20workflow?= =?UTF-8?q?=E3=82=92=E6=9C=89=E5=8A=B9=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94288ac7dc..a2c8c70972 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,6 @@ on: push: branches-ignore: - master - - develop jobs: test-with-mysql: From f177ad4126f1659af498106984355dff08cdc06c Mon Sep 17 00:00:00 2001 From: asakura Date: Fri, 2 Jun 2023 17:19:35 +0900 Subject: [PATCH 23/36] =?UTF-8?q?chore:=20README=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 871af948e2..139671f68c 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,37 @@ -# Redmineパッチ会 - -Redmine本体の改善をできる人を増やし、Redmineパッチ会を継続的に行っていけることを目的として、2020年7月から基本毎月オンライン開催しています。 - -基本は複数人のチームに分かれて、相談しながらパッチを書いています。 -(一人でもOK、今後参加者を中心にやり方が変わっていくかも) +# Agileware Redmine Mirror ## このリポジトリ -オープンソースのプロジェクト管理システム、[Redmine](https://redmine.org/projects/redmine)のフォークリポジトリです。 +Redmineパッチ会の[redmine-dev-mirror](https://github.com/redmine-patch-meetup/redmine-dev-mirror)のフォークリポジトリです。 + このリポジトリでRedmineのバグ修正や機能改善を行い、Redmine本体に取り込んでもらうことでRedmineをより良くしていけるよう活動しています。 +---- + +以降はRedmineパッチ会の情報です。最新の情報は[redmine-dev-mirror](https://github.com/redmine-patch-meetup/redmine-dev-mirror)をご覧ください。 + +---- + ## Redmineパッチ会に参加したい -Redmineの改善に興味ある方であればどなたでも。 -プログラミングせずに画面の文言変更でもパッチは送れます。 +Redmineの改善に興味ある方であればどなたでも。 +プログラミングせずに画面の文言変更でもパッチは送れます。 一緒に仕様を考えて、本家にチケットを作成するだけでもやれることはあります。 Ruby・Railsのプログラミング経験があると更に幅は広がります。 初参加の場合、見学からでもお気軽にどうぞ(^^ ### 1. Connpassでイベントを公開しているので、参加申し込みをしてみましょう! -https://redmine-patch.connpass.com/ +https://redmine-patch.connpass.com/ -### 2. 参加登録をしたら、オンラインのやりとり・当日の会場として利用しているDiscordに参加しよう! +### 2. 参加登録をしたら、オンラインのやりとり・当日の会場として利用しているDiscordに参加しよう! -イベントに参加登録をした方にのみ参加用URLが確認可能です。 +イベントに参加登録をした方にのみ参加用URLが確認可能です。 参加の上で不安な点、わからない点があったらテキストチャンネルで気軽に相談してください👍 -### 3. チーム開発に参加できる環境を整えよう!(プログラミング以外での参加の場合は不要) +### 3. チーム開発に参加できる環境を整えよう!(プログラミング以外での参加の場合は不要) -主に通話にDiscord、複数人でのコーディングにVisual Studio CodeのLive Share拡張を利用しています。 +主に通話にDiscord、複数人でのコーディングにVisual Studio CodeのLive Share拡張を利用しています。 **VSCodeのLive Shareでモブプロのように参加できるため、Redmineが動く開発環境がなくても参加できます。** * [Visual Studio Code](https://code.visualstudio.com/)をインストール @@ -145,7 +147,7 @@ index 1a1e0cb4a..fedbe7d15 100644 :selenium, using: :chrome, screen_size: [1024, 900], options: options ) - + setup do + Capybara.app_host = "http://#{Capybara.server_host}:#{Capybara.server_port}" # Allow defining a custom app host (useful when using a remote Selenium hub) From baf38a5e1c308e1d6a7de643b733ea60a43a1163 Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 09:58:17 +0900 Subject: [PATCH 24/36] =?UTF-8?q?feat:=20next=5Frails.gem=E3=81=AE?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index c02bcf2424..12159b159c 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,7 @@ source 'https://rubygems.org' ruby '>= 2.7.0', '< 3.3.0' gem 'rails', '6.1.7.3' +gem 'next_rails' gem 'rouge', '~> 4.1.0' gem 'request_store', '~> 1.5.0' gem 'mini_mime', '~> 1.1.0' From 02b2b16de2095af79bbbbe437a256f712b8af995 Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 10:04:37 +0900 Subject: [PATCH 25/36] run: git cococo bundle binstubs next_rails --- bin/bundle_report | 27 +++++++++++++++++++++++++++ bin/deprecations | 27 +++++++++++++++++++++++++++ bin/gem-next-diff | 27 +++++++++++++++++++++++++++ bin/next | 27 +++++++++++++++++++++++++++ bin/next.sh | 27 +++++++++++++++++++++++++++ bin/next_rails | 27 +++++++++++++++++++++++++++ 6 files changed, 162 insertions(+) create mode 100755 bin/bundle_report create mode 100755 bin/deprecations create mode 100755 bin/gem-next-diff create mode 100755 bin/next create mode 100755 bin/next.sh create mode 100755 bin/next_rails diff --git a/bin/bundle_report b/bin/bundle_report new file mode 100755 index 0000000000..7ee740b736 --- /dev/null +++ b/bin/bundle_report @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'bundle_report' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("next_rails", "bundle_report") diff --git a/bin/deprecations b/bin/deprecations new file mode 100755 index 0000000000..f08ff574b9 --- /dev/null +++ b/bin/deprecations @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'deprecations' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("next_rails", "deprecations") diff --git a/bin/gem-next-diff b/bin/gem-next-diff new file mode 100755 index 0000000000..b437f25446 --- /dev/null +++ b/bin/gem-next-diff @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'gem-next-diff' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("next_rails", "gem-next-diff") diff --git a/bin/next b/bin/next new file mode 100755 index 0000000000..ed2edd0eec --- /dev/null +++ b/bin/next @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'next' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("next_rails", "next") diff --git a/bin/next.sh b/bin/next.sh new file mode 100755 index 0000000000..059c7e06d7 --- /dev/null +++ b/bin/next.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'next.sh' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("next_rails", "next.sh") diff --git a/bin/next_rails b/bin/next_rails new file mode 100755 index 0000000000..2caf44cf8c --- /dev/null +++ b/bin/next_rails @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'next_rails' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("next_rails", "next_rails") From 373875933fa83f1f170ab604ea7baa68dc930282 Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 10:05:29 +0900 Subject: [PATCH 26/36] run: git cococo bundle binstubs next_rails --standalone --- bin/bundle_report | 17 ++--------------- bin/deprecations | 17 ++--------------- bin/gem-next-diff | 17 ++--------------- bin/next | 17 ++--------------- bin/next.sh | 17 ++--------------- bin/next_rails | 17 ++--------------- 6 files changed, 12 insertions(+), 90 deletions(-) diff --git a/bin/bundle_report b/bin/bundle_report index 7ee740b736..fe90037464 100755 --- a/bin/bundle_report +++ b/bin/bundle_report @@ -8,20 +8,7 @@ # this file is here to facilitate running it. # -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +$:.unshift File.expand_path "..", __dir__ -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" require "bundler/setup" - -load Gem.bin_path("next_rails", "bundle_report") +load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/bundle_report", __dir__ diff --git a/bin/deprecations b/bin/deprecations index f08ff574b9..49b9a7e5fe 100755 --- a/bin/deprecations +++ b/bin/deprecations @@ -8,20 +8,7 @@ # this file is here to facilitate running it. # -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +$:.unshift File.expand_path "..", __dir__ -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" require "bundler/setup" - -load Gem.bin_path("next_rails", "deprecations") +load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/deprecations", __dir__ diff --git a/bin/gem-next-diff b/bin/gem-next-diff index b437f25446..0c2e10e1e9 100755 --- a/bin/gem-next-diff +++ b/bin/gem-next-diff @@ -8,20 +8,7 @@ # this file is here to facilitate running it. # -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +$:.unshift File.expand_path "..", __dir__ -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" require "bundler/setup" - -load Gem.bin_path("next_rails", "gem-next-diff") +load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/gem-next-diff", __dir__ diff --git a/bin/next b/bin/next index ed2edd0eec..4e280078dd 100755 --- a/bin/next +++ b/bin/next @@ -8,20 +8,7 @@ # this file is here to facilitate running it. # -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +$:.unshift File.expand_path "..", __dir__ -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" require "bundler/setup" - -load Gem.bin_path("next_rails", "next") +load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/next", __dir__ diff --git a/bin/next.sh b/bin/next.sh index 059c7e06d7..821f0ab224 100755 --- a/bin/next.sh +++ b/bin/next.sh @@ -8,20 +8,7 @@ # this file is here to facilitate running it. # -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +$:.unshift File.expand_path "..", __dir__ -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" require "bundler/setup" - -load Gem.bin_path("next_rails", "next.sh") +load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/next.sh", __dir__ diff --git a/bin/next_rails b/bin/next_rails index 2caf44cf8c..b4d154ed3c 100755 --- a/bin/next_rails +++ b/bin/next_rails @@ -8,20 +8,7 @@ # this file is here to facilitate running it. # -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +$:.unshift File.expand_path "..", __dir__ -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" require "bundler/setup" - -load Gem.bin_path("next_rails", "next_rails") +load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/next_rails", __dir__ From 0c114ea5d39bd35dc1dd1592d06232b3a5198054 Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 10:06:39 +0900 Subject: [PATCH 27/36] Revert "run: git cococo bundle binstubs next_rails --standalone" This reverts commit a593297c5b7deb48878e2c61f0b4956bd998883f. --- bin/bundle_report | 17 +++++++++++++++-- bin/deprecations | 17 +++++++++++++++-- bin/gem-next-diff | 17 +++++++++++++++-- bin/next | 17 +++++++++++++++-- bin/next.sh | 17 +++++++++++++++-- bin/next_rails | 17 +++++++++++++++-- 6 files changed, 90 insertions(+), 12 deletions(-) diff --git a/bin/bundle_report b/bin/bundle_report index fe90037464..7ee740b736 100755 --- a/bin/bundle_report +++ b/bin/bundle_report @@ -8,7 +8,20 @@ # this file is here to facilitate running it. # -$:.unshift File.expand_path "..", __dir__ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" require "bundler/setup" -load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/bundle_report", __dir__ + +load Gem.bin_path("next_rails", "bundle_report") diff --git a/bin/deprecations b/bin/deprecations index 49b9a7e5fe..f08ff574b9 100755 --- a/bin/deprecations +++ b/bin/deprecations @@ -8,7 +8,20 @@ # this file is here to facilitate running it. # -$:.unshift File.expand_path "..", __dir__ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" require "bundler/setup" -load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/deprecations", __dir__ + +load Gem.bin_path("next_rails", "deprecations") diff --git a/bin/gem-next-diff b/bin/gem-next-diff index 0c2e10e1e9..b437f25446 100755 --- a/bin/gem-next-diff +++ b/bin/gem-next-diff @@ -8,7 +8,20 @@ # this file is here to facilitate running it. # -$:.unshift File.expand_path "..", __dir__ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" require "bundler/setup" -load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/gem-next-diff", __dir__ + +load Gem.bin_path("next_rails", "gem-next-diff") diff --git a/bin/next b/bin/next index 4e280078dd..ed2edd0eec 100755 --- a/bin/next +++ b/bin/next @@ -8,7 +8,20 @@ # this file is here to facilitate running it. # -$:.unshift File.expand_path "..", __dir__ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" require "bundler/setup" -load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/next", __dir__ + +load Gem.bin_path("next_rails", "next") diff --git a/bin/next.sh b/bin/next.sh index 821f0ab224..059c7e06d7 100755 --- a/bin/next.sh +++ b/bin/next.sh @@ -8,7 +8,20 @@ # this file is here to facilitate running it. # -$:.unshift File.expand_path "..", __dir__ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" require "bundler/setup" -load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/next.sh", __dir__ + +load Gem.bin_path("next_rails", "next.sh") diff --git a/bin/next_rails b/bin/next_rails index b4d154ed3c..2caf44cf8c 100755 --- a/bin/next_rails +++ b/bin/next_rails @@ -8,7 +8,20 @@ # this file is here to facilitate running it. # -$:.unshift File.expand_path "..", __dir__ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" require "bundler/setup" -load File.expand_path "../../../../../.anyenv/envs/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/next_rails-1.3.0/exe/next_rails", __dir__ + +load Gem.bin_path("next_rails", "next_rails") From 1f8030d1887dc42440bf7bb978f9f395b422c583 Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 10:13:51 +0900 Subject: [PATCH 28/36] run: git cococo bundle exec next --init --- Gemfile | 3 + Gemfile.next | 1 + Gemfile.next.lock | 343 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 347 insertions(+) create mode 120000 Gemfile.next create mode 100644 Gemfile.next.lock diff --git a/Gemfile b/Gemfile index 12159b159c..9efc7ed01e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,6 @@ +def next? + File.basename(__FILE__) == "Gemfile.next" +end source 'https://rubygems.org' ruby '>= 2.7.0', '< 3.3.0' diff --git a/Gemfile.next b/Gemfile.next new file mode 120000 index 0000000000..6ab79009c0 --- /dev/null +++ b/Gemfile.next @@ -0,0 +1 @@ +Gemfile \ No newline at end of file diff --git a/Gemfile.next.lock b/Gemfile.next.lock new file mode 100644 index 0000000000..e038dffe6e --- /dev/null +++ b/Gemfile.next.lock @@ -0,0 +1,343 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (6.1.7.3) + actionpack (= 6.1.7.3) + activesupport (= 6.1.7.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (6.1.7.3) + actionpack (= 6.1.7.3) + activejob (= 6.1.7.3) + activerecord (= 6.1.7.3) + activestorage (= 6.1.7.3) + activesupport (= 6.1.7.3) + mail (>= 2.7.1) + actionmailer (6.1.7.3) + actionpack (= 6.1.7.3) + actionview (= 6.1.7.3) + activejob (= 6.1.7.3) + activesupport (= 6.1.7.3) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (6.1.7.3) + actionview (= 6.1.7.3) + activesupport (= 6.1.7.3) + rack (~> 2.0, >= 2.0.9) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actionpack-xml_parser (2.0.1) + actionpack (>= 5.0) + railties (>= 5.0) + actiontext (6.1.7.3) + actionpack (= 6.1.7.3) + activerecord (= 6.1.7.3) + activestorage (= 6.1.7.3) + activesupport (= 6.1.7.3) + nokogiri (>= 1.8.5) + actionview (6.1.7.3) + activesupport (= 6.1.7.3) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.7.3) + activesupport (= 6.1.7.3) + globalid (>= 0.3.6) + activemodel (6.1.7.3) + activesupport (= 6.1.7.3) + activerecord (6.1.7.3) + activemodel (= 6.1.7.3) + activesupport (= 6.1.7.3) + activestorage (6.1.7.3) + actionpack (= 6.1.7.3) + activejob (= 6.1.7.3) + activerecord (= 6.1.7.3) + activesupport (= 6.1.7.3) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (6.1.7.3) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + addressable (2.8.4) + public_suffix (>= 2.0.2, < 6.0) + ast (2.4.2) + builder (3.2.4) + byebug (11.1.3) + capybara (3.38.0) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + childprocess (3.0.0) + chunky_png (1.4.0) + coderay (1.1.3) + colorize (1.1.0) + commonmarker (0.23.9) + concurrent-ruby (1.2.2) + crass (1.0.6) + css_parser (1.14.0) + addressable + csv (3.2.7) + date (3.3.3) + deckar01-task_list (2.3.2) + html-pipeline + docile (1.4.0) + erubi (1.12.0) + ffi (1.15.5) + formatador (1.1.0) + globalid (1.1.0) + activesupport (>= 5.0) + guard (2.18.0) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (>= 1.0.12, < 2.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.13.0) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-minitest (2.4.6) + guard-compat (~> 1.2) + minitest (>= 3.0) + html-pipeline (2.13.2) + activesupport (>= 2) + nokogiri (>= 1.4) + htmlentities (4.3.4) + i18n (1.13.0) + concurrent-ruby (~> 1.0) + json (2.6.3) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + loofah (2.21.3) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + lumberjack (1.2.8) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + matrix (0.4.2) + method_source (1.0.0) + mini_magick (4.12.0) + mini_mime (1.1.2) + minitest (5.18.1) + mocha (2.0.4) + ruby2_keywords (>= 0.0.5) + nenv (0.3.0) + net-imap (0.3.6) + date + net-protocol + net-ldap (0.17.1) + net-pop (0.1.2) + net-protocol + net-protocol (0.2.1) + timeout + net-smtp (0.3.3) + net-protocol + next_rails (1.3.0) + colorize (>= 0.8.1) + nio4r (2.5.9) + nokogiri (1.14.5-x86_64-linux) + racc (~> 1.4) + notiffany (0.1.3) + nenv (~> 0.1) + shellany (~> 0.0) + parallel (1.23.0) + parser (3.2.2.3) + ast (~> 2.4.1) + racc + pg (1.4.6) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.10.1) + byebug (~> 11.0) + pry (>= 0.13, < 0.15) + public_suffix (5.0.1) + puma (6.3.0) + nio4r (~> 2.0) + racc (1.7.1) + rack (2.2.7) + rack-test (2.1.0) + rack (>= 1.3) + rails (6.1.7.3) + actioncable (= 6.1.7.3) + actionmailbox (= 6.1.7.3) + actionmailer (= 6.1.7.3) + actionpack (= 6.1.7.3) + actiontext (= 6.1.7.3) + actionview (= 6.1.7.3) + activejob (= 6.1.7.3) + activemodel (= 6.1.7.3) + activerecord (= 6.1.7.3) + activestorage (= 6.1.7.3) + activesupport (= 6.1.7.3) + bundler (>= 1.15.0) + railties (= 6.1.7.3) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (6.1.7.3) + actionpack (= 6.1.7.3) + activesupport (= 6.1.7.3) + method_source + rake (>= 12.2) + thor (~> 1.0) + rainbow (3.1.1) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rbpdf (1.21.2) + htmlentities + rbpdf-font (~> 1.19.0) + rbpdf-font (1.19.1) + redcarpet (3.6.0) + regexp_parser (2.8.1) + request_store (1.5.1) + rack (>= 1.4) + rexml (3.2.5) + roadie (5.1.0) + css_parser (~> 1.4) + nokogiri (~> 1.8) + roadie-rails (3.0.0) + railties (>= 5.1, < 7.1) + roadie (~> 5.0) + rotp (6.2.2) + rouge (4.1.2) + rqrcode (2.2.0) + chunky_png (~> 1.0) + rqrcode_core (~> 1.0) + rqrcode_core (1.2.0) + rubocop (1.51.0) + json (~> 2.3) + parallel (~> 1.10) + parser (>= 3.2.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.29.0) + parser (>= 3.2.1.0) + rubocop-performance (1.17.1) + rubocop (>= 1.7.0, < 2.0) + rubocop-ast (>= 0.4.0) + rubocop-rails (2.19.1) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + sanitize (6.0.1) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + selenium-webdriver (3.142.7) + childprocess (>= 0.5, < 4.0) + rubyzip (>= 1.2.2) + shellany (0.0.1) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + sprockets (4.2.0) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + thor (1.2.2) + timeout (0.4.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.4.2) + webdrivers (4.6.1) + nokogiri (~> 1.6) + rubyzip (>= 1.3.0) + selenium-webdriver (>= 3.0, < 4.0) + websocket-driver (0.7.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + yard (0.9.34) + zeitwerk (2.6.8) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + actionpack-xml_parser + addressable + capybara (~> 3.38.0) + commonmarker (~> 0.23.8) + csv (~> 3.2.6) + deckar01-task_list (= 2.3.2) + ffi + guard + guard-minitest + html-pipeline (~> 2.13.2) + i18n (~> 1.13.0) + listen (~> 3.3) + mail (~> 2.8.1) + marcel + mini_magick (~> 4.12.0) + mini_mime (~> 1.1.0) + mocha (>= 1.4.0) + net-imap (~> 0.3.4) + net-ldap (~> 0.17.0) + net-pop (~> 0.1.2) + net-smtp (~> 0.3.3) + next_rails + nokogiri (~> 1.14.0) + pg (~> 1.4.2) + pry-byebug + puma + rails (= 6.1.7.3) + rails-dom-testing + rbpdf (~> 1.21.1) + redcarpet (~> 3.6.0) + request_store (~> 1.5.0) + rexml + roadie-rails (~> 3.0.0) + rotp (>= 5.0.0) + rouge (~> 4.1.0) + rqrcode + rubocop (~> 1.51.0) + rubocop-performance (~> 1.17.1) + rubocop-rails (~> 2.19.1) + rubyzip (~> 2.3.0) + sanitize (~> 6.0) + selenium-webdriver (~> 3.142.7) + simplecov (~> 0.22.0) + tzinfo-data + webdrivers (= 4.6.1) + yard + +RUBY VERSION + ruby 3.2.2p53 + +BUNDLED WITH + 2.4.14 From bd3aa766bceb86d3ac9298775f5cd367a0adbff3 Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 10:26:27 +0900 Subject: [PATCH 29/36] run: git cococo sh -c 'rm Gemfile.next && cp -a Gemfile Gemfile.next' --- Gemfile.next | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 127 insertions(+), 1 deletion(-) mode change 120000 => 100644 Gemfile.next diff --git a/Gemfile.next b/Gemfile.next deleted file mode 120000 index 6ab79009c0..0000000000 --- a/Gemfile.next +++ /dev/null @@ -1 +0,0 @@ -Gemfile \ No newline at end of file diff --git a/Gemfile.next b/Gemfile.next new file mode 100644 index 0000000000..107cf4f940 --- /dev/null +++ b/Gemfile.next @@ -0,0 +1,127 @@ +def next? + File.basename(__FILE__) == "Gemfile.next" +end +source 'https://rubygems.org' + +ruby '>= 2.7.0', '< 3.3.0' + +gem 'rails', '6.1.7.3' +gem 'next_rails' +gem 'rouge', '~> 4.1.0' +gem 'request_store', '~> 1.5.0' +gem 'mini_mime', '~> 1.1.0' +gem "actionpack-xml_parser" +gem 'roadie-rails', '~> 3.0.0' +gem 'marcel' +gem 'mail', '~> 2.8.1' +gem 'nokogiri', '~> 1.14.0' +gem 'i18n', '~> 1.13.0' +gem 'rbpdf', '~> 1.21.1' +gem 'addressable' +gem 'rubyzip', '~> 2.3.0' + +# Ruby Standard Gems +gem 'csv', '~> 3.2.6' +gem 'net-imap', '~> 0.3.4' +gem 'net-pop', '~> 0.1.2' +gem 'net-smtp', '~> 0.3.3' +gem 'rexml', require: false if Gem.ruby_version >= Gem::Version.new('3.0') + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin] + +# TOTP-based 2-factor authentication +gem 'rotp', '>= 5.0.0' +gem 'rqrcode' + +# HTML pipeline and sanitization +gem "html-pipeline", "~> 2.13.2" +gem "sanitize", "~> 6.0" + +# Optional gem for LDAP authentication +group :ldap do + gem 'net-ldap', '~> 0.17.0' +end + +# Optional gem for exporting the gantt to a PNG file +group :minimagick do + gem 'mini_magick', '~> 4.12.0' +end + +# Optional Markdown support +group :markdown do + gem 'redcarpet', '~> 3.6.0' +end + +# Optional CommonMark support, not for JRuby +group :common_mark do + gem "commonmarker", '~> 0.23.8' + gem 'deckar01-task_list', '2.3.2' +end + +# Include database gems for the adapters found in the database +# configuration file +require 'erb' +require 'yaml' +database_file = File.join(File.dirname(__FILE__), "config/database.yml") +if File.exist?(database_file) + yaml_config = ERB.new(IO.read(database_file)).result + database_config = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(yaml_config) : YAML.load(yaml_config) + adapters = database_config.values.filter_map {|c| c['adapter']}.uniq + if adapters.any? + adapters.each do |adapter| + case adapter + when 'mysql2' + gem "mysql2", "~> 0.5.0", :platforms => [:mri, :mingw, :x64_mingw] + when /postgresql/ + gem "pg", "~> 1.4.2", :platforms => [:mri, :mingw, :x64_mingw] + when /sqlite3/ + gem 'sqlite3', '~> 1.6.0', :platforms => [:mri, :mingw, :x64_mingw] + when /sqlserver/ + gem "tiny_tds", "~> 2.1.2", :platforms => [:mri, :mingw, :x64_mingw] + gem "activerecord-sqlserver-adapter", "~> 6.1.0", :platforms => [:mri, :mingw, :x64_mingw] + else + warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems") + end + end + else + warn("No adapter found in config/database.yml, please configure it first") + end +else + warn("Please configure your config/database.yml first") +end + +group :development do + gem 'listen', '~> 3.3' + gem "yard" + gem "guard" + gem "guard-minitest" + gem "pry", "<= 0.12.2" if RUBY_VERSION < '2.4' + gem "pry-byebug" +end + +group :test do + gem "rails-dom-testing" + gem 'mocha', '>= 1.4.0' + gem 'simplecov', '~> 0.22.0', :require => false + gem "ffi", platforms: [:mingw, :x64_mingw, :mswin] + # For running system tests + gem 'puma' + gem 'capybara', '~> 3.38.0' + gem "selenium-webdriver", "~> 3.142.7" + gem 'webdrivers', '4.6.1', require: false + # RuboCop + gem 'rubocop', '~> 1.51.0', require: false + gem 'rubocop-performance', '~> 1.17.1', require: false + gem 'rubocop-rails', '~> 2.19.1', require: false +end + +local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") +if File.exist?(local_gemfile) + eval_gemfile local_gemfile +end + +# Load plugins' Gemfiles +Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file| + eval_gemfile file +end From a333fa721d5ad9595d601f1c628fbfe3b036853d Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 10:39:53 +0900 Subject: [PATCH 30/36] =?UTF-8?q?feat:=20rails.gem=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile.next | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.next b/Gemfile.next index 107cf4f940..712f56612c 100644 --- a/Gemfile.next +++ b/Gemfile.next @@ -5,7 +5,7 @@ source 'https://rubygems.org' ruby '>= 2.7.0', '< 3.3.0' -gem 'rails', '6.1.7.3' +gem 'rails', '7.0.6' gem 'next_rails' gem 'rouge', '~> 4.1.0' gem 'request_store', '~> 1.5.0' From cf5a434469e9013cde34589e7652327cefa794f4 Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 10:50:56 +0900 Subject: [PATCH 31/36] run: git cococo bundle binstubs bundler --force --- bin/bundle | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) diff --git a/bin/bundle b/bin/bundle index a169c9da9d..42c7fd7c5c 100755 --- a/bin/bundle +++ b/bin/bundle @@ -1,4 +1,109 @@ #!/usr/bin/env ruby +# frozen_string_literal: true -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -load Gem.bin_path('bundler', 'bundle') +# +# This file was generated by Bundler. +# +# The application 'bundle' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "rubygems" + +m = Module.new do + module_function + + def invoked_as_script? + File.expand_path($0) == File.expand_path(__FILE__) + end + + def env_var_version + ENV["BUNDLER_VERSION"] + end + + def cli_arg_version + return unless invoked_as_script? # don't want to hijack other binstubs + return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` + bundler_version = nil + update_index = nil + ARGV.each_with_index do |a, i| + if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN + bundler_version = a + end + next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ + bundler_version = $1 + update_index = i + end + bundler_version + end + + def gemfile + gemfile = ENV["BUNDLE_GEMFILE"] + return gemfile if gemfile && !gemfile.empty? + + File.expand_path("../Gemfile", __dir__) + end + + def lockfile + lockfile = + case File.basename(gemfile) + when "gems.rb" then gemfile.sub(/\.rb$/, ".locked") + else "#{gemfile}.lock" + end + File.expand_path(lockfile) + end + + def lockfile_version + return unless File.file?(lockfile) + lockfile_contents = File.read(lockfile) + return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ + Regexp.last_match(1) + end + + def bundler_requirement + @bundler_requirement ||= + env_var_version || + cli_arg_version || + bundler_requirement_for(lockfile_version) + end + + def bundler_requirement_for(version) + return "#{Gem::Requirement.default}.a" unless version + + bundler_gem_version = Gem::Version.new(version) + + bundler_gem_version.approximate_recommendation + end + + def load_bundler! + ENV["BUNDLE_GEMFILE"] ||= gemfile + + activate_bundler + end + + def activate_bundler + gem_error = activation_error_handling do + gem "bundler", bundler_requirement + end + return if gem_error.nil? + require_error = activation_error_handling do + require "bundler/version" + end + return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) + warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" + exit 42 + end + + def activation_error_handling + yield + nil + rescue StandardError, LoadError => e + e + end +end + +m.load_bundler! + +if m.invoked_as_script? + load Gem.bin_path("bundler", "bundle") +end From 22d4547729f2ebadfb1618bb0fc13e29fcfe20a2 Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 11:01:18 +0900 Subject: [PATCH 32/36] Revert "run: git cococo bundle binstubs next_rails" This reverts commit 33e41db01c4446a8607b59d2f2097b06b57ca34d. --- bin/bundle_report | 27 --------------------------- bin/deprecations | 27 --------------------------- bin/gem-next-diff | 27 --------------------------- bin/next | 27 --------------------------- bin/next.sh | 27 --------------------------- bin/next_rails | 27 --------------------------- 6 files changed, 162 deletions(-) delete mode 100755 bin/bundle_report delete mode 100755 bin/deprecations delete mode 100755 bin/gem-next-diff delete mode 100755 bin/next delete mode 100755 bin/next.sh delete mode 100755 bin/next_rails diff --git a/bin/bundle_report b/bin/bundle_report deleted file mode 100755 index 7ee740b736..0000000000 --- a/bin/bundle_report +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'bundle_report' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("next_rails", "bundle_report") diff --git a/bin/deprecations b/bin/deprecations deleted file mode 100755 index f08ff574b9..0000000000 --- a/bin/deprecations +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'deprecations' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("next_rails", "deprecations") diff --git a/bin/gem-next-diff b/bin/gem-next-diff deleted file mode 100755 index b437f25446..0000000000 --- a/bin/gem-next-diff +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'gem-next-diff' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("next_rails", "gem-next-diff") diff --git a/bin/next b/bin/next deleted file mode 100755 index ed2edd0eec..0000000000 --- a/bin/next +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'next' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("next_rails", "next") diff --git a/bin/next.sh b/bin/next.sh deleted file mode 100755 index 059c7e06d7..0000000000 --- a/bin/next.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'next.sh' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("next_rails", "next.sh") diff --git a/bin/next_rails b/bin/next_rails deleted file mode 100755 index 2caf44cf8c..0000000000 --- a/bin/next_rails +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'next_rails' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("next_rails", "next_rails") From 08a44776cba6c5ce46c6e3987d12e3a5a01ba78e Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 11:01:51 +0900 Subject: [PATCH 33/36] run: git cococo next bundle update --- Gemfile.next.lock | 127 +++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 64 deletions(-) diff --git a/Gemfile.next.lock b/Gemfile.next.lock index e038dffe6e..9a9096ecb8 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -1,68 +1,74 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) + actioncable (7.0.6) + actionpack (= 7.0.6) + activesupport (= 7.0.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + actionmailbox (7.0.6) + actionpack (= 7.0.6) + activejob (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) mail (>= 2.7.1) - actionmailer (6.1.7.3) - actionpack (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activesupport (= 6.1.7.3) + net-imap + net-pop + net-smtp + actionmailer (7.0.6) + actionpack (= 7.0.6) + actionview (= 7.0.6) + activejob (= 7.0.6) + activesupport (= 7.0.6) mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp rails-dom-testing (~> 2.0) - actionpack (6.1.7.3) - actionview (= 6.1.7.3) - activesupport (= 6.1.7.3) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.6) + actionview (= 7.0.6) + activesupport (= 7.0.6) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) actionpack-xml_parser (2.0.1) actionpack (>= 5.0) railties (>= 5.0) - actiontext (6.1.7.3) - actionpack (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + actiontext (7.0.6) + actionpack (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.7.3) - activesupport (= 6.1.7.3) + actionview (7.0.6) + activesupport (= 7.0.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.7.3) - activesupport (= 6.1.7.3) + activejob (7.0.6) + activesupport (= 7.0.6) globalid (>= 0.3.6) - activemodel (6.1.7.3) - activesupport (= 6.1.7.3) - activerecord (6.1.7.3) - activemodel (= 6.1.7.3) - activesupport (= 6.1.7.3) - activestorage (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activesupport (= 6.1.7.3) + activemodel (7.0.6) + activesupport (= 7.0.6) + activerecord (7.0.6) + activemodel (= 7.0.6) + activesupport (= 7.0.6) + activestorage (7.0.6) + actionpack (= 7.0.6) + activejob (= 7.0.6) + activerecord (= 7.0.6) + activesupport (= 7.0.6) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7.3) + activesupport (7.0.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) @@ -173,33 +179,33 @@ GEM rack (2.2.7) rack-test (2.1.0) rack (>= 1.3) - rails (6.1.7.3) - actioncable (= 6.1.7.3) - actionmailbox (= 6.1.7.3) - actionmailer (= 6.1.7.3) - actionpack (= 6.1.7.3) - actiontext (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activemodel (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + rails (7.0.6) + actioncable (= 7.0.6) + actionmailbox (= 7.0.6) + actionmailer (= 7.0.6) + actionpack (= 7.0.6) + actiontext (= 7.0.6) + actionview (= 7.0.6) + activejob (= 7.0.6) + activemodel (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) bundler (>= 1.15.0) - railties (= 6.1.7.3) - sprockets-rails (>= 2.0.0) + railties (= 7.0.6) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) + railties (7.0.6) + actionpack (= 7.0.6) + activesupport (= 7.0.6) method_source rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) rb-fsevent (0.11.2) @@ -261,13 +267,6 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sprockets (4.2.0) - concurrent-ruby (~> 1.0) - rack (>= 2.2.4, < 4) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - sprockets (>= 3.0.0) thor (1.2.2) timeout (0.4.0) tzinfo (2.0.6) @@ -315,7 +314,7 @@ DEPENDENCIES pg (~> 1.4.2) pry-byebug puma - rails (= 6.1.7.3) + rails (= 7.0.6) rails-dom-testing rbpdf (~> 1.21.1) redcarpet (~> 3.6.0) From c8c51aae0d3a8e3ddcfc68d3b1ae1b3b42c4347d Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 11:06:01 +0900 Subject: [PATCH 34/36] Revert "run: git cococo next bundle update" This reverts commit a40693522ead281e561f657aac6abd1d53238fd8. --- Gemfile.next.lock | 127 +++++++++++++++++++++++----------------------- 1 file changed, 64 insertions(+), 63 deletions(-) diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 9a9096ecb8..e038dffe6e 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -1,74 +1,68 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.0.6) - actionpack (= 7.0.6) - activesupport (= 7.0.6) + actioncable (6.1.7.3) + actionpack (= 6.1.7.3) + activesupport (= 6.1.7.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.6) - actionpack (= 7.0.6) - activejob (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + actionmailbox (6.1.7.3) + actionpack (= 6.1.7.3) + activejob (= 6.1.7.3) + activerecord (= 6.1.7.3) + activestorage (= 6.1.7.3) + activesupport (= 6.1.7.3) mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.0.6) - actionpack (= 7.0.6) - actionview (= 7.0.6) - activejob (= 7.0.6) - activesupport (= 7.0.6) + actionmailer (6.1.7.3) + actionpack (= 6.1.7.3) + actionview (= 6.1.7.3) + activejob (= 6.1.7.3) + activesupport (= 6.1.7.3) mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.6) - actionview (= 7.0.6) - activesupport (= 7.0.6) - rack (~> 2.0, >= 2.2.4) + actionpack (6.1.7.3) + actionview (= 6.1.7.3) + activesupport (= 6.1.7.3) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) actionpack-xml_parser (2.0.1) actionpack (>= 5.0) railties (>= 5.0) - actiontext (7.0.6) - actionpack (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) - globalid (>= 0.6.0) + actiontext (6.1.7.3) + actionpack (= 6.1.7.3) + activerecord (= 6.1.7.3) + activestorage (= 6.1.7.3) + activesupport (= 6.1.7.3) nokogiri (>= 1.8.5) - actionview (7.0.6) - activesupport (= 7.0.6) + actionview (6.1.7.3) + activesupport (= 6.1.7.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.6) - activesupport (= 7.0.6) + activejob (6.1.7.3) + activesupport (= 6.1.7.3) globalid (>= 0.3.6) - activemodel (7.0.6) - activesupport (= 7.0.6) - activerecord (7.0.6) - activemodel (= 7.0.6) - activesupport (= 7.0.6) - activestorage (7.0.6) - actionpack (= 7.0.6) - activejob (= 7.0.6) - activerecord (= 7.0.6) - activesupport (= 7.0.6) + activemodel (6.1.7.3) + activesupport (= 6.1.7.3) + activerecord (6.1.7.3) + activemodel (= 6.1.7.3) + activesupport (= 6.1.7.3) + activestorage (6.1.7.3) + actionpack (= 6.1.7.3) + activejob (= 6.1.7.3) + activerecord (= 6.1.7.3) + activesupport (= 6.1.7.3) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.6) + activesupport (6.1.7.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) @@ -179,33 +173,33 @@ GEM rack (2.2.7) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.6) - actioncable (= 7.0.6) - actionmailbox (= 7.0.6) - actionmailer (= 7.0.6) - actionpack (= 7.0.6) - actiontext (= 7.0.6) - actionview (= 7.0.6) - activejob (= 7.0.6) - activemodel (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + rails (6.1.7.3) + actioncable (= 6.1.7.3) + actionmailbox (= 6.1.7.3) + actionmailer (= 6.1.7.3) + actionpack (= 6.1.7.3) + actiontext (= 6.1.7.3) + actionview (= 6.1.7.3) + activejob (= 6.1.7.3) + activemodel (= 6.1.7.3) + activerecord (= 6.1.7.3) + activestorage (= 6.1.7.3) + activesupport (= 6.1.7.3) bundler (>= 1.15.0) - railties (= 7.0.6) + railties (= 6.1.7.3) + sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.6) - actionpack (= 7.0.6) - activesupport (= 7.0.6) + railties (6.1.7.3) + actionpack (= 6.1.7.3) + activesupport (= 6.1.7.3) method_source rake (>= 12.2) thor (~> 1.0) - zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) rb-fsevent (0.11.2) @@ -267,6 +261,13 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + sprockets (4.2.0) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) thor (1.2.2) timeout (0.4.0) tzinfo (2.0.6) @@ -314,7 +315,7 @@ DEPENDENCIES pg (~> 1.4.2) pry-byebug puma - rails (= 7.0.6) + rails (= 6.1.7.3) rails-dom-testing rbpdf (~> 1.21.1) redcarpet (~> 3.6.0) From b145d6eb5a69cafc288607cabdb0ef50c9c20034 Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 11:06:17 +0900 Subject: [PATCH 35/36] run: git cococo bundle exec next bundle update --- Gemfile.next.lock | 127 +++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 64 deletions(-) diff --git a/Gemfile.next.lock b/Gemfile.next.lock index e038dffe6e..9a9096ecb8 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -1,68 +1,74 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) + actioncable (7.0.6) + actionpack (= 7.0.6) + activesupport (= 7.0.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + actionmailbox (7.0.6) + actionpack (= 7.0.6) + activejob (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) mail (>= 2.7.1) - actionmailer (6.1.7.3) - actionpack (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activesupport (= 6.1.7.3) + net-imap + net-pop + net-smtp + actionmailer (7.0.6) + actionpack (= 7.0.6) + actionview (= 7.0.6) + activejob (= 7.0.6) + activesupport (= 7.0.6) mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp rails-dom-testing (~> 2.0) - actionpack (6.1.7.3) - actionview (= 6.1.7.3) - activesupport (= 6.1.7.3) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.6) + actionview (= 7.0.6) + activesupport (= 7.0.6) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) actionpack-xml_parser (2.0.1) actionpack (>= 5.0) railties (>= 5.0) - actiontext (6.1.7.3) - actionpack (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + actiontext (7.0.6) + actionpack (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.7.3) - activesupport (= 6.1.7.3) + actionview (7.0.6) + activesupport (= 7.0.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.7.3) - activesupport (= 6.1.7.3) + activejob (7.0.6) + activesupport (= 7.0.6) globalid (>= 0.3.6) - activemodel (6.1.7.3) - activesupport (= 6.1.7.3) - activerecord (6.1.7.3) - activemodel (= 6.1.7.3) - activesupport (= 6.1.7.3) - activestorage (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activesupport (= 6.1.7.3) + activemodel (7.0.6) + activesupport (= 7.0.6) + activerecord (7.0.6) + activemodel (= 7.0.6) + activesupport (= 7.0.6) + activestorage (7.0.6) + actionpack (= 7.0.6) + activejob (= 7.0.6) + activerecord (= 7.0.6) + activesupport (= 7.0.6) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7.3) + activesupport (7.0.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) @@ -173,33 +179,33 @@ GEM rack (2.2.7) rack-test (2.1.0) rack (>= 1.3) - rails (6.1.7.3) - actioncable (= 6.1.7.3) - actionmailbox (= 6.1.7.3) - actionmailer (= 6.1.7.3) - actionpack (= 6.1.7.3) - actiontext (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activemodel (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + rails (7.0.6) + actioncable (= 7.0.6) + actionmailbox (= 7.0.6) + actionmailer (= 7.0.6) + actionpack (= 7.0.6) + actiontext (= 7.0.6) + actionview (= 7.0.6) + activejob (= 7.0.6) + activemodel (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) bundler (>= 1.15.0) - railties (= 6.1.7.3) - sprockets-rails (>= 2.0.0) + railties (= 7.0.6) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) + railties (7.0.6) + actionpack (= 7.0.6) + activesupport (= 7.0.6) method_source rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) rb-fsevent (0.11.2) @@ -261,13 +267,6 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sprockets (4.2.0) - concurrent-ruby (~> 1.0) - rack (>= 2.2.4, < 4) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - sprockets (>= 3.0.0) thor (1.2.2) timeout (0.4.0) tzinfo (2.0.6) @@ -315,7 +314,7 @@ DEPENDENCIES pg (~> 1.4.2) pry-byebug puma - rails (= 6.1.7.3) + rails (= 7.0.6) rails-dom-testing rbpdf (~> 1.21.1) redcarpet (~> 3.6.0) From c2b952001bfc2bec68128819b384d9d736e0d6e8 Mon Sep 17 00:00:00 2001 From: "Yuya.Nishida" Date: Fri, 30 Jun 2023 16:27:40 +0900 Subject: [PATCH 36/36] =?UTF-8?q?fix:=20NameError=E5=9B=9E=E9=81=BF=20?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C=E6=96=B9=E6=B3=95=E3=81=8C=E8=89=AF=E3=81=84?= =?UTF-8?q?=E3=81=8B=E3=81=A9=E3=81=86=E3=81=8B=E3=81=AF=E8=AA=BF=E3=81=B9?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/initializers/10-patches.rb | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index 4bca5edf4e..0ac3e85edd 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -48,19 +48,20 @@ def distance_of_date_in_words(from_date, to_date = 0, options = {}) end end - class Resolver - def find_all(name, prefix=nil, partial=false, details={}, key=nil, locals=[]) - locals = locals.map(&:to_s).sort!.freeze - - cached(key, [name, prefix, partial], details, locals) do - if (details[:formats] & [:xml, :json]).any? - details = details.dup - details[:formats] = details[:formats].dup + [:api] - end - _find_all(name, prefix, partial, details, key, locals) - end - end - end + # TODO: + #class Resolver + # def find_all(name, prefix=nil, partial=false, details={}, key=nil, locals=[]) + # locals = locals.map(&:to_s).sort!.freeze + # + # cached(key, [name, prefix, partial], details, locals) do + # if (details[:formats] & [:xml, :json]).any? + # details = details.dup + # details[:formats] = details[:formats].dup + [:api] + # end + # _find_all(name, prefix, partial, details, key, locals) + # end + # end + #end end ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| html_tag || ''.html_safe }