From d2ea089a6428fbcab5480d510061bda1e0a98800 Mon Sep 17 00:00:00 2001 From: ocha Date: Thu, 7 Jan 2021 23:13:49 +0900 Subject: [PATCH 1/4] =?UTF-8?q?config/initializers/ar=5Finnodb=5Frow=5Ffor?= =?UTF-8?q?mat.rb=20=E3=82=92=E5=89=8A=E9=99=A4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #237 https://github.com/rails/rails/pull/34742 で不要になった。 --- config/initializers/ar_innodb_row_format.rb | 32 --------------------- 1 file changed, 32 deletions(-) delete mode 100644 config/initializers/ar_innodb_row_format.rb diff --git a/config/initializers/ar_innodb_row_format.rb b/config/initializers/ar_innodb_row_format.rb deleted file mode 100644 index 4717c9b7..00000000 --- a/config/initializers/ar_innodb_row_format.rb +++ /dev/null @@ -1,32 +0,0 @@ -# create_table メソッドで 'ROW_FORMAT=DYNAMIC' が -# デフォルトで指定されるようにする -# @see http://qiita.com/kamipo/items/101aaf8159cf1470d823 -# -# Rails5 では alias_method_chain が非推奨になったため変更 -# @see https://qiita.com/horipori/items/3b1965abcd0d61f1108c -ActiveSupport.on_load :active_record do - module ActiveRecord::ConnectionAdapters - module CreateTableWithInnodbRowFormat - ROW_FORMAT_DYNAMIC = 'ROW_FORMAT=DYNAMIC'.freeze - - def create_table(table_name, options = {}) - old_options = options[:options] - new_options = - if old_options - "#{old_options} #{ROW_FORMAT_DYNAMIC}" - else - ROW_FORMAT_DYNAMIC - end - table_options = options.merge(options: new_options) - - super(table_name, table_options) do |td| - yield td if block_given? - end - end - end - - class AbstractMysqlAdapter - prepend CreateTableWithInnodbRowFormat - end - end -end From 9ef36c6ac9c24b4131c89ffd9ac7cdf5e09e839f Mon Sep 17 00:00:00 2001 From: ocha Date: Thu, 7 Jan 2021 23:45:07 +0900 Subject: [PATCH 2/4] =?UTF-8?q?sorcery=E3=81=AEmaster=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=81=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #238 Ruby 3からのハッシュ→キーワード引数自動変換の挙動変更に対応させる --- Gemfile | 5 ++++- Gemfile.lock | 16 +++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 1a085422..fa7375db 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,7 @@ source 'https://rubygems.org' +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + # IRC framework gem 'mcinch' gem 'lumberjack' @@ -73,7 +75,8 @@ gem 'friendly_id' gem 'simple_enum' # 認証 -gem 'sorcery' +# @todo https://github.com/Sorcery/sorcery/pull/241 が取り込まれたらmasterを指定しない +gem 'sorcery', github: 'Sorcery/sorcery', branch: 'master' # 並び替え gem 'ranked-model' diff --git a/Gemfile.lock b/Gemfile.lock index fe759eb7..da212035 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,13 @@ +GIT + remote: https://github.com/Sorcery/sorcery.git + revision: 443e614e3d2dfc9d7dd805c4a69f8e1c820c7e76 + branch: master + specs: + sorcery (0.15.0) + bcrypt (~> 3.1) + oauth (~> 0.4, >= 0.4.4) + oauth2 (~> 1.0, >= 0.8.0) + GIT remote: https://github.com/cre-ne-jp/rinku.git revision: 5da355a50ec64537a28f75b9cd76e9a0ad78616a @@ -296,10 +306,6 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - sorcery (0.15.0) - bcrypt (~> 3.1) - oauth (~> 0.4, >= 0.4.4) - oauth2 (~> 1.0, >= 0.8.0) spring (2.1.1) sprockets (4.0.2) concurrent-ruby (~> 1.0) @@ -375,7 +381,7 @@ DEPENDENCIES simple_calendar (~> 2.0) simple_enum simplecov (~> 0.10, < 0.18) - sorcery + sorcery! spring sysexits uglifier (>= 1.3) From 3f974850c7f42942912cfd49c0543bc3ccc625cb Mon Sep 17 00:00:00 2001 From: ocha Date: Thu, 7 Jan 2021 23:47:40 +0900 Subject: [PATCH 3/4] =?UTF-8?q?rinku:=20github=E3=82=AD=E3=83=BC=E3=83=AF?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=81=A7=E3=83=AA=E3=83=9D=E3=82=B8=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=82=92=E6=8C=87=E5=AE=9A=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index fa7375db..7eef28e0 100644 --- a/Gemfile +++ b/Gemfile @@ -63,7 +63,7 @@ gem 'redcarpet' # 自動リンク # スキーム付きのURLのみ有効にするために独自ブランチを使用する -gem 'rinku', git: 'https://github.com/cre-ne-jp/rinku.git', branch: 'without-www' +gem 'rinku', github: 'cre-ne-jp/rinku', branch: 'without-www' # ページネーション gem 'kaminari' From dbad1250e8add22ba9663c8e0b473222cd763eea Mon Sep 17 00:00:00 2001 From: ocha Date: Thu, 7 Jan 2021 23:59:03 +0900 Subject: [PATCH 4/4] =?UTF-8?q?AppStatus:=20version=5Fand=5Fcommit=5Fid?= =?UTF-8?q?=E3=82=92freeze=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #239 --- lib/log_archiver/app_status.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/log_archiver/app_status.rb b/lib/log_archiver/app_status.rb index c00ef491..91d83dee 100644 --- a/lib/log_archiver/app_status.rb +++ b/lib/log_archiver/app_status.rb @@ -69,8 +69,12 @@ def initialize(version, start_time, commit_id = '') @start_time = start_time.dup.freeze @commit_id = commit_id.dup.freeze - @version_and_commit_id = commit_id.empty? ? - version : "#{version} (#{commit_id})" + @version_and_commit_id = + if commit_id.empty? + version + else + "#{version} (#{commit_id})".freeze + end end # アプリケーションの状態を表すHashを返す