作業履歴 2025-06-07¶
概要¶
2025-06-07の作業内容をまとめています。このジャーナルでは、リポジトリのメンテナンス作業、特にバージョン管理設定の改善に関する作業を記録しています。
リポジトリ構成図¶
作業内容¶
リポジトリメンテナンス¶
プロジェクトのバージョン管理を改善するため、.gitignoreファイルの更新を行いました。特に、IDE(統合開発環境)固有の設定ファイルをリポジトリから除外することで、異なる開発環境間での競合を防ぎ、リポジトリをよりクリーンに保つことを目的としています。
変更点の概要¶
- .gitignoreファイルの更新
- IntelliJ IDEA関連ファイル(*.iml)の除外設定追加
-
.ideaディレクトリの除外設定追加
-
誤ってコミットされたIDEファイルの削除
- baukis-kai.imlファイルをリポジトリから削除
コミット: 3428919¶
メッセージ¶
chore:コミット管理対象外
変更されたファイル¶
- M .gitignore
- D baukis-kai.iml
変更内容¶
commit 342891950ccc982c76ff6607baa78bd01be127fe
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 22:29:08 2025 +0900
chore:コミット管理対象外
diff --git a/.gitignore b/.gitignore
index 05ce7cf..13a797c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -106,4 +106,6 @@ bower.json
# Ignore Byebug command history file.
.byebug_history
-public/assets/
\ No newline at end of file
+public/assets/
+*.iml
+.idea
\ No newline at end of file
diff --git a/baukis-kai.iml b/baukis-kai.iml
deleted file mode 100644
index fe5c0f2..0000000
--- a/baukis-kai.iml
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="RUBY_MODULE" version="4">
- <component name="FacetManager">
- <facet type="RailsFacetType" name="Ruby on Rails">
- <configuration>
- <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
- <RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
- <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
- </configuration>
- </facet>
- </component>
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
- <excludeFolder url="file://$MODULE_DIR$/.bundle" />
- <excludeFolder url="file://$MODULE_DIR$/components" />
- <excludeFolder url="file://$MODULE_DIR$/public/system" />
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
- </content>
- <orderEntry type="jdk" jdkName="rbenv: 2.4.0" jdkType="RUBY_SDK" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" scope="PROVIDED" name="actioncable (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="actionpack (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="actionview (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="activejob (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="activemodel (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="activerecord (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="activesupport (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="addressable (v2.5.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="annotate (v2.6.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="arel (v7.1.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="autoprefixer-rails (v6.6.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.11, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="better_errors (v2.1.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="binding_of_caller (v0.7.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="bootstrap-sass (v3.3.7, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="bootstrap3-datetimepicker-rails (v4.17.43, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="bootstrap_form (v2.5.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.13.7, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="byebug (v9.0.6, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="capybara (v2.12.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="capybara-screenshot (v1.0.14, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="capybara-webkit (v1.12.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="childprocess (v0.5.9, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="choice (v0.2.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.2.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.12.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="database_cleaner (v1.3.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="date_validator (v0.9.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="debase (v0.2.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="debase-ruby_core_source (v0.9.6, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="debug_inspector (v0.0.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="dotenv (v2.1.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="dotenv-rails (v2.1.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="em-websocket (v0.5.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="email_validator (v1.6.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="enum_help (v0.0.16, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="eventmachine (v1.2.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="factory_girl (v4.8.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="factory_girl_rails (v4.8.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="faker (v1.4.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.14, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="font-awesome-rails (v4.7.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="formatador (v0.2.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="globalid (v0.3.7, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="guard (v2.14.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="guard-compat (v1.2.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="guard-livereload (v2.5.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="http_parser.rb (v0.6.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="i18n (v0.7.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="i18n_generators (v2.1.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.6.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.2.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="jquery-ui-rails (v5.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="json (v2.0.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="kaminari (v0.17.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="launchy (v2.4.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="listen (v3.0.8, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="loofah (v2.0.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="lumberjack (v1.0.11, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="mail (v2.6.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="migration_comments (v0.4.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.1.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="momentjs-rails (v2.17.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.4.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="nenv (v0.3.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="nio4r (v1.2.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.7.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="notiffany (v0.1.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="pg (v0.19.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="pry (v0.10.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="public_suffix (v2.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="puma (v3.6.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rack (v2.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rack-dev-mark (v0.7.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rack-livereload (v0.3.16, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails-controller-testing (v1.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails-erd (v1.5.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails_12factor (v0.0.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails_serve_static_assets (v0.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails_stdout_logging (v0.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="railties (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rake (v12.0.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.8, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.7, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.5.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.5.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.5.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rspec-rails (v3.5.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.5.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="ruby-graphviz (v1.2.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rubyzip (v1.2.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="sass (v3.4.23, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="sass-rails (v5.0.6, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="selenium-webdriver (v3.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="shellany (v0.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="shoulda-matchers (v2.6.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="slop (v3.6.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="spring (v2.0.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="spring-commands-rspec (v1.0.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="spring-watcher-listen (v2.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.2.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="sqlite3 (v1.3.12, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="tag-it-rails (v2.0.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="thor (v0.19.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="turbolinks (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="turbolinks-source (v5.0.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="uglifier (v3.0.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="web-console (v3.4.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="websocket (v1.2.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.6.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="xpath (v2.0.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="yard (v0.9.7, rbenv: 2.4.0) [gem]" level="application" />
- </component>
- <component name="RModuleSettingsStorage">
- <LOAD_PATH number="0" />
- <I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
- </component>
-</module>
\ No newline at end of file
コミット: a0f057f¶
メッセージ¶
fix:単体テスト
変更されたファイル¶
- M app/controllers/staff/customers_controller.rb
- D baukis-kai.iml
変更内容¶
commit a0f057ffd463bed53ea2a5b1a2e5ce9c9c3279d3
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 22:26:21 2025 +0900
fix:単体テスト
diff --git a/app/controllers/staff/customers_controller.rb b/app/controllers/staff/customers_controller.rb
index 6342b22..2414e30 100644
--- a/app/controllers/staff/customers_controller.rb
+++ b/app/controllers/staff/customers_controller.rb
@@ -22,7 +22,7 @@ class Staff::CustomersController < Staff::Base
def create
@customer_form = Staff::CustomerForm.new
- @customer_form.assign_attributes(params[:form])
+ @customer_form.assign_attributes(params.require(:form))
if @customer_form.save
flash.notice = t('.flash_notice')
redirect_to action: 'index'
@@ -34,7 +34,7 @@ class Staff::CustomersController < Staff::Base
def update
@customer_form = Staff::CustomerForm.new(Customer.find(params[:id]))
- @customer_form.assign_attributes(params[:form])
+ @customer_form.assign_attributes(params.require(:form))
if @customer_form.save
flash.notice = t('.flash_notice')
redirect_to action: 'index'
diff --git a/baukis-kai.iml b/baukis-kai.iml
deleted file mode 100644
index fe5c0f2..0000000
--- a/baukis-kai.iml
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="RUBY_MODULE" version="4">
- <component name="FacetManager">
- <facet type="RailsFacetType" name="Ruby on Rails">
- <configuration>
- <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
- <RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
- <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
- </configuration>
- </facet>
- </component>
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
- <excludeFolder url="file://$MODULE_DIR$/.bundle" />
- <excludeFolder url="file://$MODULE_DIR$/components" />
- <excludeFolder url="file://$MODULE_DIR$/public/system" />
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
- </content>
- <orderEntry type="jdk" jdkName="rbenv: 2.4.0" jdkType="RUBY_SDK" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" scope="PROVIDED" name="actioncable (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="actionpack (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="actionview (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="activejob (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="activemodel (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="activerecord (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="activesupport (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="addressable (v2.5.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="annotate (v2.6.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="arel (v7.1.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="autoprefixer-rails (v6.6.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.11, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="better_errors (v2.1.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="binding_of_caller (v0.7.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="bootstrap-sass (v3.3.7, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="bootstrap3-datetimepicker-rails (v4.17.43, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="bootstrap_form (v2.5.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.13.7, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="byebug (v9.0.6, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="capybara (v2.12.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="capybara-screenshot (v1.0.14, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="capybara-webkit (v1.12.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="childprocess (v0.5.9, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="choice (v0.2.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.2.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.12.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="database_cleaner (v1.3.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="date_validator (v0.9.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="debase (v0.2.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="debase-ruby_core_source (v0.9.6, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="debug_inspector (v0.0.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="dotenv (v2.1.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="dotenv-rails (v2.1.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="em-websocket (v0.5.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="email_validator (v1.6.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="enum_help (v0.0.16, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="eventmachine (v1.2.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="factory_girl (v4.8.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="factory_girl_rails (v4.8.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="faker (v1.4.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.14, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="font-awesome-rails (v4.7.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="formatador (v0.2.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="globalid (v0.3.7, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="guard (v2.14.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="guard-compat (v1.2.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="guard-livereload (v2.5.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="http_parser.rb (v0.6.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="i18n (v0.7.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="i18n_generators (v2.1.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.6.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.2.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="jquery-ui-rails (v5.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="json (v2.0.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="kaminari (v0.17.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="launchy (v2.4.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="listen (v3.0.8, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="loofah (v2.0.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="lumberjack (v1.0.11, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="mail (v2.6.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="migration_comments (v0.4.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.1.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="momentjs-rails (v2.17.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.4.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="nenv (v0.3.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="nio4r (v1.2.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.7.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="notiffany (v0.1.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="pg (v0.19.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="pry (v0.10.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="public_suffix (v2.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="puma (v3.6.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rack (v2.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rack-dev-mark (v0.7.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rack-livereload (v0.3.16, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails-controller-testing (v1.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails-erd (v1.5.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails_12factor (v0.0.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails_serve_static_assets (v0.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rails_stdout_logging (v0.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="railties (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rake (v12.0.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.8, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.7, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.5.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.5.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.5.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rspec-rails (v3.5.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.5.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="ruby-graphviz (v1.2.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="rubyzip (v1.2.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="sass (v3.4.23, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="sass-rails (v5.0.6, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="selenium-webdriver (v3.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="shellany (v0.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="shoulda-matchers (v2.6.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="slop (v3.6.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="spring (v2.0.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="spring-commands-rspec (v1.0.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="spring-watcher-listen (v2.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.2.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="sqlite3 (v1.3.12, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="tag-it-rails (v2.0.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="thor (v0.19.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.5, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="turbolinks (v5.0.1, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="turbolinks-source (v5.0.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="uglifier (v3.0.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="web-console (v3.4.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="websocket (v1.2.3, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.6.4, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.2, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="xpath (v2.0.0, rbenv: 2.4.0) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="yard (v0.9.7, rbenv: 2.4.0) [gem]" level="application" />
- </component>
- <component name="RModuleSettingsStorage">
- <LOAD_PATH number="0" />
- <I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
- </component>
-</module>
\ No newline at end of file
構造変更¶
コミット: 331f4e9¶
メッセージ¶
fix:単体テスト
変更されたファイル¶
- M app/controllers/concerns/email_holder.rb
- M app/validators/email_validator.rb
変更内容¶
commit 331f4e94172b25c73ba95e58951ffbba5183b1ad
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 22:13:15 2025 +0900
fix:単体テスト
diff --git a/app/controllers/concerns/email_holder.rb b/app/controllers/concerns/email_holder.rb
index e16d6b8..1ef3019 100644
--- a/app/controllers/concerns/email_holder.rb
+++ b/app/controllers/concerns/email_holder.rb
@@ -11,7 +11,13 @@ module EmailHolder
validates :email, presence: true, email: { allow_blank: true }
validates :email_for_index, uniqueness: { allow_blank: true }
-
+ validates :email,
+ presence: true,
+ email: { allow_blank: true },
+ format: {
+ with: /\A[^@]+@[^@]+\z/,
+ message: "は1つの@のみ使用できます"
+ }
after_validation do
if errors.include?(:email_for_index)
errors.add(:email, :taken)
diff --git a/app/validators/email_validator.rb b/app/validators/email_validator.rb
index 37e9148..c595f4c 100644
--- a/app/validators/email_validator.rb
+++ b/app/validators/email_validator.rb
@@ -1,6 +1,10 @@
class EmailValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
- unless value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
+ unless value.present? && value.count('@') == 1 && value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
+ record.errors.add(attribute, :invalid)
+ end
+
+ if value.present? && value.count('@') != 1
record.errors.add(attribute, :invalid)
end
end
構造変更¶
コミット: 5e86ade¶
メッセージ¶
fix:単体テスト
変更されたファイル¶
- M app/views/customer/accounts/_phone_fields.html.erb
- M app/views/staff/customers/_phone_fields.html.erb
変更内容¶
commit 5e86adeedc7a54c950c5782ae2809acac1f241fc
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 19:15:50 2025 +0900
fix:単体テスト
diff --git a/app/views/customer/accounts/_phone_fields.html.erb b/app/views/customer/accounts/_phone_fields.html.erb
index a5f6749..37a3c46 100644
--- a/app/views/customer/accounts/_phone_fields.html.erb
+++ b/app/views/customer/accounts/_phone_fields.html.erb
@@ -1,6 +1,6 @@
<%= f.fields_for :phones, phone, index: index do |ff| %>
<%= markup(:li) do |m|
- m << ff.text_field(:number, skip_required: true)
+ m << ff.text_field(:number, required: false)
m << ff.check_box(:primary, label: t('activerecord.attributes.phone.primary'))
end %>
-<% end %>
\ No newline at end of file
+<% end %>
diff --git a/app/views/staff/customers/_phone_fields.html.erb b/app/views/staff/customers/_phone_fields.html.erb
index a5f6749..37a3c46 100644
--- a/app/views/staff/customers/_phone_fields.html.erb
+++ b/app/views/staff/customers/_phone_fields.html.erb
@@ -1,6 +1,6 @@
<%= f.fields_for :phones, phone, index: index do |ff| %>
<%= markup(:li) do |m|
- m << ff.text_field(:number, skip_required: true)
+ m << ff.text_field(:number, required: false)
m << ff.check_box(:primary, label: t('activerecord.attributes.phone.primary'))
end %>
-<% end %>
\ No newline at end of file
+<% end %>
コミット: c2146d7¶
メッセージ¶
fix:単体テスト
変更されたファイル¶
- M app/controllers/concerns/email_holder.rb
- M app/forms/staff/customer_form.rb
- M app/models/customer.rb
- M app/presenters/form_presenter.rb
- M app/presenters/staff/address_form_presenter.rb
- M app/presenters/staff/customer_form_presenter.rb
- M app/presenters/user_form_presenter.rb
- A app/validators/email_validator.rb
- M app/views/staff/accounts/_form.html.erb
- M db/seed/development/customers.rb
- M db/seed/development/staff_members.rb
変更内容¶
commit c2146d74efdb2f7eaed916147c13945d7d3a2131
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 19:04:01 2025 +0900
fix:単体テスト
diff --git a/app/controllers/concerns/email_holder.rb b/app/controllers/concerns/email_holder.rb
index 8f636f7..e16d6b8 100644
--- a/app/controllers/concerns/email_holder.rb
+++ b/app/controllers/concerns/email_holder.rb
@@ -9,7 +9,7 @@ module EmailHolder
self.email_for_index = email.downcase if email
end
- validates :email, presence: true, email: { alllow_blank: true }
+ validates :email, presence: true, email: { allow_blank: true }
validates :email_for_index, uniqueness: { allow_blank: true }
after_validation do
@@ -19,4 +19,4 @@ module EmailHolder
end
end
end
-end
\ No newline at end of file
+end
diff --git a/app/forms/staff/customer_form.rb b/app/forms/staff/customer_form.rb
index 89ca635..af0ff3d 100644
--- a/app/forms/staff/customer_form.rb
+++ b/app/forms/staff/customer_form.rb
@@ -29,7 +29,7 @@ class Staff::CustomerForm
customer.assign_attributes(customer_params)
- phones = phone_params(:customer).fetch(:phones)
+ phones = phone_params(:customer)[:phones] || {}
customer.personal_phones.size.times do |index|
attributes = phones[index.to_s]
if attributes && attributes[:number].present?
@@ -42,7 +42,7 @@ class Staff::CustomerForm
if inputs_home_address
customer.home_address.assign_attributes(home_address_params)
- phones = phone_params(:home_address).fetch(:phones)
+ phones = phone_params(:home_address)[:phones] || {}
customer.home_address.phones.size.times do |index|
attributes = phones[index.to_s]
if attributes && attributes[:number].present?
@@ -57,7 +57,7 @@ class Staff::CustomerForm
if inputs_work_address
customer.work_address.assign_attributes(work_address_params)
- phones = phone_params(:work_address).fetch(:phones)
+ phones = phone_params(:work_address)[:phones] || {}
customer.work_address.phones.size.times do |index|
attributes = phones[index.to_s]
if attributes && attributes[:number].present?
@@ -109,5 +109,8 @@ class Staff::CustomerForm
def phone_params(record_name)
@params.require(record_name).permit(phones: [ :number, :primary ])
+ rescue ActionController::ParameterMissing
+ # If the phones parameter is missing, return an empty hash with phones key
+ { phones: {} }
end
-end
\ No newline at end of file
+end
diff --git a/app/models/customer.rb b/app/models/customer.rb
index 6c97b91..9497b11 100644
--- a/app/models/customer.rb
+++ b/app/models/customer.rb
@@ -40,8 +40,8 @@ class Customer < ApplicationRecord
include PasswordHolder
has_many :addresses, dependent: :destroy
- has_one :home_address, autosave: true
- has_one :work_address, autosave: true
+ has_one :home_address, class_name: 'HomeAddress', autosave: true
+ has_one :work_address, class_name: 'WorkAddress', autosave: true
has_many :phones, dependent: :destroy
has_many :personal_phones, -> { where(address_id: nil).order(:id) },class_name: 'Phone', autosave: true
has_many :entries, dependent: :destroy
diff --git a/app/presenters/form_presenter.rb b/app/presenters/form_presenter.rb
index 88c57e2..ea5761a 100644
--- a/app/presenters/form_presenter.rb
+++ b/app/presenters/form_presenter.rb
@@ -31,6 +31,7 @@ class FormPresenter
if options[:maxlength]
m.span "(#{options[:maxlength]}文字以内)", class: 'instruction'
end
+ m << error_message_for(name)
end
end
@@ -42,14 +43,15 @@ class FormPresenter
max = view_context.number_with_delimiter(options[:max].to_i)
m.span "(最大値: #{max})", class: 'instruction'
end
+ m << error_message_for(name)
end
-
end
def password_field_block(name, label_text, options = {})
markup(:div, class: 'AppForm__input-block') do |m|
m << decorated_label(name, label_text, options)
m << password_field(name, hide_label: true, class: options[:required] ? 'required' : nil)
+ m << error_message_for(name)
end
end
@@ -63,20 +65,22 @@ class FormPresenter
options[:class] = 'datetimepicker'
end
m << text_field(name, options.merge(hide_label: true))
+ m << error_message_for(name)
end
end
def drop_down_list_block(name, label_text, choices, options ={})
markup(:div, class: 'AppForm__input-block') do |m|
m << form_builder.select(name, choices, options.merge(include_blank: true).merge(label: label_text))
+ m << error_message_for(name)
end
end
def error_message_for(name)
markup do |m|
object.errors.full_messages_for(name).each do |message|
- m.div(class: 'error-message') do |m|
- m.text message
+ m.div(class: 'has-error') do |m|
+ m.span(message, class: 'help-block')
end
end
end
@@ -86,4 +90,4 @@ class FormPresenter
label(name, label_text, class: options[:required] ? 'AppForm__label required' : 'AppForm__label')
end
-end
\ No newline at end of file
+end
diff --git a/app/presenters/staff/address_form_presenter.rb b/app/presenters/staff/address_form_presenter.rb
index 2500e50..65dab3b 100644
--- a/app/presenters/staff/address_form_presenter.rb
+++ b/app/presenters/staff/address_form_presenter.rb
@@ -4,6 +4,7 @@ class Staff::AddressFormPresenter < FormPresenter
m << decorated_label(name, label_text, options)
m << text_field(name, hide_label: true, class: options[:required] ? 'required' : nil)
m.span '(7桁の半角数字で入力してください。)', class: 'AppForm__notes'
+ m << error_message_for(name)
end
end
-end
\ No newline at end of file
+end
diff --git a/app/presenters/staff/customer_form_presenter.rb b/app/presenters/staff/customer_form_presenter.rb
index 8fc0c0f..1f5b15b 100644
--- a/app/presenters/staff/customer_form_presenter.rb
+++ b/app/presenters/staff/customer_form_presenter.rb
@@ -9,6 +9,7 @@ class Staff::CustomerFormPresenter < UserFormPresenter
options[:class] = 'birthday-picker'
end
m << text_field(name, options.merge(hide_label: true))
+ m << error_message_for(name)
end
end
@@ -19,6 +20,7 @@ class Staff::CustomerFormPresenter < UserFormPresenter
m << label(:gender_male, '男性')
m << radio_button(:gender, 'female')
m << label(:gender_female, '女性')
+ m << error_message_for(:gender)
end
end
-end
\ No newline at end of file
+end
diff --git a/app/presenters/user_form_presenter.rb b/app/presenters/user_form_presenter.rb
index 1528dfc..0167004 100644
--- a/app/presenters/user_form_presenter.rb
+++ b/app/presenters/user_form_presenter.rb
@@ -13,10 +13,12 @@ class UserFormPresenter < FormPresenter
end
def full_name_block(name1, name2, label_text, options = {})
- markup(:dvi,class: 'AppForm__input-block') do |m|
+ markup(:div, class: 'AppForm__input-block') do |m|
m << decorated_label(name1, label_text, options)
m << text_field(name1, hide_label: true, class: options[:required] ? 'required' : nil)
m << text_field(name2, hide_label: true, class: options[:required] ? 'required' : nil)
+ m << error_message_for(name1)
+ m << error_message_for(name2)
end
end
-end
\ No newline at end of file
+end
diff --git a/app/validators/email_validator.rb b/app/validators/email_validator.rb
new file mode 100644
index 0000000..37e9148
--- /dev/null
+++ b/app/validators/email_validator.rb
@@ -0,0 +1,7 @@
+class EmailValidator < ActiveModel::EachValidator
+ def validate_each(record, attribute, value)
+ unless value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
+ record.errors.add(attribute, :invalid)
+ end
+ end
+end
diff --git a/app/views/staff/accounts/_form.html.erb b/app/views/staff/accounts/_form.html.erb
index ebbcca0..68987a2 100644
--- a/app/views/staff/accounts/_form.html.erb
+++ b/app/views/staff/accounts/_form.html.erb
@@ -4,6 +4,11 @@
<div>
<%= f.label :email, t('activerecord.attributes.staff_member.email'), class: 'AppForm__label required' %>
<%= f.text_field :email, hide_label: true, size: 32, required: true %>
+ <% if @staff_member.errors.include?(:email) %>
+ <div class="has-error">
+ <span class="help-block"><%= @staff_member.errors.full_messages_for(:email).first %></span>
+ </div>
+ <% end %>
</div>
<div>
<%= f.label :family_name, '氏名', class: 'required' %>
@@ -14,4 +19,4 @@
<%= f.label :family_name_kana, 'フリガナ', class: 'required' %>
<%= f.text_field :family_name_kana, hide_label: true, required: true %>
<%= f.text_field :given_name_kana, hide_label: true, required: true %>
-</div>
\ No newline at end of file
+</div>
diff --git a/db/seed/development/customers.rb b/db/seed/development/customers.rb
index 674ffe3..0d14c3f 100644
--- a/db/seed/development/customers.rb
+++ b/db/seed/development/customers.rb
@@ -34,7 +34,7 @@ company_names = %w(OIAX ABC XYZ)
gn = given_names[m].split(':')
c = Customer.create!(
- email: "#{fn[2]}.#{gn[2]}@example.jp",
+ email: "#{fn[2]}.#{gn[2]}-#{n}@example.jp",
family_name: fn[0],
given_name: gn[0],
family_name_kana: fn[1],
diff --git a/db/seed/development/staff_members.rb b/db/seed/development/staff_members.rb
index 1be8731..9abae9c 100644
--- a/db/seed/development/staff_members.rb
+++ b/db/seed/development/staff_members.rb
@@ -28,7 +28,7 @@ given_name = %w{
gn = given_name[n % 5].split(':')
StaffMember.create!(
- email: "#{fn[2]}.#{gn[2]}@example.com",
+ email: "#{fn[2]}.#{gn[2]}-#{n}@example.com",
family_name: fn[0],
given_name: gn[0],
family_name_kana: fn[1],
構造変更¶
コミット: 584ff54¶
メッセージ¶
fix:単体テスト
変更されたファイル¶
- M spec/controllers/admin/staff_masters_controller_spec.rb
- M spec/controllers/customer/session_controller_spec.rb
- M spec/controllers/staff/accounts_controller_spec.rb
- M spec/models/staff_member_spec.rb
- M spec/support/shared_examples_for_admin_controllers.rb
- M spec/support/shared_examples_for_staff_controllers.rb
変更内容¶
commit 584ff54225cbdac96fae1ac9c7dd2790d01e734f
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 18:30:42 2025 +0900
fix:単体テスト
diff --git a/spec/controllers/admin/staff_masters_controller_spec.rb b/spec/controllers/admin/staff_masters_controller_spec.rb
index 5f14598..27db4c9 100644
--- a/spec/controllers/admin/staff_masters_controller_spec.rb
+++ b/spec/controllers/admin/staff_masters_controller_spec.rb
@@ -16,14 +16,14 @@ describe Admin::StaffMembersController do
describe '#create' do
# 職員一覧ページにリダイレクト
it 'should redirect to StaffMember index page' do
- post :create, staff_member: params_hash
+ post :create, params: { staff_member: params_hash }
expect(response).to redirect_to(admin_staff_members_url)
end
# 例外ActionController::ParameterMissingが発生
it 'should raise ActionController::ParameterMissing exception' do
bypass_rescue
- expect { post :create}.to raise_error(ActionController::ParameterMissing)
+ expect { post :create, params: {} }.to raise_error(ActionController::ParameterMissing)
end
end
@@ -33,7 +33,7 @@ describe Admin::StaffMembersController do
# suspendedフラグをセットする
it 'should set suspended flag' do
params_hash.merge!(suspended: true)
- patch :update, id: staff_member.id, staff_member: params_hash
+ patch :update, params: { id: staff_member.id, staff_member: params_hash }
staff_member.reload
expect(staff_member).to be_suspended
end
@@ -43,7 +43,7 @@ describe Admin::StaffMembersController do
params_hash.delete(:password)
params_hash.merge!(hashed_password: 'x')
expect {
- patch :update, id: staff_member.id, staff_member: params_hash
+ patch :update, params: { id: staff_member.id, staff_member: params_hash }
}.not_to change { staff_member.hashed_password.to_s }
end
end
diff --git a/spec/controllers/customer/session_controller_spec.rb b/spec/controllers/customer/session_controller_spec.rb
index 5a0f323..f90ff06 100644
--- a/spec/controllers/customer/session_controller_spec.rb
+++ b/spec/controllers/customer/session_controller_spec.rb
@@ -6,21 +6,21 @@ describe Customer::SessionsController do
# [次回から自動でログインする]にチェックせずログイン
it 'Do not check "次回から自動でログインする" Login' do
- post :create, customer_login_form: {
+ post :create, params: { customer_login_form: {
email: customer.email,
password: 'password'
- }
+ } }
expect(session[:customer_id]).to eq(customer.id)
expect(response.cookies).not_to have_key('custoemr_id')
end
# [次回から自動でログインする]にチェックしてログイン
it 'Do check "次回から自動でログインする" Login' do
- post :create, customer_login_form: {
+ post :create, params: { customer_login_form: {
email: customer.email,
password: 'password',
remember_me: '1'
- }
+ } }
expect(session).not_to have_key(:customer_id)
expect(response.cookies['customer_id']).to match(/[0-9a-f]{40}\z/)
@@ -29,4 +29,4 @@ describe Customer::SessionsController do
expect(cookies['customer_id'][:expires]).to be > 19.years.from_now
end
end
-end
\ No newline at end of file
+end
diff --git a/spec/controllers/staff/accounts_controller_spec.rb b/spec/controllers/staff/accounts_controller_spec.rb
index bdce4d8..d1338e9 100644
--- a/spec/controllers/staff/accounts_controller_spec.rb
+++ b/spec/controllers/staff/accounts_controller_spec.rb
@@ -17,7 +17,7 @@ describe Staff::AccountsController do
# email属性を変更する
it 'should update email attributes' do
params_hash.merge!(email: 'test@example.com')
- patch :update, id: staff_member.id, staff_member: params_hash, commit: '更新'
+ patch :update, params: { id: staff_member.id, staff_member: params_hash, commit: '更新' }
staff_member.reload
expect(staff_member.email).to eq('test@example.com')
end
@@ -25,14 +25,14 @@ describe Staff::AccountsController do
# 例外ActionController::ParameterMissingが発生
it 'should throw ActionController::ParameterMissing exception' do
bypass_rescue
- expect { patch :update, id: staff_member.id, commit: '更新'}.to raise_error(ActionController::ParameterMissing)
+ expect { patch :update, params: { id: staff_member.id, commit: '更新' } }.to raise_error(ActionController::ParameterMissing)
end
# end_dateの値は書き換え不可
it 'should writable end_data value' do
params_hash.merge!(end_date: Date.tomorrow)
expect {
- patch :update, id: staff_member.id, staff_member: params_hash, commit: '更新'
+ patch :update, params: { id: staff_member.id, staff_member: params_hash, commit: '更新' }
}.not_to change { staff_member.end_date }
end
end
diff --git a/spec/models/staff_member_spec.rb b/spec/models/staff_member_spec.rb
index 4d72fe7..6006926 100644
--- a/spec/models/staff_member_spec.rb
+++ b/spec/models/staff_member_spec.rb
@@ -77,8 +77,8 @@ RSpec.describe StaffMember, type: :model do
describe 'validation' do
# @を2個含むemailは無効
it 'invalid email containing 2 @' do
- memeber = build(:staff_member, email: 'test@@example.com')
- expect(memeber).not_to be_valid
+ member = build(:staff_member, email: 'test@@example.com')
+ expect(member).not_to be_valid
end
# 漢字を含むfamily_name_kanaは無効
diff --git a/spec/support/shared_examples_for_admin_controllers.rb b/spec/support/shared_examples_for_admin_controllers.rb
index d788479..8068f9e 100644
--- a/spec/support/shared_examples_for_admin_controllers.rb
+++ b/spec/support/shared_examples_for_admin_controllers.rb
@@ -10,7 +10,7 @@ shared_examples 'a protected admin controller' do
describe '#show' do
# ログインフォームにリダイレクト
it 'should redirect to login form' do
- get :show, id: 1
+ get :show, params: { id: 1 }
expect(response).to redirect_to(admin_login_url)
end
end
@@ -24,4 +24,4 @@ shared_examples 'a protected singular admin controller' do
expect(response).to redirect_to(admin_login_url)
end
end
-end
\ No newline at end of file
+end
diff --git a/spec/support/shared_examples_for_staff_controllers.rb b/spec/support/shared_examples_for_staff_controllers.rb
index d4c14b8..e342053 100644
--- a/spec/support/shared_examples_for_staff_controllers.rb
+++ b/spec/support/shared_examples_for_staff_controllers.rb
@@ -10,7 +10,7 @@ shared_examples 'a protected staff controller' do
describe '#show' do
# ログインフォームにリダイレクト
it 'should redirect to login form' do
- get :show, id: 1
+ get :show, params: { id: 1 }
expect(response).to redirect_to(staff_login_url)
end
end
@@ -24,4 +24,4 @@ shared_examples 'a protected singular staff controller' do
expect(response).to redirect_to(staff_login_url)
end
end
-end
\ No newline at end of file
+end
構造変更¶
コミット: 24949da¶
メッセージ¶
CI:github actionセットアップ
変更されたファイル¶
- A .github/workflows/CI.yml
- M Gemfile
- M Gemfile.lock
- M spec/rails_helper.rb
変更内容¶
commit 24949dab3b2699e518f4016918df8a63a9e1b35c
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 18:26:05 2025 +0900
CI:github actionセットアップ
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
new file mode 100644
index 0000000..a71f2b1
--- /dev/null
+++ b/.github/workflows/CI.yml
@@ -0,0 +1,44 @@
+name: Ruby Application CI
+
+on:
+ push:
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+
+ services:
+ mysql:
+ image: mysql:8.0
+ env:
+ MYSQL_ROOT_PASSWORD: password
+ ports:
+ - 3306:3306
+ options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: 3.4.4
+ bundler-cache: true
+
+ - name: Setup Database
+ env:
+ RAILS_ENV: test
+ DATABASE_URL: mysql2://root:password@127.0.0.1:3306/baukis-kai_test
+ run: |
+ bundle config set --local path vendor/bundle
+ bundle install --jobs 4 --retry 3
+ bundle exec rake db:create RAILS_ENV=test
+ bundle exec rake db:migrate RAILS_ENV=test
+
+ - name: Run tests
+ env:
+ RAILS_ENV: test
+ DATABASE_URL: mysql2://root:password@127.0.0.1:3306/baukis-kai_test
+ run: |
+ bundle exec rake spec
diff --git a/Gemfile b/Gemfile
index 3910ebd..e85164d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -67,10 +67,11 @@ end
group :test do
gem 'faker'
gem 'capybara'
- gem 'capybara-webkit'
gem 'database_cleaner'
gem 'launchy'
+ gem 'capybara'
gem 'selenium-webdriver'
+ gem 'webdrivers'
gem 'shoulda-matchers'
gem 'capybara-screenshot'
gem 'rails-controller-testing'
@@ -104,4 +105,5 @@ gem 'drb'
gem 'ostruct'
gem 'base64'
gem 'csv'
-gem 'nkf'
\ No newline at end of file
+gem 'nkf'
+
diff --git a/Gemfile.lock b/Gemfile.lock
index 862d79a..944d710 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -112,9 +112,6 @@ GEM
capybara-screenshot (1.0.26)
capybara (>= 1.0, < 4)
launchy
- capybara-webkit (1.15.1)
- capybara (>= 2.3, < 4.0)
- json
childprocess (5.1.0)
logger (~> 1.5)
choice (0.2.0)
@@ -211,7 +208,6 @@ GEM
thor (>= 0.14, < 2.0)
jquery-ui-rails (8.0.0)
railties (>= 3.2.16)
- json (2.12.2)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
@@ -441,6 +437,10 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
+ webdrivers (5.2.0)
+ nokogiri (~> 1.6)
+ rubyzip (>= 1.3.0)
+ selenium-webdriver (~> 4.0)
webrick (1.9.1)
websocket (1.2.11)
websocket-driver (0.8.0)
@@ -475,7 +475,6 @@ DEPENDENCIES
byebug
capybara
capybara-screenshot
- capybara-webkit
coffee-rails
concurrent-ruby (= 1.3.4)
csv
@@ -524,6 +523,7 @@ DEPENDENCIES
tzinfo-data
uglifier
web-console
+ webdrivers
webrick
yard
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index a0c868b..bd111bc 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -7,6 +7,48 @@ require 'spec_helper'
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
+# Capybara とSelenium WebDriverの設定
+require 'capybara/rails'
+require 'capybara/rspec'
+require 'selenium-webdriver'
+
+# Chrome Headless設定
+Capybara.register_driver :selenium_chrome_headless do |app|
+ options = Selenium::WebDriver::Chrome::Options.new
+ options.add_argument('--headless')
+ options.add_argument('--no-sandbox')
+ options.add_argument('--disable-dev-shm-usage')
+ options.add_argument('--disable-gpu')
+ options.add_argument('--remote-debugging-port=9222')
+ options.add_argument('--window-size=1400,1400')
+ options.add_argument('--disable-features=VizDisplayCompositor')
+
+ Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
+end
+
+# Chrome設定(デバッグ用)
+Capybara.register_driver :selenium_chrome do |app|
+ options = Selenium::WebDriver::Chrome::Options.new
+ options.add_argument('--no-sandbox')
+ options.add_argument('--disable-dev-shm-usage')
+ options.add_argument('--window-size=1400,1400')
+
+ Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
+end
+
+# 環境に応じてドライバーを切り替え
+if ENV['HEADLESS'] || ENV['CI']
+ Capybara.javascript_driver = :selenium_chrome_headless
+else
+ Capybara.javascript_driver = :selenium_chrome
+end
+
+# Capybara設定
+Capybara.default_driver = :rack_test
+Capybara.default_max_wait_time = 5
+Capybara.server_host = '0.0.0.0'
+Capybara.server_port = 3001
+
# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
# run as spec files by default. This means that files in spec/support that end
@@ -22,15 +64,13 @@ require 'rspec/rails'
#
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
-Capybara.javascript_driver = :webkit
-
# Checks for pending migration and applies them before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema!
RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
+ config.fixture_paths = ["#{::Rails.root}/spec/fixtures"]
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
@@ -74,4 +114,13 @@ RSpec.configure do |config|
config.after do
Rails.application.config.baukis_kai[:restrict_ip_addresses] = false
end
+
+ # System test configuration
+ config.before(:each, type: :system) do
+ if ENV['HEADLESS'] || ENV['CI']
+ driven_by :selenium_chrome_headless
+ else
+ driven_by :selenium_chrome
+ end
+ end
end
コミット: f5bb451¶
メッセージ¶
chore:Railsバージョンアップ
変更されたファイル¶
- M Gemfile
- M Gemfile.lock
- M db/schema.rb
- M spec/factories/addresses.rb
- M spec/factories/administrators.rb
- M spec/factories/allowed_sources.rb
- M spec/factories/customers.rb
- M spec/factories/entries.rb
- M spec/factories/hash_locks.rb
- M spec/factories/message_tag_links.rb
- M spec/factories/messages.rb
- M spec/factories/phones.rb
- M spec/factories/programs.rb
- M spec/factories/staff_events.rb
- M spec/factories/staff_members.rb
- M spec/factories/tags.rb
- M spec/rails_helper.rb
変更内容¶
commit f5bb4516b0bf6b3b2d22e769e6a8f6fb883180ea
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 17:03:01 2025 +0900
chore:Railsバージョンアップ
diff --git a/Gemfile b/Gemfile
index 677ed7b..3910ebd 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,7 +8,7 @@ end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '~> 6.1.7.10'
+gem 'rails', '~> 7.2.2.1'
# Use mysql as the database for Active Record
gem 'pg'
# Use Puma as the app server
@@ -41,7 +41,7 @@ group :development, :test do
gem 'byebug', platform: :mri
gem 'rspec-rails'
gem 'spring-commands-rspec'
- gem 'factory_girl_rails'
+ gem 'factory_bot_rails'
gem 'debase'
end
diff --git a/Gemfile.lock b/Gemfile.lock
index f1822a7..862d79a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,65 +1,77 @@
GEM
remote: https://rubygems.org/
specs:
- actioncable (6.1.7.10)
- actionpack (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ actioncable (7.2.2.1)
+ actionpack (= 7.2.2.1)
+ activesupport (= 7.2.2.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailbox (6.1.7.10)
- actionpack (= 6.1.7.10)
- activejob (= 6.1.7.10)
- activerecord (= 6.1.7.10)
- activestorage (= 6.1.7.10)
- activesupport (= 6.1.7.10)
- mail (>= 2.7.1)
- actionmailer (6.1.7.10)
- actionpack (= 6.1.7.10)
- actionview (= 6.1.7.10)
- activejob (= 6.1.7.10)
- activesupport (= 6.1.7.10)
- mail (~> 2.5, >= 2.5.4)
- rails-dom-testing (~> 2.0)
- actionpack (6.1.7.10)
- actionview (= 6.1.7.10)
- activesupport (= 6.1.7.10)
- rack (~> 2.0, >= 2.0.9)
+ zeitwerk (~> 2.6)
+ actionmailbox (7.2.2.1)
+ actionpack (= 7.2.2.1)
+ activejob (= 7.2.2.1)
+ activerecord (= 7.2.2.1)
+ activestorage (= 7.2.2.1)
+ activesupport (= 7.2.2.1)
+ mail (>= 2.8.0)
+ actionmailer (7.2.2.1)
+ actionpack (= 7.2.2.1)
+ actionview (= 7.2.2.1)
+ activejob (= 7.2.2.1)
+ activesupport (= 7.2.2.1)
+ mail (>= 2.8.0)
+ rails-dom-testing (~> 2.2)
+ actionpack (7.2.2.1)
+ actionview (= 7.2.2.1)
+ activesupport (= 7.2.2.1)
+ nokogiri (>= 1.8.5)
+ racc
+ rack (>= 2.2.4, < 3.2)
+ rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
- rails-dom-testing (~> 2.0)
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actiontext (6.1.7.10)
- actionpack (= 6.1.7.10)
- activerecord (= 6.1.7.10)
- activestorage (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ rails-dom-testing (~> 2.2)
+ rails-html-sanitizer (~> 1.6)
+ useragent (~> 0.16)
+ actiontext (7.2.2.1)
+ actionpack (= 7.2.2.1)
+ activerecord (= 7.2.2.1)
+ activestorage (= 7.2.2.1)
+ activesupport (= 7.2.2.1)
+ globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
- actionview (6.1.7.10)
- activesupport (= 6.1.7.10)
+ actionview (7.2.2.1)
+ activesupport (= 7.2.2.1)
builder (~> 3.1)
- erubi (~> 1.4)
- rails-dom-testing (~> 2.0)
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
- activejob (6.1.7.10)
- activesupport (= 6.1.7.10)
+ erubi (~> 1.11)
+ rails-dom-testing (~> 2.2)
+ rails-html-sanitizer (~> 1.6)
+ activejob (7.2.2.1)
+ activesupport (= 7.2.2.1)
globalid (>= 0.3.6)
- activemodel (6.1.7.10)
- activesupport (= 6.1.7.10)
- activerecord (6.1.7.10)
- activemodel (= 6.1.7.10)
- activesupport (= 6.1.7.10)
- activestorage (6.1.7.10)
- actionpack (= 6.1.7.10)
- activejob (= 6.1.7.10)
- activerecord (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ activemodel (7.2.2.1)
+ activesupport (= 7.2.2.1)
+ activerecord (7.2.2.1)
+ activemodel (= 7.2.2.1)
+ activesupport (= 7.2.2.1)
+ timeout (>= 0.4.0)
+ activestorage (7.2.2.1)
+ actionpack (= 7.2.2.1)
+ activejob (= 7.2.2.1)
+ activerecord (= 7.2.2.1)
+ activesupport (= 7.2.2.1)
marcel (~> 1.0)
- mini_mime (>= 1.1.0)
- activesupport (6.1.7.10)
- concurrent-ruby (~> 1.0, >= 1.0.2)
+ activesupport (7.2.2.1)
+ base64
+ benchmark (>= 0.3)
+ bigdecimal
+ concurrent-ruby (~> 1.0, >= 1.3.1)
+ connection_pool (>= 2.2.5)
+ drb
i18n (>= 1.6, < 2)
+ logger (>= 1.4.2)
minitest (>= 5.1)
- tzinfo (~> 2.0)
- zeitwerk (~> 2.3)
+ securerandom (>= 0.3)
+ tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
annotate (3.2.0)
@@ -69,6 +81,7 @@ GEM
execjs (~> 2)
base64 (0.3.0)
bcrypt (3.1.20)
+ benchmark (0.4.1)
better_errors (2.10.1)
erubi (>= 1.0.0)
rack (>= 0.9.0)
@@ -114,6 +127,7 @@ GEM
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.3.4)
+ connection_pool (2.5.3)
crass (1.0.6)
csv (3.3.5)
database_cleaner (2.1.0)
@@ -143,14 +157,15 @@ GEM
activemodel
enum_help (0.0.19)
activesupport (>= 3.0.0)
+ erb (5.0.1)
erubi (1.13.1)
eventmachine (1.2.7)
execjs (2.10.0)
- factory_girl (4.9.0)
- activesupport (>= 3.0.0)
- factory_girl_rails (4.9.0)
- factory_girl (~> 4.9.0)
- railties (>= 3.0.0)
+ factory_bot (6.5.3)
+ activesupport (>= 6.1.0)
+ factory_bot_rails (6.4.4)
+ factory_bot (~> 6.5)
+ railties (>= 5.0.0)
faker (3.5.1)
i18n (>= 1.8.11, < 2)
ffi (1.15.5)
@@ -182,6 +197,11 @@ GEM
i18n_generators (2.2.2)
activerecord (>= 3.0.0)
railties (>= 3.0.0)
+ io-console (0.8.0)
+ irb (1.15.2)
+ pp (>= 0.6.0)
+ rdoc (>= 4.0.0)
+ reline (>= 0.4.2)
jbuilder (2.13.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
@@ -265,9 +285,15 @@ GEM
observer (0.1.2)
ostruct (0.6.1)
pg (1.5.9)
+ pp (0.6.2)
+ prettyprint
+ prettyprint (0.2.0)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
+ psych (5.2.6)
+ date
+ stringio
public_suffix (6.0.2)
puma (6.6.0)
nio4r (~> 2.0)
@@ -277,23 +303,27 @@ GEM
rack (>= 1.1, < 4.0)
rack-livereload (0.5.2)
rack (< 3)
+ rack-session (1.0.2)
+ rack (< 3)
rack-test (2.2.0)
rack (>= 1.3)
- rails (6.1.7.10)
- actioncable (= 6.1.7.10)
- actionmailbox (= 6.1.7.10)
- actionmailer (= 6.1.7.10)
- actionpack (= 6.1.7.10)
- actiontext (= 6.1.7.10)
- actionview (= 6.1.7.10)
- activejob (= 6.1.7.10)
- activemodel (= 6.1.7.10)
- activerecord (= 6.1.7.10)
- activestorage (= 6.1.7.10)
- activesupport (= 6.1.7.10)
+ rackup (1.0.1)
+ rack (< 3)
+ webrick
+ rails (7.2.2.1)
+ actioncable (= 7.2.2.1)
+ actionmailbox (= 7.2.2.1)
+ actionmailer (= 7.2.2.1)
+ actionpack (= 7.2.2.1)
+ actiontext (= 7.2.2.1)
+ actionview (= 7.2.2.1)
+ activejob (= 7.2.2.1)
+ activemodel (= 7.2.2.1)
+ activerecord (= 7.2.2.1)
+ activestorage (= 7.2.2.1)
+ activesupport (= 7.2.2.1)
bundler (>= 1.15.0)
- railties (= 6.1.7.10)
- sprockets-rails (>= 2.0.0)
+ railties (= 7.2.2.1)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
@@ -315,17 +345,24 @@ GEM
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
- railties (6.1.7.10)
- actionpack (= 6.1.7.10)
- activesupport (= 6.1.7.10)
- method_source
+ railties (7.2.2.1)
+ actionpack (= 7.2.2.1)
+ activesupport (= 7.2.2.1)
+ irb (~> 1.13)
+ rackup (>= 1.0.0)
rake (>= 12.2)
- thor (~> 1.0)
+ thor (~> 1.0, >= 1.2.2)
+ zeitwerk (~> 2.6)
rake (13.3.0)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
+ rdoc (6.14.0)
+ erb
+ psych (>= 4.0.0)
regexp_parser (2.10.0)
+ reline (0.6.1)
+ io-console (~> 0.5)
rexml (3.4.1)
rouge (4.5.2)
rspec-core (3.13.4)
@@ -358,6 +395,7 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
+ securerandom (0.4.1)
selenium-webdriver (4.33.0)
base64 (~> 0.2)
logger (~> 1.4)
@@ -381,6 +419,7 @@ GEM
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
+ stringio (3.1.7)
tag-it-rails (2.0.0)
jquery-ui-rails
railties
@@ -396,6 +435,7 @@ GEM
tzinfo (>= 1.0.0)
uglifier (4.2.1)
execjs (>= 0.3.0, < 3)
+ useragent (0.16.11)
web-console (4.2.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
@@ -446,7 +486,7 @@ DEPENDENCIES
drb
email_validator
enum_help
- factory_girl_rails
+ factory_bot_rails
faker
ffi (~> 1.15.5)
font-awesome-rails
@@ -468,7 +508,7 @@ DEPENDENCIES
puma
rack-dev-mark
rack-livereload
- rails (~> 6.1.7.10)
+ rails (~> 7.2.2.1)
rails-controller-testing
rails-erd
rails_12factor
diff --git a/db/schema.rb b/db/schema.rb
index 80ee82c..ce72980 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,8 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2017_03_27_081649) do
-
+ActiveRecord::Schema[7.2].define(version: 2017_03_27_081649) do
create_table "addresses", id: :integer, charset: "utf8mb3", comment: "住所", force: :cascade do |t|
t.integer "customer_id", null: false, comment: "顧客への外部キー"
t.string "type", null: false, comment: "継承カラム"
diff --git a/spec/factories/addresses.rb b/spec/factories/addresses.rb
index ecbdc13..d4c161f 100644
--- a/spec/factories/addresses.rb
+++ b/spec/factories/addresses.rb
@@ -26,22 +26,22 @@
# index_addresses_on_type_and_prefecture_and_city (type,prefecture,city)
#
-FactoryGirl.define do
+FactoryBot.define do
factory :home_address do
- postal_code '1000000'
- prefecture '東京都'
- city '千代田区'
- address1 '試験1-1-1'
- address2 ''
+ postal_code {'1000000'}
+ prefecture {'東京都'}
+ city {'千代田区'}
+ address1 {'試験1-1-1'}
+ address2 {''}
end
factory :work_address do
- company_name 'テスト'
- division_name '開発部'
- postal_code '1050000'
- prefecture '東京都'
- city '港区'
- address1 '試験1-1-1'
- address2 ''
+ company_name {'テスト'}
+ division_name {'開発部'}
+ postal_code {'1050000'}
+ prefecture {'東京都'}
+ city {'港区'}
+ address1 {'試験1-1-1'}
+ address2 {''}
end
end
diff --git a/spec/factories/administrators.rb b/spec/factories/administrators.rb
index 336095c..f6bb26f 100644
--- a/spec/factories/administrators.rb
+++ b/spec/factories/administrators.rb
@@ -15,10 +15,10 @@
# index_administrators_on_email_for_index (email_for_index) UNIQUE
#
-FactoryGirl.define do
+FactoryBot.define do
factory :administrator do
sequence(:email) { |n| "admin#{n}@example.com" }
- password 'pw'
- suspended false
+ password {'pw'}
+ suspended {false}
end
end
diff --git a/spec/factories/allowed_sources.rb b/spec/factories/allowed_sources.rb
index 3e60c02..f559f91 100644
--- a/spec/factories/allowed_sources.rb
+++ b/spec/factories/allowed_sources.rb
@@ -17,7 +17,7 @@
# index_allowed_sources_on_namespace_and_octets (namespace,octet1,octet2,octet3,octet4) UNIQUE
#
-FactoryGirl.define do
+FactoryBot.define do
factory :allowed_source do
end
diff --git a/spec/factories/customers.rb b/spec/factories/customers.rb
index 9b0a9cd..3fc8a0d 100644
--- a/spec/factories/customers.rb
+++ b/spec/factories/customers.rb
@@ -34,16 +34,16 @@
# index_customers_on_given_name_kana (given_name_kana)
#
-FactoryGirl.define do
+FactoryBot.define do
factory :customer do
sequence(:email) { |n| "member#{n}@example.jp"}
- family_name '山田'
- given_name '太郎'
- family_name_kana 'ヤマダ'
- given_name_kana 'タロウ'
- password 'pw'
- birthday Date.new(1970,1,1)
- gender 'male'
+ family_name {'山田'}
+ given_name {'太郎'}
+ family_name_kana {'ヤマダ'}
+ given_name_kana {'タロウ'}
+ password {'pw'}
+ birthday {Date.new(1970,1,1)}
+ gender {'male'}
association :home_address, strategy: :build
association :work_address, strategy: :build
end
diff --git a/spec/factories/entries.rb b/spec/factories/entries.rb
index 00ccc05..68decf9 100644
--- a/spec/factories/entries.rb
+++ b/spec/factories/entries.rb
@@ -17,7 +17,7 @@
# index_entries_on_program_id_and_customer_id (program_id,customer_id) UNIQUE
#
-FactoryGirl.define do
+FactoryBot.define do
factory :entry do
end
diff --git a/spec/factories/hash_locks.rb b/spec/factories/hash_locks.rb
index 3300220..efd41d5 100644
--- a/spec/factories/hash_locks.rb
+++ b/spec/factories/hash_locks.rb
@@ -14,7 +14,7 @@
# index_hash_locks_on_table_and_column_and_key (table,column,key) UNIQUE
#
-FactoryGirl.define do
+FactoryBot.define do
factory :hash_lock do
end
diff --git a/spec/factories/message_tag_links.rb b/spec/factories/message_tag_links.rb
index 013cedc..45d214e 100644
--- a/spec/factories/message_tag_links.rb
+++ b/spec/factories/message_tag_links.rb
@@ -13,7 +13,7 @@
# index_message_tag_links_on_tag_id (tag_id)
#
-FactoryGirl.define do
+FactoryBot.define do
factory :message_tag_link do
end
diff --git a/spec/factories/messages.rb b/spec/factories/messages.rb
index 374c483..f3b7548 100644
--- a/spec/factories/messages.rb
+++ b/spec/factories/messages.rb
@@ -30,16 +30,16 @@
# index_messages_on_type_and_staff_member_id (type,staff_member_id)
#
-FactoryGirl.define do
+FactoryBot.define do
factory :customer_message do
- subject 'Subject'
- body "Body.\nBody."
+ subject {'Subject'}
+ body {"Body.\nBody."}
customer
end
factory :staff_message do
- subject 'Subject'
- body "Body.\nBody."
+ subject {'Subject'}
+ body {"Body.\nBody."}
parent { FactoryGirl.create(:customer_message)}
staff_member
end
diff --git a/spec/factories/phones.rb b/spec/factories/phones.rb
index 694da4d..ec34d5a 100644
--- a/spec/factories/phones.rb
+++ b/spec/factories/phones.rb
@@ -20,7 +20,7 @@
# index_phones_on_number_for_index (number_for_index)
#
-FactoryGirl.define do
+FactoryBot.define do
factory :phone do
end
diff --git a/spec/factories/programs.rb b/spec/factories/programs.rb
index a14ab17..a4ac558 100644
--- a/spec/factories/programs.rb
+++ b/spec/factories/programs.rb
@@ -19,14 +19,14 @@
# index_programs_on_registrant_id (registrant_id)
#
-FactoryGirl.define do
+FactoryBot.define do
factory :program do
- title 'Title'
- description 'Description'
+ title {'Title'}
+ description {'Description'}
application_start_time { 5.days.ago.midnight }
application_end_time { 2.days.from_now.midnight }
- min_number_of_participants 5
- max_number_of_participants 10
+ min_number_of_participants {5}
+ max_number_of_participants {10}
registrant { create(:staff_member) }
end
end
diff --git a/spec/factories/staff_events.rb b/spec/factories/staff_events.rb
index adb108e..77f9924 100644
--- a/spec/factories/staff_events.rb
+++ b/spec/factories/staff_events.rb
@@ -14,7 +14,7 @@
# index_staff_events_on_staff_member_id_and_created_at (staff_member_id,created_at)
#
-FactoryGirl.define do
+FactoryBot.define do
factory :staff_event do
end
diff --git a/spec/factories/staff_members.rb b/spec/factories/staff_members.rb
index ce6d3bb..24cc294 100644
--- a/spec/factories/staff_members.rb
+++ b/spec/factories/staff_members.rb
@@ -22,16 +22,16 @@
# index_staff_members_on_family_name_kana_and_given_name_kana (family_name_kana,given_name_kana)
#
-FactoryGirl.define do
+FactoryBot.define do
factory :staff_member do
sequence(:email) { |n| "meber#{n}@example.com" }
- family_name '山田'
- given_name '太郎'
- family_name_kana 'ヤマダ'
- given_name_kana 'タロウ'
- password 'pw'
+ family_name {'山田'}
+ given_name {'太郎'}
+ family_name_kana {'ヤマダ'}
+ given_name_kana {'タロウ'}
+ password {'pw'}
start_date { Date.yesterday }
- end_date nil
- suspended false
+ end_date {nil}
+ suspended {false}
end
end
diff --git a/spec/factories/tags.rb b/spec/factories/tags.rb
index 32a0e92..aa65ff9 100644
--- a/spec/factories/tags.rb
+++ b/spec/factories/tags.rb
@@ -12,7 +12,7 @@
# index_tags_on_value (value) UNIQUE
#
-FactoryGirl.define do
+FactoryBot.define do
factory :tag do
end
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index 52a3101..a0c868b 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -59,10 +59,10 @@ RSpec.configure do |config|
# arbitrary gems may also be filtered via:
# config.filter_gems_from_backtrace("gem name")
- config.include FactoryGirl::Syntax::Methods
+ config.include FactoryBot::Syntax::Methods
config.before(:suite) do
- FactoryGirl.reload
+ FactoryBot.reload
end
config.before(performance: true) do
コミット: ebe4e22¶
メッセージ¶
chore:Railsバージョンアップ
変更されたファイル¶
- M Gemfile
- M Gemfile.lock
- M db/schema.rb
変更内容¶
commit ebe4e2214d953e6c5a8d3d074f4e8ec4edc194b3
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 16:46:20 2025 +0900
chore:Railsバージョンアップ
diff --git a/Gemfile b/Gemfile
index 54118c4..677ed7b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,7 +8,7 @@ end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '~> 6.0.6.1'
+gem 'rails', '~> 6.1.7.10'
# Use mysql as the database for Active Record
gem 'pg'
# Use Puma as the app server
@@ -55,7 +55,6 @@ group :development do
gem 'spring-watcher-listen'
gem 'better_errors'
gem 'binding_of_caller'
- gem 'migration_comments'
gem 'annotate'
gem 'i18n_generators'
gem 'yard'
diff --git a/Gemfile.lock b/Gemfile.lock
index fa54609..f1822a7 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,61 +1,65 @@
GEM
remote: https://rubygems.org/
specs:
- actioncable (6.0.6.1)
- actionpack (= 6.0.6.1)
+ actioncable (6.1.7.10)
+ actionpack (= 6.1.7.10)
+ activesupport (= 6.1.7.10)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailbox (6.0.6.1)
- actionpack (= 6.0.6.1)
- activejob (= 6.0.6.1)
- activerecord (= 6.0.6.1)
- activestorage (= 6.0.6.1)
- activesupport (= 6.0.6.1)
+ actionmailbox (6.1.7.10)
+ actionpack (= 6.1.7.10)
+ activejob (= 6.1.7.10)
+ activerecord (= 6.1.7.10)
+ activestorage (= 6.1.7.10)
+ activesupport (= 6.1.7.10)
mail (>= 2.7.1)
- actionmailer (6.0.6.1)
- actionpack (= 6.0.6.1)
- actionview (= 6.0.6.1)
- activejob (= 6.0.6.1)
+ actionmailer (6.1.7.10)
+ actionpack (= 6.1.7.10)
+ actionview (= 6.1.7.10)
+ activejob (= 6.1.7.10)
+ activesupport (= 6.1.7.10)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (6.0.6.1)
- actionview (= 6.0.6.1)
- activesupport (= 6.0.6.1)
- rack (~> 2.0, >= 2.0.8)
+ actionpack (6.1.7.10)
+ actionview (= 6.1.7.10)
+ activesupport (= 6.1.7.10)
+ rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actiontext (6.0.6.1)
- actionpack (= 6.0.6.1)
- activerecord (= 6.0.6.1)
- activestorage (= 6.0.6.1)
- activesupport (= 6.0.6.1)
+ actiontext (6.1.7.10)
+ actionpack (= 6.1.7.10)
+ activerecord (= 6.1.7.10)
+ activestorage (= 6.1.7.10)
+ activesupport (= 6.1.7.10)
nokogiri (>= 1.8.5)
- actionview (6.0.6.1)
- activesupport (= 6.0.6.1)
+ actionview (6.1.7.10)
+ activesupport (= 6.1.7.10)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
- activejob (6.0.6.1)
- activesupport (= 6.0.6.1)
+ activejob (6.1.7.10)
+ activesupport (= 6.1.7.10)
globalid (>= 0.3.6)
- activemodel (6.0.6.1)
- activesupport (= 6.0.6.1)
- activerecord (6.0.6.1)
- activemodel (= 6.0.6.1)
- activesupport (= 6.0.6.1)
- activestorage (6.0.6.1)
- actionpack (= 6.0.6.1)
- activejob (= 6.0.6.1)
- activerecord (= 6.0.6.1)
+ activemodel (6.1.7.10)
+ activesupport (= 6.1.7.10)
+ activerecord (6.1.7.10)
+ activemodel (= 6.1.7.10)
+ activesupport (= 6.1.7.10)
+ activestorage (6.1.7.10)
+ actionpack (= 6.1.7.10)
+ activejob (= 6.1.7.10)
+ activerecord (= 6.1.7.10)
+ activesupport (= 6.1.7.10)
marcel (~> 1.0)
- activesupport (6.0.6.1)
+ mini_mime (>= 1.1.0)
+ activesupport (6.1.7.10)
concurrent-ruby (~> 1.0, >= 1.0.2)
- i18n (>= 0.7, < 2)
- minitest (~> 5.1)
- tzinfo (~> 1.1)
- zeitwerk (~> 2.2, >= 2.2.2)
+ i18n (>= 1.6, < 2)
+ minitest (>= 5.1)
+ tzinfo (~> 2.0)
+ zeitwerk (~> 2.3)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
annotate (3.2.0)
@@ -78,9 +82,9 @@ GEM
sassc (>= 2.0.0)
bootstrap3-datetimepicker-rails (4.17.47)
momentjs-rails (>= 2.8.1)
- bootstrap_form (5.2.3)
- actionpack (>= 6.0)
- activemodel (>= 6.0)
+ bootstrap_form (5.4.0)
+ actionpack (>= 6.1)
+ activemodel (>= 6.1)
builder (3.3.0)
byebug (12.0.0)
capybara (3.40.0)
@@ -127,10 +131,10 @@ GEM
debase-ruby_core_source (3.4.1)
debug_inspector (1.2.0)
diff-lcs (1.6.2)
- dotenv (2.8.1)
- dotenv-rails (2.8.1)
- dotenv (= 2.8.1)
- railties (>= 3.2)
+ dotenv (3.1.8)
+ dotenv-rails (3.1.8)
+ dotenv (= 3.1.8)
+ railties (>= 6.1)
drb (2.2.3)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
@@ -153,8 +157,8 @@ GEM
font-awesome-rails (4.7.0.9)
railties (>= 3.2, < 9.0)
formatador (1.1.0)
- globalid (1.1.0)
- activesupport (>= 5.0)
+ globalid (1.2.1)
+ activesupport (>= 6.1)
guard (2.19.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
@@ -220,8 +224,6 @@ GEM
marcel (1.0.4)
matrix (0.4.2)
method_source (1.1.0)
- migration_comments (0.4.1)
- activerecord (>= 4.2.0)
mini_mime (1.1.5)
minitest (5.25.5)
momentjs-rails (2.29.4.1)
@@ -277,20 +279,20 @@ GEM
rack (< 3)
rack-test (2.2.0)
rack (>= 1.3)
- rails (6.0.6.1)
- actioncable (= 6.0.6.1)
- actionmailbox (= 6.0.6.1)
- actionmailer (= 6.0.6.1)
- actionpack (= 6.0.6.1)
- actiontext (= 6.0.6.1)
- actionview (= 6.0.6.1)
- activejob (= 6.0.6.1)
- activemodel (= 6.0.6.1)
- activerecord (= 6.0.6.1)
- activestorage (= 6.0.6.1)
- activesupport (= 6.0.6.1)
- bundler (>= 1.3.0)
- railties (= 6.0.6.1)
+ rails (6.1.7.10)
+ actioncable (= 6.1.7.10)
+ actionmailbox (= 6.1.7.10)
+ actionmailer (= 6.1.7.10)
+ actionpack (= 6.1.7.10)
+ actiontext (= 6.1.7.10)
+ actionview (= 6.1.7.10)
+ activejob (= 6.1.7.10)
+ activemodel (= 6.1.7.10)
+ activerecord (= 6.1.7.10)
+ activestorage (= 6.1.7.10)
+ activesupport (= 6.1.7.10)
+ bundler (>= 1.15.0)
+ railties (= 6.1.7.10)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
@@ -313,12 +315,12 @@ GEM
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
- railties (6.0.6.1)
- actionpack (= 6.0.6.1)
- activesupport (= 6.0.6.1)
+ railties (6.1.7.10)
+ actionpack (= 6.1.7.10)
+ activesupport (= 6.1.7.10)
method_source
- rake (>= 0.8.7)
- thor (>= 0.20.3, < 2.0)
+ rake (>= 12.2)
+ thor (~> 1.0)
rake (13.3.0)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
@@ -334,14 +336,14 @@ GEM
rspec-mocks (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
- rspec-rails (5.1.2)
- actionpack (>= 5.2)
- activesupport (>= 5.2)
- railties (>= 5.2)
- rspec-core (~> 3.10)
- rspec-expectations (~> 3.10)
- rspec-mocks (~> 3.10)
- rspec-support (~> 3.10)
+ rspec-rails (6.1.5)
+ actionpack (>= 6.1)
+ activesupport (>= 6.1)
+ railties (>= 6.1)
+ rspec-core (~> 3.13)
+ rspec-expectations (~> 3.13)
+ rspec-mocks (~> 3.13)
+ rspec-support (~> 3.13)
rspec-support (3.13.4)
ruby-graphviz (1.2.5)
rexml
@@ -375,22 +377,21 @@ GEM
concurrent-ruby (~> 1.0)
logger
rack (>= 2.2.4, < 4)
- sprockets-rails (3.4.2)
- actionpack (>= 5.2)
- activesupport (>= 5.2)
+ sprockets-rails (3.5.2)
+ actionpack (>= 6.1)
+ activesupport (>= 6.1)
sprockets (>= 3.0.0)
tag-it-rails (2.0.0)
jquery-ui-rails
railties
thor (1.3.2)
- thread_safe (0.3.6)
tilt (2.6.0)
timeout (0.4.3)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
- tzinfo (1.2.11)
- thread_safe (~> 0.1)
+ tzinfo (2.0.6)
+ concurrent-ruby (~> 1.0)
tzinfo-data (1.2025.2)
tzinfo (>= 1.0.0)
uglifier (4.2.1)
@@ -457,7 +458,6 @@ DEPENDENCIES
kaminari
launchy
listen
- migration_comments
momentjs-rails
mutex_m
mysql2
@@ -468,7 +468,7 @@ DEPENDENCIES
puma
rack-dev-mark
rack-livereload
- rails (~> 6.0.6.1)
+ rails (~> 6.1.7.10)
rails-controller-testing
rails-erd
rails_12factor
diff --git a/db/schema.rb b/db/schema.rb
index 443ef64..80ee82c 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -2,8 +2,8 @@
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
-# This file is the source Rails uses to define your schema when running `rails
-# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
+# This file is the source Rails uses to define your schema when running `bin/rails
+# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
@@ -12,7 +12,7 @@
ActiveRecord::Schema.define(version: 2017_03_27_081649) do
- create_table "addresses", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "住所", force: :cascade do |t|
+ create_table "addresses", id: :integer, charset: "utf8mb3", comment: "住所", force: :cascade do |t|
t.integer "customer_id", null: false, comment: "顧客への外部キー"
t.string "type", null: false, comment: "継承カラム"
t.string "postal_code", null: false, comment: "郵便番号"
@@ -33,7 +33,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["type", "prefecture", "city"], name: "index_addresses_on_type_and_prefecture_and_city"
end
- create_table "administrators", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "管理者", force: :cascade do |t|
+ create_table "administrators", id: :integer, charset: "utf8mb3", comment: "管理者", force: :cascade do |t|
t.string "email", null: false, comment: "メールアドレス"
t.string "email_for_index", null: false, comment: "索引用メールアドレス"
t.string "hashed_password", comment: "パスワード"
@@ -43,7 +43,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["email_for_index"], name: "index_administrators_on_email_for_index", unique: true
end
- create_table "allowed_sources", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "IPアドレス制限", force: :cascade do |t|
+ create_table "allowed_sources", id: :integer, charset: "utf8mb3", comment: "IPアドレス制限", force: :cascade do |t|
t.string "namespace", null: false, comment: "名前空間"
t.integer "octet1", null: false, comment: "第1オクテット"
t.integer "octet2", null: false, comment: "第2オクテット"
@@ -55,7 +55,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["namespace", "octet1", "octet2", "octet3", "octet4"], name: "index_allowed_sources_on_namespace_and_octets", unique: true
end
- create_table "customers", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "顧客", force: :cascade do |t|
+ create_table "customers", id: :integer, charset: "utf8mb3", comment: "顧客", force: :cascade do |t|
t.string "email", null: false, comment: "メールアドレス"
t.string "email_for_index", null: false, comment: "顧客用メールアドレス"
t.string "family_name", null: false, comment: "姓"
@@ -84,7 +84,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["given_name_kana"], name: "index_customers_on_given_name_kana"
end
- create_table "entries", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "申し込み", force: :cascade do |t|
+ create_table "entries", id: :integer, charset: "utf8mb3", comment: "申し込み", force: :cascade do |t|
t.integer "program_id", null: false
t.integer "customer_id", null: false
t.boolean "approved", default: false, null: false, comment: "承認済みフラグ"
@@ -96,7 +96,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["program_id"], name: "index_entries_on_program_id"
end
- create_table "hash_locks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "排他制御", force: :cascade do |t|
+ create_table "hash_locks", id: :integer, charset: "utf8mb3", comment: "排他制御", force: :cascade do |t|
t.string "table", null: false, comment: "テーブル"
t.string "column", null: false, comment: "カラム"
t.string "key", null: false, comment: "キー"
@@ -105,7 +105,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["table", "column", "key"], name: "index_hash_locks_on_table_and_column_and_key", unique: true
end
- create_table "message_tag_links", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "タグリンクテーブル", force: :cascade do |t|
+ create_table "message_tag_links", id: :integer, charset: "utf8mb3", comment: "タグリンクテーブル", force: :cascade do |t|
t.integer "message_id", null: false
t.integer "tag_id", null: false
t.index ["message_id", "tag_id"], name: "index_message_tag_links_on_message_id_and_tag_id", unique: true
@@ -113,7 +113,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["tag_id"], name: "index_message_tag_links_on_tag_id"
end
- create_table "messages", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "問い合わせ", force: :cascade do |t|
+ create_table "messages", id: :integer, charset: "utf8mb3", comment: "問い合わせ", force: :cascade do |t|
t.integer "customer_id", null: false
t.integer "staff_member_id"
t.integer "root_id", comment: "Messageへの外部キー"
@@ -138,7 +138,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["type", "staff_member_id"], name: "index_messages_on_type_and_staff_member_id"
end
- create_table "phones", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "電話", force: :cascade do |t|
+ create_table "phones", id: :integer, charset: "utf8mb3", comment: "電話", force: :cascade do |t|
t.integer "customer_id", null: false, comment: "顧客への外部キー"
t.integer "address_id", comment: "住所への外部キー"
t.string "number", null: false, comment: "電話番号"
@@ -153,7 +153,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["number_for_index"], name: "index_phones_on_number_for_index"
end
- create_table "programs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "プログラム", force: :cascade do |t|
+ create_table "programs", id: :integer, charset: "utf8mb3", comment: "プログラム", force: :cascade do |t|
t.integer "registrant_id", null: false, comment: "登録職員(外部キー)"
t.string "title", null: false, comment: "タイトル"
t.text "description", comment: "説明"
@@ -167,7 +167,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["registrant_id"], name: "index_programs_on_registrant_id"
end
- create_table "staff_events", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "職員イベント", force: :cascade do |t|
+ create_table "staff_events", id: :integer, charset: "utf8mb3", comment: "職員イベント", force: :cascade do |t|
t.integer "staff_member_id", null: false, comment: "職員レコードへの外部キー"
t.string "type", null: false, comment: "イベントタイプ"
t.datetime "created_at", null: false, comment: "発生時刻"
@@ -176,7 +176,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["staff_member_id"], name: "index_staff_events_on_staff_member_id"
end
- create_table "staff_members", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "職員", force: :cascade do |t|
+ create_table "staff_members", id: :integer, charset: "utf8mb3", comment: "職員", force: :cascade do |t|
t.string "email", null: false, comment: "メールアドレス"
t.string "email_for_index", null: false, comment: "索引用メールアドレス"
t.string "family_name", null: false, comment: "姓"
@@ -193,7 +193,7 @@ ActiveRecord::Schema.define(version: 2017_03_27_081649) do
t.index ["family_name_kana", "given_name_kana"], name: "index_staff_members_on_family_name_kana_and_given_name_kana"
end
- create_table "tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "タグ", force: :cascade do |t|
+ create_table "tags", id: :integer, charset: "utf8mb3", comment: "タグ", force: :cascade do |t|
t.string "value", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
コミット: 3cda480¶
メッセージ¶
chore:Rubyバージョンアップ
変更されたファイル¶
- M .ruby-version
- M Dockerfile
- M Gemfile
- M Gemfile.lock
- M config/database.yml
変更内容¶
commit 3cda480db2ea8a6fe4500bdbd57a92f5165e1c84
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 16:36:26 2025 +0900
chore:Rubyバージョンアップ
diff --git a/.ruby-version b/.ruby-version
index 6a81b4c..f989260 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-2.7.8
+3.4.4
diff --git a/Dockerfile b/Dockerfile
index 156e901..17ff930 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,82 +1,146 @@
-FROM ubuntu:18.04
+# ベースイメージとして Ubuntu 22.04 を使用
+FROM ubuntu:22.04 AS base
-# Setup locale
-RUN \
-apt-get -yq update && \
-apt-get install -y language-pack-ja-base language-pack-ja
-RUN update-locale LANG=ja_JP.UTF-8 LANGUAGE=ja_JP:ja
-ENV LANG=ja_JP.UTF-8
-ENV LC_ALL=ja_JP.UTF-8
-ENV LC_CTYPE=ja_JP.UTF-8
+# 環境変数の設定
+ENV DEBIAN_FRONTEND=noninteractive \
+ LANG=ja_JP.UTF-8 \
+ LC_ALL=ja_JP.UTF-8 \
+ LC_CTYPE=ja_JP.UTF-8 \
+ RUBY_VER=3.4.4 \
+ BUNDLER_VER=2.6.7 \
+ NODE_VER=16 \
+ PACKER_VERSION=1.9.2 \
+ TERRAFORM_VERSION=1.6.6
+# ロケールのセットアップ
+RUN apt-get update && apt-get install -y \
+ language-pack-ja-base \
+ language-pack-ja \
+ && update-locale LANG=ja_JP.UTF-8 LANGUAGE=ja_JP:ja \
+ && rm -rf /var/lib/apt/lists/*
+
+# 基本的なパッケージのインストール
+ RUN apt-get update && \
+ apt-get install -y \
+ sudo \
+ build-essential \
+ zip \
+ unzip \
+ git \
+ curl \
+ wget \
+ git-core \
+ libssl-dev \
+ libc6-dev \
+ automake \
+ libtool \
+ libyaml-dev \
+ zlib1g \
+ zlib1g-dev \
+ openssl \
+ libreadline-dev \
+ libxml2-dev \
+ libxslt1-dev \
+ libncurses5-dev \
+ pkg-config \
+ chrpath \
+ libfontconfig1-dev \
+ libxft-dev \
+ libpq-dev \
+ libsqlite3-dev \
+ default-mysql-client \
+ postgresql-client \
+ xvfb \
+ qtbase5-dev \
+ libqt5webkit5-dev \
+ xauth \
+ libcurl4-openssl-dev \
+ software-properties-common \
+ libffi-dev \
+ libgdbm-dev \
+ libdb-dev \
+ lsof \
+ default-libmysqlclient-dev \
+ ansible \
+ rsync \
+ vim \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/*
+
+# Rubyのインストール
+RUN git clone https://github.com/sstephenson/rbenv ~/.rbenv \
+ && git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build \
+ && ~/.rbenv/plugins/ruby-build/install.sh \
+ && echo 'export PATH="/$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc \
+ && echo 'eval "$(rbenv init -)"' >> ~/.bashrc \
+ && . ~/.bashrc \
+ && rbenv install $RUBY_VER \
+ && rbenv global $RUBY_VER
+
+# Node.jsのインストール
+RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
+ && apt-get install -y nodejs \
+ && npm install -g yarn \
+ && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash \
+ && . $HOME/.nvm/nvm.sh \
+ && nvm install $NODE_VER \
+ && nvm use $NODE_VER
+
+# pipの更新とAWSツールのインストール
RUN apt-get update && \
apt-get install -y \
- sudo \
- build-essential \
- zip \
- unzip \
- git \
- curl \
- wget \
- git-core \
- libssl-dev \
- libqt4-dev \
- libc6-dev \
- automake \
- libtool \
- libyaml-dev \
- zlib1g \
- zlib1g-dev \
- openssl \
- libreadline-dev \
- libxml2-dev \
- libxslt1-dev \
- libncurses5-dev \
- pkg-config \
- chrpath \
- libfontconfig1-dev \
- libxft-dev \
- libpq-dev \
- libsqlite3-dev \
- libmysqlclient-dev \
- default-mysql-client \
- postgresql-client \
- xvfb \
- qtbase5-dev \
- libqt5webkit5-dev \
- libqtwebkit-dev \
- xauth \
- libcurl4-openssl-dev \
- software-properties-common \
- libffi-dev \
- libgdbm5 \
- libgdbm-dev \
- libdb-dev \
- lsof \
- vim
+ python3-pip \
+ python3-dev \
+ python3-venv \
+ virtualenv \
+ build-essential \
+ git \
+ unzip \
+ && \
+ ln -sf /usr/bin/python3 /usr/bin/python && \
+ pip3 install --no-cache-dir --upgrade pip virtualenv && \
+ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
+ unzip awscliv2.zip && \
+ ./aws/install && \
+ rm -rf awscliv2.zip aws && \
+ git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git && \
+ cd aws-elastic-beanstalk-cli-setup && \
+ python3 ./scripts/ebcli_installer.py && \
+ echo 'export PATH="/root/.ebcli-virtual-env/executables:$PATH"' >> /root/.bashrc && \
+ rm -rf aws-elastic-beanstalk-cli-setup && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+
+# PATHの設定
+ENV PATH="/root/.ebcli-virtual-env/executables:$PATH"
+
+# HashiCorpツールのインストール
+RUN curl -fsSL https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip -o packer.zip \
+ && unzip packer.zip -d /usr/local/bin \
+ && rm packer.zip \
+ && curl -fsSL https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -o terraform.zip \
+ && unzip terraform.zip -d /usr/local/bin \
+ && rm terraform.zip
+
+# EasyRSAのセットアップ
+RUN mkdir -p /home/vscode/easy-rsa \
+ && useradd -m vscode || true \
+ && wget -qO- https://github.com/OpenVPN/easy-rsa/releases/download/v3.1.5/EasyRSA-3.1.5.tgz | tar xz -C /home/vscode/easy-rsa/ --strip-components=1 \
+ && chown -R vscode:vscode /home/vscode/easy-rsa \
+ && chmod -R 755 /home/vscode/easy-rsa
-# Ruby
-ENV RUBY_VER 2.7.8
-ENV BUNDLER_VER 2.1.4
-RUN rm -rf ~/.rbenv
-RUN git clone https://github.com/sstephenson/rbenv ~/.rbenv
-RUN git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
-RUN ~/.rbenv/plugins/ruby-build/install.sh
-RUN echo 'export PATH="/$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
-RUN echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
-RUN . ~/.bash_profile && \
- rbenv install $RUBY_VER && \
- rbenv global $RUBY_VER
-ENV PATH ~/.rbenv/shims:$PATH
-RUN ~/.rbenv/shims/gem install bundler:$BUNDLER_VER
+# ヘルパースクリプトの追加
+COPY --chmod=755 <<EOF /usr/local/bin/check-easyrsa
+#!/bin/bash
+echo "Checking for EasyRSA:"
+find /usr -name "easyrsa" -type f
+echo ""
+echo "Checking for OpenSSL configs:"
+find /usr -name "openssl-*.cnf"
+EOF
-# Node
-ENV NODE_VER 16
-RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
-RUN . $HOME/.nvm/nvm.sh && \
- nvm install $NODE_VER && \
- nvm use $NODE_VER && \
- node -v && npm -v && \
- npm i -g yarn
-RUN apt install -y nodejs
+# パスの設定
+ENV PATH="/root/.rbenv/shims:$PATH"
+# 作業ディレクトリの設定
+WORKDIR /srv
diff --git a/Gemfile b/Gemfile
index 8d76ee1..54118c4 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,5 @@
source 'https://rubygems.org'
-ruby '2.7.8'
+ruby '3.4.4'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
@@ -95,4 +95,14 @@ gem 'momentjs-rails'
gem 'bootstrap3-datetimepicker-rails'
gem 'tag-it-rails'
gem 'ffi', '~> 1.15.5'
-gem 'concurrent-ruby', '1.3.4'
\ No newline at end of file
+gem 'concurrent-ruby', '1.3.4'
+# Ruby 3.4対応(標準ライブラリから削除されたgem)
+gem 'webrick'
+gem 'observer'
+gem 'mutex_m'
+gem 'bigdecimal'
+gem 'drb'
+gem 'ostruct'
+gem 'base64'
+gem 'csv'
+gem 'nkf'
\ No newline at end of file
diff --git a/Gemfile.lock b/Gemfile.lock
index 62319f4..fa54609 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -69,6 +69,7 @@ GEM
erubi (>= 1.0.0)
rack (>= 0.9.0)
rouge (>= 1.0.0)
+ bigdecimal (3.2.2)
bindex (0.8.1)
binding_of_caller (1.0.1)
debug_inspector (>= 1.2.0)
@@ -77,16 +78,16 @@ GEM
sassc (>= 2.0.0)
bootstrap3-datetimepicker-rails (4.17.47)
momentjs-rails (>= 2.8.1)
- bootstrap_form (5.1.0)
- actionpack (>= 5.2)
- activemodel (>= 5.2)
+ bootstrap_form (5.2.3)
+ actionpack (>= 6.0)
+ activemodel (>= 6.0)
builder (3.3.0)
- byebug (11.1.3)
- capybara (3.39.2)
+ byebug (12.0.0)
+ capybara (3.40.0)
addressable
matrix
mini_mime (>= 0.1.3)
- nokogiri (~> 1.8)
+ nokogiri (~> 1.11)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
@@ -110,6 +111,7 @@ GEM
coffee-script-source (1.12.2)
concurrent-ruby (1.3.4)
crass (1.0.6)
+ csv (3.3.5)
database_cleaner (2.1.0)
database_cleaner-active_record (>= 2, < 3)
database_cleaner-active_record (2.2.1)
@@ -129,6 +131,7 @@ GEM
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
+ drb (2.2.3)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
@@ -144,7 +147,7 @@ GEM
factory_girl_rails (4.9.0)
factory_girl (~> 4.9.0)
railties (>= 3.0.0)
- faker (3.4.2)
+ faker (3.5.1)
i18n (>= 1.8.11, < 2)
ffi (1.15.5)
font-awesome-rails (4.7.0.9)
@@ -220,14 +223,14 @@ GEM
migration_comments (0.4.1)
activerecord (>= 4.2.0)
mini_mime (1.1.5)
- mini_portile2 (2.8.9)
minitest (5.25.5)
momentjs-rails (2.29.4.1)
railties (>= 3.1)
multi_json (1.15.0)
+ mutex_m (0.3.0)
mysql2 (0.5.6)
nenv (0.3.0)
- net-imap (0.4.22)
+ net-imap (0.5.8)
date
net-protocol
net-pop (0.1.2)
@@ -237,18 +240,33 @@ GEM
net-smtp (0.5.1)
net-protocol
nio4r (2.7.4)
- nokogiri (1.15.7)
- mini_portile2 (~> 2.8.2)
+ nkf (0.2.0)
+ nokogiri (1.18.8-aarch64-linux-gnu)
+ racc (~> 1.4)
+ nokogiri (1.18.8-aarch64-linux-musl)
+ racc (~> 1.4)
+ nokogiri (1.18.8-arm-linux-gnu)
+ racc (~> 1.4)
+ nokogiri (1.18.8-arm-linux-musl)
+ racc (~> 1.4)
+ nokogiri (1.18.8-arm64-darwin)
+ racc (~> 1.4)
+ nokogiri (1.18.8-x86_64-darwin)
+ racc (~> 1.4)
+ nokogiri (1.18.8-x86_64-linux-gnu)
+ racc (~> 1.4)
+ nokogiri (1.18.8-x86_64-linux-musl)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
+ observer (0.1.2)
ostruct (0.6.1)
pg (1.5.9)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
- public_suffix (5.1.1)
+ public_suffix (6.0.2)
puma (6.6.0)
nio4r (~> 2.0)
racc (1.8.1)
@@ -338,12 +356,14 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
- selenium-webdriver (4.9.0)
+ selenium-webdriver (4.33.0)
+ base64 (~> 0.2)
+ logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
shellany (0.0.1)
- shoulda-matchers (5.3.0)
+ shoulda-matchers (6.5.0)
activesupport (>= 5.2.0)
spring (4.3.0)
spring-commands-rspec (1.0.4)
@@ -380,6 +400,7 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
+ webrick (1.9.1)
websocket (1.2.11)
websocket-driver (0.8.0)
base64
@@ -388,15 +409,24 @@ GEM
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.37)
- zeitwerk (2.6.18)
+ zeitwerk (2.7.3)
PLATFORMS
- ruby
+ aarch64-linux-gnu
+ aarch64-linux-musl
+ arm-linux-gnu
+ arm-linux-musl
+ arm64-darwin
+ x86_64-darwin
+ x86_64-linux-gnu
+ x86_64-linux-musl
DEPENDENCIES
annotate
+ base64
bcrypt
better_errors
+ bigdecimal
binding_of_caller
bootstrap-sass
bootstrap3-datetimepicker-rails
@@ -407,10 +437,12 @@ DEPENDENCIES
capybara-webkit
coffee-rails
concurrent-ruby (= 1.3.4)
+ csv
database_cleaner
date_validator
debase
dotenv-rails
+ drb
email_validator
enum_help
factory_girl_rails
@@ -427,7 +459,11 @@ DEPENDENCIES
listen
migration_comments
momentjs-rails
+ mutex_m
mysql2
+ nkf
+ observer
+ ostruct
pg
puma
rack-dev-mark
@@ -448,10 +484,11 @@ DEPENDENCIES
tzinfo-data
uglifier
web-console
+ webrick
yard
RUBY VERSION
- ruby 2.7.8p225
+ ruby 3.4.4p34
BUNDLED WITH
- 2.1.4
+ 2.6.7
diff --git a/config/database.yml b/config/database.yml
index 11c63ba..1b2c8a0 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -9,7 +9,8 @@
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.7/en/old-client.html
#
-default: &default
+
+development:
adapter: mysql2
encoding: utf8
collation: utf8_general_ci
@@ -17,16 +18,19 @@ default: &default
username: root
password: password
host: <%= ENV.fetch("MYSQL_HOST", "127.0.0.1") %>
-
-development:
- <<: *default
database: baukis-kai_development
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
- <<: *default
+ adapter: mysql2
+ encoding: utf8
+ collation: utf8_general_ci
+ pool: 5
+ username: root
+ password: password
+ host: <%= ENV.fetch("MYSQL_HOST", "127.0.0.1") %>
database: baukis-kai_test
# As with config/secrets.yml, you never want to store sensitive information,
コミット: 0e634ac¶
メッセージ¶
chore:Railsバージョンアップ
変更されたファイル¶
- M Gemfile
- M Gemfile.lock
- M bin/rails
- M bin/rake
- M bin/setup
- M config/application.rb
- M config/cable.yml
- M config/environments/development.rb
- M config/environments/production.rb
- M config/environments/test.rb
- M config/initializers/application_controller_renderer.rb
- M config/initializers/assets.rb
- A config/initializers/content_security_policy.rb
- M config/initializers/new_framework_defaults.rb
- M config/locales/en.yml
- M config/puma.rb
- M config/spring.rb
- A config/storage.yml
- M db/migrate/20170214071011_create_programs.rb
- M db/migrate/20170318002915_create_messages.rb
- M db/schema.rb
変更内容¶
commit 0e634aca01ba16314639a683427a0c5d29584e85
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 16:10:52 2025 +0900
chore:Railsバージョンアップ
diff --git a/Gemfile b/Gemfile
index 6f27f2f..8d76ee1 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,7 +8,7 @@ end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '~> 5.0.1'
+gem 'rails', '~> 6.0.6.1'
# Use mysql as the database for Active Record
gem 'pg'
# Use Puma as the app server
@@ -94,4 +94,5 @@ gem 'jquery-ui-rails'
gem 'momentjs-rails'
gem 'bootstrap3-datetimepicker-rails'
gem 'tag-it-rails'
-gem 'ffi', '~> 1.15.5'
\ No newline at end of file
+gem 'ffi', '~> 1.15.5'
+gem 'concurrent-ruby', '1.3.4'
\ No newline at end of file
diff --git a/Gemfile.lock b/Gemfile.lock
index 94c0bd0..62319f4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,51 +1,69 @@
GEM
remote: https://rubygems.org/
specs:
- actioncable (5.0.7.2)
- actionpack (= 5.0.7.2)
- nio4r (>= 1.2, < 3.0)
- websocket-driver (~> 0.6.1)
- actionmailer (5.0.7.2)
- actionpack (= 5.0.7.2)
- actionview (= 5.0.7.2)
- activejob (= 5.0.7.2)
+ actioncable (6.0.6.1)
+ actionpack (= 6.0.6.1)
+ nio4r (~> 2.0)
+ websocket-driver (>= 0.6.1)
+ actionmailbox (6.0.6.1)
+ actionpack (= 6.0.6.1)
+ activejob (= 6.0.6.1)
+ activerecord (= 6.0.6.1)
+ activestorage (= 6.0.6.1)
+ activesupport (= 6.0.6.1)
+ mail (>= 2.7.1)
+ actionmailer (6.0.6.1)
+ actionpack (= 6.0.6.1)
+ actionview (= 6.0.6.1)
+ activejob (= 6.0.6.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (5.0.7.2)
- actionview (= 5.0.7.2)
- activesupport (= 5.0.7.2)
- rack (~> 2.0)
- rack-test (~> 0.6.3)
+ actionpack (6.0.6.1)
+ actionview (= 6.0.6.1)
+ activesupport (= 6.0.6.1)
+ rack (~> 2.0, >= 2.0.8)
+ rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (5.0.7.2)
- activesupport (= 5.0.7.2)
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
+ actiontext (6.0.6.1)
+ actionpack (= 6.0.6.1)
+ activerecord (= 6.0.6.1)
+ activestorage (= 6.0.6.1)
+ activesupport (= 6.0.6.1)
+ nokogiri (>= 1.8.5)
+ actionview (6.0.6.1)
+ activesupport (= 6.0.6.1)
builder (~> 3.1)
- erubis (~> 2.7.0)
+ erubi (~> 1.4)
rails-dom-testing (~> 2.0)
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
- activejob (5.0.7.2)
- activesupport (= 5.0.7.2)
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
+ activejob (6.0.6.1)
+ activesupport (= 6.0.6.1)
globalid (>= 0.3.6)
- activemodel (5.0.7.2)
- activesupport (= 5.0.7.2)
- activerecord (5.0.7.2)
- activemodel (= 5.0.7.2)
- activesupport (= 5.0.7.2)
- arel (~> 7.0)
- activesupport (5.0.7.2)
+ activemodel (6.0.6.1)
+ activesupport (= 6.0.6.1)
+ activerecord (6.0.6.1)
+ activemodel (= 6.0.6.1)
+ activesupport (= 6.0.6.1)
+ activestorage (6.0.6.1)
+ actionpack (= 6.0.6.1)
+ activejob (= 6.0.6.1)
+ activerecord (= 6.0.6.1)
+ marcel (~> 1.0)
+ activesupport (6.0.6.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
+ zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
rake (>= 10.4, < 14.0)
- arel (7.1.4)
autoprefixer-rails (10.4.21.0)
execjs (~> 2)
+ base64 (0.3.0)
bcrypt (3.1.20)
better_errors (2.10.1)
erubi (>= 1.0.0)
@@ -59,9 +77,9 @@ GEM
sassc (>= 2.0.0)
bootstrap3-datetimepicker-rails (4.17.47)
momentjs-rails (>= 2.8.1)
- bootstrap_form (4.4.0)
- actionpack (>= 5.0)
- activemodel (>= 5.0)
+ bootstrap_form (5.1.0)
+ actionpack (>= 5.2)
+ activemodel (>= 5.2)
builder (3.3.0)
byebug (11.1.3)
capybara (3.39.2)
@@ -83,14 +101,14 @@ GEM
logger (~> 1.5)
choice (0.2.0)
coderay (1.1.3)
- coffee-rails (4.2.2)
+ coffee-rails (5.0.0)
coffee-script (>= 2.2.0)
- railties (>= 4.0.0)
+ railties (>= 5.2.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
- concurrent-ruby (1.3.5)
+ concurrent-ruby (1.3.4)
crass (1.0.6)
database_cleaner (2.1.0)
database_cleaner-active_record (>= 2, < 3)
@@ -119,7 +137,6 @@ GEM
enum_help (0.0.19)
activesupport (>= 3.0.0)
erubi (1.13.1)
- erubis (2.7.0)
eventmachine (1.2.7)
execjs (2.10.0)
factory_girl (4.9.0)
@@ -197,6 +214,7 @@ GEM
net-imap
net-pop
net-smtp
+ marcel (1.0.4)
matrix (0.4.2)
method_source (1.1.0)
migration_comments (0.4.1)
@@ -239,19 +257,22 @@ GEM
rack (>= 1.1, < 4.0)
rack-livereload (0.5.2)
rack (< 3)
- rack-test (0.6.3)
- rack (>= 1.0)
- rails (5.0.7.2)
- actioncable (= 5.0.7.2)
- actionmailer (= 5.0.7.2)
- actionpack (= 5.0.7.2)
- actionview (= 5.0.7.2)
- activejob (= 5.0.7.2)
- activemodel (= 5.0.7.2)
- activerecord (= 5.0.7.2)
- activesupport (= 5.0.7.2)
+ rack-test (2.2.0)
+ rack (>= 1.3)
+ rails (6.0.6.1)
+ actioncable (= 6.0.6.1)
+ actionmailbox (= 6.0.6.1)
+ actionmailer (= 6.0.6.1)
+ actionpack (= 6.0.6.1)
+ actiontext (= 6.0.6.1)
+ actionview (= 6.0.6.1)
+ activejob (= 6.0.6.1)
+ activemodel (= 6.0.6.1)
+ activerecord (= 6.0.6.1)
+ activestorage (= 6.0.6.1)
+ activesupport (= 6.0.6.1)
bundler (>= 1.3.0)
- railties (= 5.0.7.2)
+ railties (= 6.0.6.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
@@ -274,12 +295,12 @@ GEM
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
- railties (5.0.7.2)
- actionpack (= 5.0.7.2)
- activesupport (= 5.0.7.2)
+ railties (6.0.6.1)
+ actionpack (= 6.0.6.1)
+ activesupport (= 6.0.6.1)
method_source
rake (>= 0.8.7)
- thor (>= 0.18.1, < 2.0)
+ thor (>= 0.20.3, < 2.0)
rake (13.3.0)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
@@ -295,10 +316,10 @@ GEM
rspec-mocks (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
- rspec-rails (4.1.2)
- actionpack (>= 4.2)
- activesupport (>= 4.2)
- railties (>= 4.2)
+ rspec-rails (5.1.2)
+ actionpack (>= 5.2)
+ activesupport (>= 5.2)
+ railties (>= 5.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
@@ -322,8 +343,8 @@ GEM
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
shellany (0.0.1)
- shoulda-matchers (4.5.1)
- activesupport (>= 4.2.0)
+ shoulda-matchers (5.3.0)
+ activesupport (>= 5.2.0)
spring (4.3.0)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
@@ -334,9 +355,9 @@ GEM
concurrent-ruby (~> 1.0)
logger
rack (>= 2.2.4, < 4)
- sprockets-rails (3.2.2)
- actionpack (>= 4.0)
- activesupport (>= 4.0)
+ sprockets-rails (3.4.2)
+ actionpack (>= 5.2)
+ activesupport (>= 5.2)
sprockets (>= 3.0.0)
tag-it-rails (2.0.0)
jquery-ui-rails
@@ -354,18 +375,20 @@ GEM
tzinfo (>= 1.0.0)
uglifier (4.2.1)
execjs (>= 0.3.0, < 3)
- web-console (3.7.0)
- actionview (>= 5.0)
- activemodel (>= 5.0)
+ web-console (4.2.1)
+ actionview (>= 6.0.0)
+ activemodel (>= 6.0.0)
bindex (>= 0.4.0)
- railties (>= 5.0)
+ railties (>= 6.0.0)
websocket (1.2.11)
- websocket-driver (0.6.5)
+ websocket-driver (0.8.0)
+ base64
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.37)
+ zeitwerk (2.6.18)
PLATFORMS
ruby
@@ -383,6 +406,7 @@ DEPENDENCIES
capybara-screenshot
capybara-webkit
coffee-rails
+ concurrent-ruby (= 1.3.4)
database_cleaner
date_validator
debase
@@ -408,7 +432,7 @@ DEPENDENCIES
puma
rack-dev-mark
rack-livereload
- rails (~> 5.0.1)
+ rails (~> 6.0.6.1)
rails-controller-testing
rails-erd
rails_12factor
diff --git a/bin/rails b/bin/rails
index 5badb2f..0739660 100755
--- a/bin/rails
+++ b/bin/rails
@@ -1,9 +1,4 @@
#!/usr/bin/env ruby
-begin
- load File.expand_path('../spring', __FILE__)
-rescue LoadError => e
- raise unless e.message.include?('spring')
-end
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
diff --git a/bin/rake b/bin/rake
index d87d5f5..1724048 100755
--- a/bin/rake
+++ b/bin/rake
@@ -1,9 +1,4 @@
#!/usr/bin/env ruby
-begin
- load File.expand_path('../spring', __FILE__)
-rescue LoadError => e
- raise unless e.message.include?('spring')
-end
require_relative '../config/boot'
require 'rake'
Rake.application.run
diff --git a/bin/setup b/bin/setup
index e620b4d..0e39e8c 100755
--- a/bin/setup
+++ b/bin/setup
@@ -1,17 +1,16 @@
#!/usr/bin/env ruby
-require 'pathname'
require 'fileutils'
-include FileUtils
# path to your application root.
-APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+APP_ROOT = File.expand_path('..', __dir__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
end
-chdir APP_ROOT do
- # This script is a starting point to setup your application.
+FileUtils.chdir APP_ROOT do
+ # This script is a way to setup or update your development environment automatically.
+ # This script is idempotent, so that you can run it at anytime and get an expectable outcome.
# Add necessary setup steps to this file.
puts '== Installing dependencies =='
@@ -20,11 +19,11 @@ chdir APP_ROOT do
# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
- # cp 'config/database.yml.sample', 'config/database.yml'
+ # FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
# end
puts "\n== Preparing database =="
- system! 'bin/rails db:setup'
+ system! 'bin/rails db:prepare'
puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'
diff --git a/config/application.rb b/config/application.rb
index ed333f7..5d03c3b 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -8,8 +8,12 @@ Bundler.require(*Rails.groups)
module BaukisKai
class Application < Rails::Application
+ # Initialize configuration defaults for originally generated Rails version.
+ config.load_defaults 5.0
+
# Settings in config/environments/* take precedence over those specified here.
- # Application configuration should go into files in config/initializers
- # -- all .rb files in that directory are automatically loaded.
+ # Application configuration can go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded after loading
+ # the framework and any gems in your application.
end
end
diff --git a/config/cable.yml b/config/cable.yml
index 0bbde6f..9d9d3e8 100644
--- a/config/cable.yml
+++ b/config/cable.yml
@@ -2,8 +2,9 @@ development:
adapter: async
test:
- adapter: async
+ adapter: test
production:
adapter: redis
- url: redis://localhost:6379/1
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
+ channel_prefix: baukis_kai_production
diff --git a/config/environments/development.rb b/config/environments/development.rb
index cfacff4..bdae036 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -13,12 +13,14 @@ Rails.application.configure do
config.consider_all_requests_local = true
# Enable/disable caching. By default caching is disabled.
- if Rails.root.join('tmp/caching-dev.txt').exist?
+ # Run rails dev:cache to toggle caching.
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
config.action_controller.perform_caching = true
+ config.action_controller.enable_fragment_cache_logging = true
config.cache_store = :memory_store
config.public_file_server.headers = {
- 'Cache-Control' => 'public, max-age=172800'
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false
@@ -26,6 +28,9 @@ Rails.application.configure do
config.cache_store = :null_store
end
+ # Store uploaded files on the local file system (see config/storage.yml for options).
+ config.active_storage.service = :local
+
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
@@ -37,6 +42,9 @@ Rails.application.configure do
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
+ # Highlight code that triggered database queries in logs.
+ config.active_record.verbose_query_logs = true
+
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
@@ -45,7 +53,7 @@ Rails.application.configure do
# Suppress logger output for asset requests.
config.assets.quiet = true
- # Raises error for missing translations
+ # Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
# Use an evented file watcher to asynchronously detect changes in source code,
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 5e2244c..b83848e 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -14,19 +14,20 @@ Rails.application.configure do
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
+ # config.require_master_key = true
+
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
- # Compress JavaScripts and CSS.
- config.assets.js_compressor = :uglifier
+ # Compress CSS using a preprocessor.
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
@@ -34,7 +35,10 @@ Rails.application.configure do
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
- # Mount Action Cable outside main process or domain
+ # Store uploaded files on the local file system (see config/storage.yml for options).
+ config.active_storage.service = :local
+
+ # Mount Action Cable outside main process or domain.
# config.action_cable.mount_path = nil
# config.action_cable.url = 'wss://example.com/cable'
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
@@ -52,9 +56,10 @@ Rails.application.configure do
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
- # Use a real queuing backend for Active Job (and separate queues per environment)
+ # Use a real queuing backend for Active Job (and separate queues per environment).
# config.active_job.queue_adapter = :resque
- # config.active_job.queue_name_prefix = "baukis-kai_#{Rails.env}"
+ # config.active_job.queue_name_prefix = "baukis_kai_production"
+
config.action_mailer.perform_caching = false
# Ignore bad email addresses and do not raise email delivery errors.
@@ -78,7 +83,7 @@ Rails.application.configure do
if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
- config.logger = ActiveSupport::TaggedLogging.new(logger)
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
end
# Do not dump schema after migrations.
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 27275c7..dc2c3b7 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,11 +1,13 @@
+# The test environment is used exclusively to run your application's
+# test suite. You never need to work with it otherwise. Remember that
+# your test database is "scratch space" for the test suite and is wiped
+# and recreated between test runs. Don't rely on the data there!
+
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
- # The test environment is used exclusively to run your application's
- # test suite. You never need to work with it otherwise. Remember that
- # your test database is "scratch space" for the test suite and is wiped
- # and recreated between test runs. Don't rely on the data there!
- config.cache_classes = true
+ config.cache_classes = false
+ config.action_view.cache_template_loading = true
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
@@ -15,18 +17,23 @@ Rails.application.configure do
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
- 'Cache-Control' => 'public, max-age=3600'
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
}
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
+ config.cache_store = :null_store
# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
+
+ # Store uploaded files on the local file system in a temporary directory.
+ config.active_storage.service = :test
+
config.action_mailer.perform_caching = false
# Tell Action Mailer not to deliver emails to the real world.
@@ -37,7 +44,7 @@ Rails.application.configure do
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
- # Raises error for missing translations
+ # Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
config.baukis_kai = {
diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb
index 51639b6..89d2efa 100644
--- a/config/initializers/application_controller_renderer.rb
+++ b/config/initializers/application_controller_renderer.rb
@@ -1,6 +1,8 @@
# Be sure to restart your server when you modify this file.
-# ApplicationController.renderer.defaults.merge!(
-# http_host: 'example.org',
-# https: false
-# )
+# ActiveSupport::Reloader.to_prepare do
+# ApplicationController.renderer.defaults.merge!(
+# http_host: 'example.org',
+# https: false
+# )
+# end
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index f9bd5a5..fe48fc3 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -3,12 +3,10 @@
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'
-# Add additional assets to the asset load path
+# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional assets.
-# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
-Rails.application.config.assets.precompile += %w( staff.js admin.js customer.js )
-Rails.application.config.assets.paths << Rails.root.join("app", "assets", "fonts")
-
-Sprockets::Context.send(:include, Rails.application.routes.url_helpers)
\ No newline at end of file
+# application.js, application.css, and all non-JS/CSS in the app/assets
+# folder are already added.
+# Rails.application.config.assets.precompile += %w( admin.js admin.css )
diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb
new file mode 100644
index 0000000..41c4301
--- /dev/null
+++ b/config/initializers/content_security_policy.rb
@@ -0,0 +1,28 @@
+# Be sure to restart your server when you modify this file.
+
+# Define an application-wide content security policy
+# For further information see the following documentation
+# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
+
+# Rails.application.config.content_security_policy do |policy|
+# policy.default_src :self, :https
+# policy.font_src :self, :https, :data
+# policy.img_src :self, :https, :data
+# policy.object_src :none
+# policy.script_src :self, :https
+# policy.style_src :self, :https
+
+# # Specify URI for violation reports
+# # policy.report_uri "/csp-violation-report-endpoint"
+# end
+
+# If you are using UJS then enable automatic nonce generation
+# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
+
+# Set the nonce only to specific directives
+# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
+
+# Report CSP violations to a specified URI
+# For further information see the following documentation:
+# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
+# Rails.application.config.content_security_policy_report_only = true
diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb
index 671abb6..92240ef 100644
--- a/config/initializers/new_framework_defaults.rb
+++ b/config/initializers/new_framework_defaults.rb
@@ -1,24 +1,45 @@
# Be sure to restart your server when you modify this file.
#
-# This file contains migration options to ease your Rails 5.0 upgrade.
+# This file contains migration options to ease your Rails 6.0 upgrade.
+#
+# Once upgraded flip defaults one by one to migrate to the new default.
#
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
-# Enable per-form CSRF tokens. Previous versions had false.
-Rails.application.config.action_controller.per_form_csrf_tokens = true
+# Don't force requests from old versions of IE to be UTF-8 encoded.
+# Rails.application.config.action_view.default_enforce_utf8 = false
+
+# Embed purpose and expiry metadata inside signed and encrypted
+# cookies for increased security.
+#
+# This option is not backwards compatible with earlier Rails versions.
+# It's best enabled when your entire app is migrated and stable on 6.0.
+# Rails.application.config.action_dispatch.use_cookies_with_metadata = true
-# Enable origin-checking CSRF mitigation. Previous versions had false.
-Rails.application.config.action_controller.forgery_protection_origin_check = true
+# Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification.
+# Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false
-# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
-# Previous versions had false.
-ActiveSupport.to_time_preserves_timezone = true
+# Return false instead of self when enqueuing is aborted from a callback.
+# Rails.application.config.active_job.return_false_on_aborted_enqueue = true
-# Require `belongs_to` associations by default. Previous versions had false.
-Rails.application.config.active_record.belongs_to_required_by_default = true
+# Send Active Storage analysis and purge jobs to dedicated queues.
+# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
+# Rails.application.config.active_storage.queues.purge = :active_storage_purge
-# Do not halt callback chains when a callback returns false. Previous versions had true.
-ActiveSupport.halt_callback_chains_on_return_false = false
+# When assigning to a collection of attachments declared via `has_many_attached`, replace existing
+# attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
+# Rails.application.config.active_storage.replace_on_assign_to_many = true
+
+# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
+#
+# The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob),
+# will be removed in Rails 6.1. This setting is not backwards compatible with earlier Rails versions.
+# If you send mail in the background, job workers need to have a copy of
+# MailDeliveryJob to ensure all delivery jobs are processed properly.
+# Make sure your entire app is migrated and stable on 6.0 before using this setting.
+# Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
-# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
-Rails.application.config.ssl_options = { hsts: { subdomains: true } }
+# Enable the same cache key to be reused when the object being cached of type
+# `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count)
+# of the relation's cache key into the cache version to support recycling cache key.
+# Rails.application.config.active_record.collection_cache_versioning = true
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 0653957..cf9b342 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -16,8 +16,18 @@
#
# This would use the information in config/locales/es.yml.
#
+# The following keys must be escaped otherwise they will not be retrieved by
+# the default I18n backend:
+#
+# true, false, on, off, yes, no
+#
+# Instead, surround them with single quotes.
+#
+# en:
+# 'true': 'foo'
+#
# To learn more, please read the Rails Internationalization guide
-# available at http://guides.rubyonrails.org/i18n.html.
+# available at https://guides.rubyonrails.org/i18n.html.
en:
hello: "Hello world"
diff --git a/config/puma.rb b/config/puma.rb
index c7f311f..5ed4437 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -1,13 +1,14 @@
# Puma can serve each request in a thread from an internal thread pool.
-# The `threads` method setting takes two numbers a minimum and maximum.
+# The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
-# and maximum, this matches the default thread size of Active Record.
+# and maximum; this matches the default thread size of Active Record.
#
-threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
-threads threads_count, threads_count
+max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
+min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
+threads min_threads_count, max_threads_count
-# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
+# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
port ENV.fetch("PORT") { 3000 }
@@ -15,8 +16,11 @@ port ENV.fetch("PORT") { 3000 }
#
environment ENV.fetch("RAILS_ENV") { "development" }
+# Specifies the `pidfile` that Puma will use.
+pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
+
# Specifies the number of `workers` to boot in clustered mode.
-# Workers are forked webserver processes. If using threads and workers together
+# Workers are forked web server processes. If using threads and workers together
# the concurrency of the application would be max `threads` * `workers`.
# Workers do not work on JRuby or Windows (both of which do not support
# processes).
@@ -26,22 +30,9 @@ environment ENV.fetch("RAILS_ENV") { "development" }
# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write
-# process behavior so workers use less memory. If you use this option
-# you need to make sure to reconnect any threads in the `on_worker_boot`
-# block.
+# process behavior so workers use less memory.
#
# preload_app!
-# The code in the `on_worker_boot` will be called if you are using
-# clustered mode by specifying a number of `workers`. After each worker
-# process is booted this block will be run, if you are using `preload_app!`
-# option you will want to use this block to reconnect to any threads
-# or connections that may have been created at application boot, Ruby
-# cannot share connections between processes.
-#
-# on_worker_boot do
-# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
-# end
-
# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart
diff --git a/config/spring.rb b/config/spring.rb
index c9119b4..db5bf13 100644
--- a/config/spring.rb
+++ b/config/spring.rb
@@ -1,6 +1,6 @@
-%w(
- .ruby-version
- .rbenv-vars
- tmp/restart.txt
- tmp/caching-dev.txt
-).each { |path| Spring.watch(path) }
+Spring.watch(
+ ".ruby-version",
+ ".rbenv-vars",
+ "tmp/restart.txt",
+ "tmp/caching-dev.txt"
+)
diff --git a/config/storage.yml b/config/storage.yml
new file mode 100644
index 0000000..d32f76e
--- /dev/null
+++ b/config/storage.yml
@@ -0,0 +1,34 @@
+test:
+ service: Disk
+ root: <%= Rails.root.join("tmp/storage") %>
+
+local:
+ service: Disk
+ root: <%= Rails.root.join("storage") %>
+
+# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
+# amazon:
+# service: S3
+# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
+# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
+# region: us-east-1
+# bucket: your_own_bucket
+
+# Remember not to checkin your GCS keyfile to a repository
+# google:
+# service: GCS
+# project: your_project
+# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
+# bucket: your_own_bucket
+
+# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
+# microsoft:
+# service: AzureStorage
+# storage_account_name: your_account_name
+# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
+# container: your_container_name
+
+# mirror:
+# service: Mirror
+# primary: local
+# mirrors: [ amazon, google, microsoft ]
diff --git a/db/migrate/20170214071011_create_programs.rb b/db/migrate/20170214071011_create_programs.rb
index 957aa9a..1e39c0c 100644
--- a/db/migrate/20170214071011_create_programs.rb
+++ b/db/migrate/20170214071011_create_programs.rb
@@ -14,6 +14,6 @@ class CreatePrograms < ActiveRecord::Migration[5.0]
add_index :programs, :registrant_id
add_index :programs, :application_start_time
- add_foreign_key :programs, :staff_members, column: 'registrant_id'
+ add_foreign_key :programs, :staff_members, column: :registrant_id
end
end
diff --git a/db/migrate/20170318002915_create_messages.rb b/db/migrate/20170318002915_create_messages.rb
index 8bd233d..b8e56ae 100644
--- a/db/migrate/20170318002915_create_messages.rb
+++ b/db/migrate/20170318002915_create_messages.rb
@@ -24,7 +24,7 @@ class CreateMessages < ActiveRecord::Migration[5.0]
add_foreign_key :messages, :customers
add_foreign_key :messages, :staff_members
- add_foreign_key :messages, :messages, column: 'root_id'
- add_foreign_key :messages, :messages, column: 'parent_id'
+ add_foreign_key :messages, :messages, column: :root_id
+ add_foreign_key :messages, :messages, column: :parent_id
end
end
diff --git a/db/schema.rb b/db/schema.rb
index 92e47ae..443ef64 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -2,202 +2,202 @@
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
-# Note that this schema.rb definition is the authoritative source for your
-# database schema. If you need to create the application database on another
-# system, you should be using db:schema:load, not running all the migrations
-# from scratch. The latter is a flawed and unsustainable approach (the more migrations
-# you'll amass, the slower it'll run and the greater likelihood for issues).
+# This file is the source Rails uses to define your schema when running `rails
+# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
+# be faster and is potentially less error prone than running all of your
+# migrations from scratch. Old migrations may fail to apply correctly if those
+# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20170327081649) do
+ActiveRecord::Schema.define(version: 2017_03_27_081649) do
- create_table "addresses", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "住所" do |t|
- t.integer "customer_id", null: false, comment: "顧客への外部キー"
- t.string "type", null: false, comment: "継承カラム"
- t.string "postal_code", null: false, comment: "郵便番号"
- t.string "prefecture", null: false, comment: "都道府県"
- t.string "city", null: false, comment: "市区町村"
- t.string "address1", null: false, comment: "町域・番地等"
- t.string "address2", null: false, comment: "建物名・部屋番号"
- t.string "company_name", default: "", null: false, comment: "会社名"
- t.string "division_name", default: "", null: false, comment: "部署名"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.index ["city"], name: "index_addresses_on_city", using: :btree
- t.index ["customer_id"], name: "index_addresses_on_customer_id", using: :btree
- t.index ["postal_code"], name: "index_addresses_on_postal_code", using: :btree
- t.index ["prefecture", "city"], name: "index_addresses_on_prefecture_and_city", using: :btree
- t.index ["type", "city"], name: "index_addresses_on_type_and_city", using: :btree
- t.index ["type", "customer_id"], name: "index_addresses_on_type_and_customer_id", unique: true, using: :btree
- t.index ["type", "prefecture", "city"], name: "index_addresses_on_type_and_prefecture_and_city", using: :btree
+ create_table "addresses", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "住所", force: :cascade do |t|
+ t.integer "customer_id", null: false, comment: "顧客への外部キー"
+ t.string "type", null: false, comment: "継承カラム"
+ t.string "postal_code", null: false, comment: "郵便番号"
+ t.string "prefecture", null: false, comment: "都道府県"
+ t.string "city", null: false, comment: "市区町村"
+ t.string "address1", null: false, comment: "町域・番地等"
+ t.string "address2", null: false, comment: "建物名・部屋番号"
+ t.string "company_name", default: "", null: false, comment: "会社名"
+ t.string "division_name", default: "", null: false, comment: "部署名"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["city"], name: "index_addresses_on_city"
+ t.index ["customer_id"], name: "index_addresses_on_customer_id"
+ t.index ["postal_code"], name: "index_addresses_on_postal_code"
+ t.index ["prefecture", "city"], name: "index_addresses_on_prefecture_and_city"
+ t.index ["type", "city"], name: "index_addresses_on_type_and_city"
+ t.index ["type", "customer_id"], name: "index_addresses_on_type_and_customer_id", unique: true
+ t.index ["type", "prefecture", "city"], name: "index_addresses_on_type_and_prefecture_and_city"
end
- create_table "administrators", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "管理者" do |t|
- t.string "email", null: false, comment: "メールアドレス"
- t.string "email_for_index", null: false, comment: "索引用メールアドレス"
- t.string "hashed_password", comment: "パスワード"
- t.boolean "suspended", default: false, null: false, comment: "停止フラグ"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.index ["email_for_index"], name: "index_administrators_on_email_for_index", unique: true, using: :btree
+ create_table "administrators", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "管理者", force: :cascade do |t|
+ t.string "email", null: false, comment: "メールアドレス"
+ t.string "email_for_index", null: false, comment: "索引用メールアドレス"
+ t.string "hashed_password", comment: "パスワード"
+ t.boolean "suspended", default: false, null: false, comment: "停止フラグ"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["email_for_index"], name: "index_administrators_on_email_for_index", unique: true
end
- create_table "allowed_sources", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "IPアドレス制限" do |t|
- t.string "namespace", null: false, comment: "名前空間"
- t.integer "octet1", null: false, comment: "第1オクテット"
- t.integer "octet2", null: false, comment: "第2オクテット"
- t.integer "octet3", null: false, comment: "第3オクテット"
- t.integer "octet4", null: false, comment: "第4オクテット"
- t.boolean "wildcard", default: false, null: false, comment: "ワイルドカード"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.index ["namespace", "octet1", "octet2", "octet3", "octet4"], name: "index_allowed_sources_on_namespace_and_octets", unique: true, using: :btree
+ create_table "allowed_sources", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "IPアドレス制限", force: :cascade do |t|
+ t.string "namespace", null: false, comment: "名前空間"
+ t.integer "octet1", null: false, comment: "第1オクテット"
+ t.integer "octet2", null: false, comment: "第2オクテット"
+ t.integer "octet3", null: false, comment: "第3オクテット"
+ t.integer "octet4", null: false, comment: "第4オクテット"
+ t.boolean "wildcard", default: false, null: false, comment: "ワイルドカード"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["namespace", "octet1", "octet2", "octet3", "octet4"], name: "index_allowed_sources_on_namespace_and_octets", unique: true
end
- create_table "customers", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "顧客" do |t|
- t.string "email", null: false, comment: "メールアドレス"
- t.string "email_for_index", null: false, comment: "顧客用メールアドレス"
- t.string "family_name", null: false, comment: "姓"
- t.string "given_name", null: false, comment: "名"
- t.string "family_name_kana", null: false, comment: "姓(カナ)"
- t.string "given_name_kana", null: false, comment: "名(カナ)"
- t.string "gender", comment: "性別"
- t.date "birthday", comment: "誕生日"
- t.string "hashed_password", comment: "パスワード"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.integer "birth_year", comment: "誕生年"
- t.integer "birth_month", comment: "誕生月"
- t.integer "birth_mday", comment: "誕生日"
- t.index ["birth_mday", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_mday_and_furigana", using: :btree
- t.index ["birth_mday", "given_name_kana"], name: "index_customers_on_birth_mday_and_given_name_kana", using: :btree
- t.index ["birth_month", "birth_mday"], name: "index_customers_on_birth_month_and_birth_mday", using: :btree
- t.index ["birth_month", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_month_and_furigana", using: :btree
- t.index ["birth_month", "given_name_kana"], name: "index_customers_on_birth_month_and_given_name_kana", using: :btree
- t.index ["birth_year", "birth_month", "birth_mday"], name: "index_customers_on_birth_year_and_birth_month_and_birth_mday", using: :btree
- t.index ["birth_year", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_year_and_furigana", using: :btree
- t.index ["birth_year", "given_name_kana"], name: "index_customers_on_birth_year_and_given_name_kana", using: :btree
- t.index ["email_for_index"], name: "index_customers_on_email_for_index", unique: true, using: :btree
- t.index ["family_name_kana", "given_name_kana"], name: "index_customers_on_family_name_kana_and_given_name_kana", using: :btree
- t.index ["gender", "family_name_kana", "given_name_kana"], name: "index_customers_on_gender_and_furigana", using: :btree
- t.index ["given_name_kana"], name: "index_customers_on_given_name_kana", using: :btree
+ create_table "customers", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "顧客", force: :cascade do |t|
+ t.string "email", null: false, comment: "メールアドレス"
+ t.string "email_for_index", null: false, comment: "顧客用メールアドレス"
+ t.string "family_name", null: false, comment: "姓"
+ t.string "given_name", null: false, comment: "名"
+ t.string "family_name_kana", null: false, comment: "姓(カナ)"
+ t.string "given_name_kana", null: false, comment: "名(カナ)"
+ t.string "gender", comment: "性別"
+ t.date "birthday", comment: "誕生日"
+ t.string "hashed_password", comment: "パスワード"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.integer "birth_year", comment: "誕生年"
+ t.integer "birth_month", comment: "誕生月"
+ t.integer "birth_mday", comment: "誕生日"
+ t.index ["birth_mday", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_mday_and_furigana"
+ t.index ["birth_mday", "given_name_kana"], name: "index_customers_on_birth_mday_and_given_name_kana"
+ t.index ["birth_month", "birth_mday"], name: "index_customers_on_birth_month_and_birth_mday"
+ t.index ["birth_month", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_month_and_furigana"
+ t.index ["birth_month", "given_name_kana"], name: "index_customers_on_birth_month_and_given_name_kana"
+ t.index ["birth_year", "birth_month", "birth_mday"], name: "index_customers_on_birth_year_and_birth_month_and_birth_mday"
+ t.index ["birth_year", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_year_and_furigana"
+ t.index ["birth_year", "given_name_kana"], name: "index_customers_on_birth_year_and_given_name_kana"
+ t.index ["email_for_index"], name: "index_customers_on_email_for_index", unique: true
+ t.index ["family_name_kana", "given_name_kana"], name: "index_customers_on_family_name_kana_and_given_name_kana"
+ t.index ["gender", "family_name_kana", "given_name_kana"], name: "index_customers_on_gender_and_furigana"
+ t.index ["given_name_kana"], name: "index_customers_on_given_name_kana"
end
- create_table "entries", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "申し込み" do |t|
- t.integer "program_id", null: false
- t.integer "customer_id", null: false
- t.boolean "approved", default: false, null: false, comment: "承認済みフラグ"
- t.boolean "canceled", default: false, null: false, comment: "取り消しフラグ"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.index ["customer_id"], name: "index_entries_on_customer_id", using: :btree
- t.index ["program_id", "customer_id"], name: "index_entries_on_program_id_and_customer_id", unique: true, using: :btree
- t.index ["program_id"], name: "index_entries_on_program_id", using: :btree
+ create_table "entries", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "申し込み", force: :cascade do |t|
+ t.integer "program_id", null: false
+ t.integer "customer_id", null: false
+ t.boolean "approved", default: false, null: false, comment: "承認済みフラグ"
+ t.boolean "canceled", default: false, null: false, comment: "取り消しフラグ"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["customer_id"], name: "index_entries_on_customer_id"
+ t.index ["program_id", "customer_id"], name: "index_entries_on_program_id_and_customer_id", unique: true
+ t.index ["program_id"], name: "index_entries_on_program_id"
end
- create_table "hash_locks", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "排他制御" do |t|
- t.string "table", null: false, comment: "テーブル"
- t.string "column", null: false, comment: "カラム"
- t.string "key", null: false, comment: "キー"
+ create_table "hash_locks", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "排他制御", force: :cascade do |t|
+ t.string "table", null: false, comment: "テーブル"
+ t.string "column", null: false, comment: "カラム"
+ t.string "key", null: false, comment: "キー"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["table", "column", "key"], name: "index_hash_locks_on_table_and_column_and_key", unique: true, using: :btree
+ t.index ["table", "column", "key"], name: "index_hash_locks_on_table_and_column_and_key", unique: true
end
- create_table "message_tag_links", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "タグリンクテーブル" do |t|
+ create_table "message_tag_links", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "タグリンクテーブル", force: :cascade do |t|
t.integer "message_id", null: false
- t.integer "tag_id", null: false
- t.index ["message_id", "tag_id"], name: "index_message_tag_links_on_message_id_and_tag_id", unique: true, using: :btree
- t.index ["message_id"], name: "index_message_tag_links_on_message_id", using: :btree
- t.index ["tag_id"], name: "index_message_tag_links_on_tag_id", using: :btree
+ t.integer "tag_id", null: false
+ t.index ["message_id", "tag_id"], name: "index_message_tag_links_on_message_id_and_tag_id", unique: true
+ t.index ["message_id"], name: "index_message_tag_links_on_message_id"
+ t.index ["tag_id"], name: "index_message_tag_links_on_tag_id"
end
- create_table "messages", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "問い合わせ" do |t|
- t.integer "customer_id", null: false
- t.integer "staff_member_id"
- t.integer "root_id", comment: "Messageへの外部キー"
- t.integer "parent_id", comment: "Messageへの外部キー"
- t.string "type", null: false, comment: "継承カラム"
- t.string "status", default: "new", null: false, comment: "状態(職員向け)"
- t.string "subject", null: false, comment: "件名"
- t.text "body", limit: 65535, comment: "本文"
- t.text "remarks", limit: 65535, comment: "備考(職員向け)"
- t.boolean "discarded", default: false, null: false, comment: "顧客側の削除フラグ"
- t.boolean "deleted", default: false, null: false, comment: "職員側の削除フラグ"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.index ["customer_id", "deleted", "created_at"], name: "index_messages_on_customer_id_and_deleted_and_created_at", using: :btree
- t.index ["customer_id", "deleted", "status", "created_at"], name: "index_messages_on_c_d_s_c", using: :btree
- t.index ["customer_id", "discarded", "created_at"], name: "index_messages_on_customer_id_and_discarded_and_created_at", using: :btree
- t.index ["customer_id"], name: "index_messages_on_customer_id", using: :btree
- t.index ["parent_id"], name: "fk_rails_aafcb31dbf", using: :btree
- t.index ["root_id", "deleted", "created_at"], name: "index_messages_on_root_id_and_deleted_and_created_at", using: :btree
- t.index ["staff_member_id"], name: "index_messages_on_staff_member_id", using: :btree
- t.index ["type", "customer_id"], name: "index_messages_on_type_and_customer_id", using: :btree
- t.index ["type", "staff_member_id"], name: "index_messages_on_type_and_staff_member_id", using: :btree
+ create_table "messages", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "問い合わせ", force: :cascade do |t|
+ t.integer "customer_id", null: false
+ t.integer "staff_member_id"
+ t.integer "root_id", comment: "Messageへの外部キー"
+ t.integer "parent_id", comment: "Messageへの外部キー"
+ t.string "type", null: false, comment: "継承カラム"
+ t.string "status", default: "new", null: false, comment: "状態(職員向け)"
+ t.string "subject", null: false, comment: "件名"
+ t.text "body", comment: "本文"
+ t.text "remarks", comment: "備考(職員向け)"
+ t.boolean "discarded", default: false, null: false, comment: "顧客側の削除フラグ"
+ t.boolean "deleted", default: false, null: false, comment: "職員側の削除フラグ"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["customer_id", "deleted", "created_at"], name: "index_messages_on_customer_id_and_deleted_and_created_at"
+ t.index ["customer_id", "deleted", "status", "created_at"], name: "index_messages_on_c_d_s_c"
+ t.index ["customer_id", "discarded", "created_at"], name: "index_messages_on_customer_id_and_discarded_and_created_at"
+ t.index ["customer_id"], name: "index_messages_on_customer_id"
+ t.index ["parent_id"], name: "fk_rails_aafcb31dbf"
+ t.index ["root_id", "deleted", "created_at"], name: "index_messages_on_root_id_and_deleted_and_created_at"
+ t.index ["staff_member_id"], name: "index_messages_on_staff_member_id"
+ t.index ["type", "customer_id"], name: "index_messages_on_type_and_customer_id"
+ t.index ["type", "staff_member_id"], name: "index_messages_on_type_and_staff_member_id"
end
- create_table "phones", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "電話" do |t|
- t.integer "customer_id", null: false, comment: "顧客への外部キー"
- t.integer "address_id", comment: "住所への外部キー"
- t.string "number", null: false, comment: "電話番号"
- t.string "number_for_index", null: false, comment: "索引用電話番号"
- t.boolean "primary", default: false, null: false, comment: "優先フラグ"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.string "last_four_digits", comment: "電話番号下4桁"
- t.index ["address_id"], name: "index_phones_on_address_id", using: :btree
- t.index ["customer_id"], name: "index_phones_on_customer_id", using: :btree
- t.index ["last_four_digits"], name: "index_phones_on_last_four_digits", using: :btree
- t.index ["number_for_index"], name: "index_phones_on_number_for_index", using: :btree
+ create_table "phones", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "電話", force: :cascade do |t|
+ t.integer "customer_id", null: false, comment: "顧客への外部キー"
+ t.integer "address_id", comment: "住所への外部キー"
+ t.string "number", null: false, comment: "電話番号"
+ t.string "number_for_index", null: false, comment: "索引用電話番号"
+ t.boolean "primary", default: false, null: false, comment: "優先フラグ"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.string "last_four_digits", comment: "電話番号下4桁"
+ t.index ["address_id"], name: "index_phones_on_address_id"
+ t.index ["customer_id"], name: "index_phones_on_customer_id"
+ t.index ["last_four_digits"], name: "index_phones_on_last_four_digits"
+ t.index ["number_for_index"], name: "index_phones_on_number_for_index"
end
- create_table "programs", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "プログラム" do |t|
- t.integer "registrant_id", null: false, comment: "登録職員(外部キー)"
- t.string "title", null: false, comment: "タイトル"
- t.text "description", limit: 65535, comment: "説明"
- t.datetime "application_start_time", null: false, comment: "申し込み開始日"
- t.datetime "application_end_time", null: false, comment: "申し込み終了日"
- t.integer "min_number_of_participants", comment: "最小参観者数"
- t.integer "max_number_of_participants", comment: "最大参観者数"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.index ["application_start_time"], name: "index_programs_on_application_start_time", using: :btree
- t.index ["registrant_id"], name: "index_programs_on_registrant_id", using: :btree
+ create_table "programs", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "プログラム", force: :cascade do |t|
+ t.integer "registrant_id", null: false, comment: "登録職員(外部キー)"
+ t.string "title", null: false, comment: "タイトル"
+ t.text "description", comment: "説明"
+ t.datetime "application_start_time", null: false, comment: "申し込み開始日"
+ t.datetime "application_end_time", null: false, comment: "申し込み終了日"
+ t.integer "min_number_of_participants", comment: "最小参観者数"
+ t.integer "max_number_of_participants", comment: "最大参観者数"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["application_start_time"], name: "index_programs_on_application_start_time"
+ t.index ["registrant_id"], name: "index_programs_on_registrant_id"
end
- create_table "staff_events", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "職員イベント" do |t|
- t.integer "staff_member_id", null: false, comment: "職員レコードへの外部キー"
- t.string "type", null: false, comment: "イベントタイプ"
- t.datetime "created_at", null: false, comment: "発生時刻"
- t.index ["created_at"], name: "index_staff_events_on_created_at", using: :btree
- t.index ["staff_member_id", "created_at"], name: "index_staff_events_on_staff_member_id_and_created_at", using: :btree
- t.index ["staff_member_id"], name: "index_staff_events_on_staff_member_id", using: :btree
+ create_table "staff_events", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "職員イベント", force: :cascade do |t|
+ t.integer "staff_member_id", null: false, comment: "職員レコードへの外部キー"
+ t.string "type", null: false, comment: "イベントタイプ"
+ t.datetime "created_at", null: false, comment: "発生時刻"
+ t.index ["created_at"], name: "index_staff_events_on_created_at"
+ t.index ["staff_member_id", "created_at"], name: "index_staff_events_on_staff_member_id_and_created_at"
+ t.index ["staff_member_id"], name: "index_staff_events_on_staff_member_id"
end
- create_table "staff_members", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "職員" do |t|
- t.string "email", null: false, comment: "メールアドレス"
- t.string "email_for_index", null: false, comment: "索引用メールアドレス"
- t.string "family_name", null: false, comment: "姓"
- t.string "given_name", null: false, comment: "名"
- t.string "family_name_kana", null: false, comment: "姓(カナ)"
- t.string "given_name_kana", null: false, comment: "名(カナ)"
- t.string "hashed_password", comment: "パスワード"
- t.date "start_date", null: false, comment: "開始日"
- t.date "end_date", comment: "終了日"
- t.boolean "suspended", default: false, null: false, comment: "停止フラグ"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.index ["email_for_index"], name: "index_staff_members_on_email_for_index", unique: true, using: :btree
- t.index ["family_name_kana", "given_name_kana"], name: "index_staff_members_on_family_name_kana_and_given_name_kana", using: :btree
+ create_table "staff_members", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "職員", force: :cascade do |t|
+ t.string "email", null: false, comment: "メールアドレス"
+ t.string "email_for_index", null: false, comment: "索引用メールアドレス"
+ t.string "family_name", null: false, comment: "姓"
+ t.string "given_name", null: false, comment: "名"
+ t.string "family_name_kana", null: false, comment: "姓(カナ)"
+ t.string "given_name_kana", null: false, comment: "名(カナ)"
+ t.string "hashed_password", comment: "パスワード"
+ t.date "start_date", null: false, comment: "開始日"
+ t.date "end_date", comment: "終了日"
+ t.boolean "suspended", default: false, null: false, comment: "停止フラグ"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["email_for_index"], name: "index_staff_members_on_email_for_index", unique: true
+ t.index ["family_name_kana", "given_name_kana"], name: "index_staff_members_on_family_name_kana_and_given_name_kana"
end
- create_table "tags", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "タグ" do |t|
- t.string "value", null: false
+ create_table "tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "タグ", force: :cascade do |t|
+ t.string "value", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["value"], name: "index_tags_on_value", unique: true, using: :btree
+ t.index ["value"], name: "index_tags_on_value", unique: true
end
add_foreign_key "addresses", "customers"
構造変更¶
コミット: 6fd35a1¶
メッセージ¶
chore:Rubyバージョンアップ
変更されたファイル¶
- M .ruby-version
- M Dockerfile
- M Gemfile
- M Gemfile.lock
- M app/assets/javascripts/admin.js
- M app/assets/javascripts/customer.js
- M app/assets/javascripts/staff.js
- M config/database.yml
- M db/schema.rb
変更内容¶
commit 6fd35a1b8c700e1dc148f66e20adfacebc9371fc
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 15:29:17 2025 +0900
chore:Rubyバージョンアップ
diff --git a/.ruby-version b/.ruby-version
index 197c4d5..6a81b4c 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-2.4.0
+2.7.8
diff --git a/Dockerfile b/Dockerfile
index 6f34f59..156e901 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -56,8 +56,8 @@ RUN apt-get update && \
vim
# Ruby
-ENV RUBY_VER 2.4.0
-ENV BUNDLER_VER 1.13.7
+ENV RUBY_VER 2.7.8
+ENV BUNDLER_VER 2.1.4
RUN rm -rf ~/.rbenv
RUN git clone https://github.com/sstephenson/rbenv ~/.rbenv
RUN git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
@@ -80,8 +80,3 @@ RUN . $HOME/.nvm/nvm.sh && \
npm i -g yarn
RUN apt install -y nodejs
-# Workaround for Ruby
-RUN apt-get install -y libmysqlclient-dev
-RUN ~/.rbenv/shims/gem install mysql2 -v '0.4.5' --source 'https://rubygems.org/'
-RUN apt-get install -y libssl1.0-dev
-RUN ~/.rbenv/shims/gem install puma -v '3.6.0' --source 'https://rubygems.org/'
diff --git a/Gemfile b/Gemfile
index 40c2377..6f27f2f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,5 @@
source 'https://rubygems.org'
-ruby '2.4.0'
+ruby '2.7.8'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
@@ -10,28 +10,28 @@ end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.1'
# Use mysql as the database for Active Record
-gem 'pg', '~> 0.18'
+gem 'pg'
# Use Puma as the app server
-gem 'puma', '~> 3.0'
+gem 'puma'
# Use SCSS for stylesheets
-gem 'sass-rails', '~> 5.0'
+gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
-gem 'uglifier', '>= 1.3.0'
+gem 'uglifier'
# Use CoffeeScript for .coffee assets and views
-gem 'coffee-rails', '~> 4.2'
+gem 'coffee-rails'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
-gem 'turbolinks', '~> 5'
+gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
-gem 'jbuilder', '~> 2.5'
+gem 'jbuilder'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
-gem 'bcrypt', '~> 3.1.7'
+gem 'bcrypt'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
@@ -39,21 +39,20 @@ gem 'bcrypt', '~> 3.1.7'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
- gem 'sqlite3'
- gem 'rspec-rails', '~> 3.5'
+ gem 'rspec-rails'
gem 'spring-commands-rspec'
gem 'factory_girl_rails'
gem 'debase'
end
group :development do
- gem 'mysql2', '>= 0.3.18', '< 0.5'
+ gem 'mysql2'
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
- gem 'web-console', '>= 3.3.0'
- gem 'listen', '~> 3.0.5'
+ gem 'web-console'
+ gem 'listen'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
- gem 'spring-watcher-listen', '~> 2.0.0'
+ gem 'spring-watcher-listen'
gem 'better_errors'
gem 'binding_of_caller'
gem 'migration_comments'
@@ -61,19 +60,19 @@ group :development do
gem 'i18n_generators'
gem 'yard'
gem 'rails-erd'
- gem 'guard-livereload', '~> 2.5', require: false
+ gem 'guard-livereload', require: false
gem 'rack-livereload'
gem 'i18n_generators'
end
group :test do
- gem 'faker', '~> 1.4.3'
- gem 'capybara', '~> 2.8'
+ gem 'faker'
+ gem 'capybara'
gem 'capybara-webkit'
- gem 'database_cleaner', '~> 1.3.0'
- gem 'launchy', '~> 2.4.2'
+ gem 'database_cleaner'
+ gem 'launchy'
gem 'selenium-webdriver'
- gem 'shoulda-matchers', '~> 2.6.2'
+ gem 'shoulda-matchers'
gem 'capybara-screenshot'
gem 'rails-controller-testing'
end
@@ -85,13 +84,14 @@ gem 'font-awesome-rails'
gem 'rails_12factor', group: :production
gem 'rack-dev-mark'
gem 'enum_help'
-gem 'bootstrap-sass', '~> 3.3.6'
+gem 'bootstrap-sass'
gem 'bootstrap_form'
gem 'dotenv-rails'
-gem 'kaminari', '~> 0.17.0'
-gem 'date_validator', '~> 0.9.0'
-gem 'email_validator', '~> 1.6'
-gem 'jquery-ui-rails', '~> 5.0', '>= 5.0.5'
+gem 'kaminari'
+gem 'date_validator'
+gem 'email_validator'
+gem 'jquery-ui-rails'
gem 'momentjs-rails'
gem 'bootstrap3-datetimepicker-rails'
-gem 'tag-it-rails'
\ No newline at end of file
+gem 'tag-it-rails'
+gem 'ffi', '~> 1.15.5'
\ No newline at end of file
diff --git a/Gemfile.lock b/Gemfile.lock
index 600d0fd..94c0bd0 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,133 +1,149 @@
GEM
remote: https://rubygems.org/
specs:
- actioncable (5.0.1)
- actionpack (= 5.0.1)
- nio4r (~> 1.2)
+ actioncable (5.0.7.2)
+ actionpack (= 5.0.7.2)
+ nio4r (>= 1.2, < 3.0)
websocket-driver (~> 0.6.1)
- actionmailer (5.0.1)
- actionpack (= 5.0.1)
- actionview (= 5.0.1)
- activejob (= 5.0.1)
+ actionmailer (5.0.7.2)
+ actionpack (= 5.0.7.2)
+ actionview (= 5.0.7.2)
+ activejob (= 5.0.7.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (5.0.1)
- actionview (= 5.0.1)
- activesupport (= 5.0.1)
+ actionpack (5.0.7.2)
+ actionview (= 5.0.7.2)
+ activesupport (= 5.0.7.2)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (5.0.1)
- activesupport (= 5.0.1)
+ actionview (5.0.7.2)
+ activesupport (= 5.0.7.2)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
- activejob (5.0.1)
- activesupport (= 5.0.1)
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
+ activejob (5.0.7.2)
+ activesupport (= 5.0.7.2)
globalid (>= 0.3.6)
- activemodel (5.0.1)
- activesupport (= 5.0.1)
- activerecord (5.0.1)
- activemodel (= 5.0.1)
- activesupport (= 5.0.1)
+ activemodel (5.0.7.2)
+ activesupport (= 5.0.7.2)
+ activerecord (5.0.7.2)
+ activemodel (= 5.0.7.2)
+ activesupport (= 5.0.7.2)
arel (~> 7.0)
- activesupport (5.0.1)
+ activesupport (5.0.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
- i18n (~> 0.7)
+ i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
- addressable (2.5.0)
- public_suffix (~> 2.0, >= 2.0.2)
- annotate (2.6.5)
- activerecord (>= 2.3.0)
- rake (>= 0.8.7)
+ addressable (2.8.7)
+ public_suffix (>= 2.0.2, < 7.0)
+ annotate (3.2.0)
+ activerecord (>= 3.2, < 8.0)
+ rake (>= 10.4, < 14.0)
arel (7.1.4)
- autoprefixer-rails (6.6.1)
- execjs
- bcrypt (3.1.11)
- better_errors (2.1.1)
- coderay (>= 1.0.0)
- erubis (>= 2.6.6)
+ autoprefixer-rails (10.4.21.0)
+ execjs (~> 2)
+ bcrypt (3.1.20)
+ better_errors (2.10.1)
+ erubi (>= 1.0.0)
rack (>= 0.9.0)
- binding_of_caller (0.7.2)
- debug_inspector (>= 0.0.1)
- bootstrap-sass (3.3.7)
+ rouge (>= 1.0.0)
+ bindex (0.8.1)
+ binding_of_caller (1.0.1)
+ debug_inspector (>= 1.2.0)
+ bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
- sass (>= 3.3.4)
- bootstrap3-datetimepicker-rails (4.17.43)
+ sassc (>= 2.0.0)
+ bootstrap3-datetimepicker-rails (4.17.47)
momentjs-rails (>= 2.8.1)
- bootstrap_form (2.5.3)
- builder (3.2.3)
- byebug (9.0.6)
- capybara (2.12.0)
+ bootstrap_form (4.4.0)
+ actionpack (>= 5.0)
+ activemodel (>= 5.0)
+ builder (3.3.0)
+ byebug (11.1.3)
+ capybara (3.39.2)
addressable
- mime-types (>= 1.16)
- nokogiri (>= 1.3.3)
- rack (>= 1.0.0)
- rack-test (>= 0.5.4)
- xpath (~> 2.0)
- capybara-screenshot (1.0.14)
- capybara (>= 1.0, < 3)
+ 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)
+ capybara-screenshot (1.0.26)
+ capybara (>= 1.0, < 4)
launchy
- capybara-webkit (1.12.0)
- capybara (>= 2.3.0, < 2.13.0)
+ capybara-webkit (1.15.1)
+ capybara (>= 2.3, < 4.0)
json
- childprocess (0.5.9)
- ffi (~> 1.0, >= 1.0.11)
+ childprocess (5.1.0)
+ logger (~> 1.5)
choice (0.2.0)
- coderay (1.1.1)
- coffee-rails (4.2.1)
+ coderay (1.1.3)
+ coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
- railties (>= 4.0.0, < 5.2.x)
+ railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
- concurrent-ruby (1.0.4)
- database_cleaner (1.3.0)
- date_validator (0.9.0)
- activemodel
- activesupport
- debase (0.2.1)
- debase-ruby_core_source
- debase-ruby_core_source (0.9.6)
- debug_inspector (0.0.2)
- diff-lcs (1.2.5)
- dotenv (2.1.2)
- dotenv-rails (2.1.2)
- dotenv (= 2.1.2)
- railties (>= 3.2, < 5.1)
- em-websocket (0.5.1)
+ concurrent-ruby (1.3.5)
+ crass (1.0.6)
+ database_cleaner (2.1.0)
+ database_cleaner-active_record (>= 2, < 3)
+ database_cleaner-active_record (2.2.1)
+ activerecord (>= 5.a)
+ database_cleaner-core (~> 2.0.0)
+ database_cleaner-core (2.0.1)
+ date (3.4.1)
+ date_validator (0.12.0)
+ activemodel (>= 3)
+ activesupport (>= 3)
+ debase (0.2.9)
+ debase-ruby_core_source (>= 3.4.1)
+ debase-ruby_core_source (3.4.1)
+ debug_inspector (1.2.0)
+ diff-lcs (1.6.2)
+ dotenv (2.8.1)
+ dotenv-rails (2.8.1)
+ dotenv (= 2.8.1)
+ railties (>= 3.2)
+ em-websocket (0.5.3)
eventmachine (>= 0.12.9)
- http_parser.rb (~> 0.6.0)
- email_validator (1.6.0)
+ http_parser.rb (~> 0)
+ email_validator (2.2.4)
activemodel
- enum_help (0.0.16)
+ enum_help (0.0.19)
+ activesupport (>= 3.0.0)
+ erubi (1.13.1)
erubis (2.7.0)
- eventmachine (1.2.1)
- execjs (2.7.0)
- factory_girl (4.8.0)
+ eventmachine (1.2.7)
+ execjs (2.10.0)
+ factory_girl (4.9.0)
activesupport (>= 3.0.0)
- factory_girl_rails (4.8.0)
- factory_girl (~> 4.8.0)
+ factory_girl_rails (4.9.0)
+ factory_girl (~> 4.9.0)
railties (>= 3.0.0)
- faker (1.4.3)
- i18n (~> 0.5)
- ffi (1.9.14)
- font-awesome-rails (4.7.0.1)
- railties (>= 3.2, < 5.1)
- formatador (0.2.5)
- globalid (0.3.7)
- activesupport (>= 4.1.0)
- guard (2.14.0)
+ faker (3.4.2)
+ i18n (>= 1.8.11, < 2)
+ ffi (1.15.5)
+ font-awesome-rails (4.7.0.9)
+ railties (>= 3.2, < 9.0)
+ formatador (1.1.0)
+ globalid (1.1.0)
+ activesupport (>= 5.0)
+ guard (2.19.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
- lumberjack (~> 1.0)
+ logger (~> 1.6)
+ lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
- pry (>= 0.9.12)
+ ostruct (~> 0.6)
+ pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
@@ -136,245 +152,282 @@ GEM
guard (~> 2.8)
guard-compat (~> 1.0)
multi_json (~> 1.8)
- http_parser.rb (0.6.0)
- i18n (0.7.0)
- i18n_generators (2.1.1)
- rails (>= 3.0.0)
- jbuilder (2.6.1)
- activesupport (>= 3.0.0, < 5.1)
- multi_json (~> 1.2)
- jquery-rails (4.2.2)
+ http_parser.rb (0.8.0)
+ i18n (1.14.7)
+ concurrent-ruby (~> 1.0)
+ i18n_generators (2.2.2)
+ activerecord (>= 3.0.0)
+ railties (>= 3.0.0)
+ jbuilder (2.13.0)
+ actionview (>= 5.0.0)
+ activesupport (>= 5.0.0)
+ jquery-rails (4.6.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
- jquery-ui-rails (5.0.5)
+ jquery-ui-rails (8.0.0)
railties (>= 3.2.16)
- json (2.0.3)
- kaminari (0.17.0)
- actionpack (>= 3.0.0)
- activesupport (>= 3.0.0)
- launchy (2.4.3)
- addressable (~> 2.3)
- listen (3.0.8)
- rb-fsevent (~> 0.9, >= 0.9.4)
- rb-inotify (~> 0.9, >= 0.9.7)
- loofah (2.0.3)
- nokogiri (>= 1.5.9)
- lumberjack (1.0.11)
- mail (2.6.4)
- mime-types (>= 1.16, < 4)
- method_source (0.8.2)
+ json (2.12.2)
+ kaminari (1.2.2)
+ activesupport (>= 4.1.0)
+ kaminari-actionview (= 1.2.2)
+ kaminari-activerecord (= 1.2.2)
+ kaminari-core (= 1.2.2)
+ kaminari-actionview (1.2.2)
+ actionview
+ kaminari-core (= 1.2.2)
+ kaminari-activerecord (1.2.2)
+ activerecord
+ kaminari-core (= 1.2.2)
+ kaminari-core (1.2.2)
+ launchy (3.1.1)
+ addressable (~> 2.8)
+ childprocess (~> 5.0)
+ logger (~> 1.6)
+ listen (3.9.0)
+ rb-fsevent (~> 0.10, >= 0.10.3)
+ rb-inotify (~> 0.9, >= 0.9.10)
+ logger (1.7.0)
+ loofah (2.24.1)
+ crass (~> 1.0.2)
+ nokogiri (>= 1.12.0)
+ lumberjack (1.2.10)
+ mail (2.8.1)
+ mini_mime (>= 0.1.1)
+ net-imap
+ net-pop
+ net-smtp
+ matrix (0.4.2)
+ method_source (1.1.0)
migration_comments (0.4.1)
activerecord (>= 4.2.0)
- mime-types (3.1)
- mime-types-data (~> 3.2015)
- mime-types-data (3.2016.0521)
- mini_portile2 (2.1.0)
- minitest (5.10.1)
- momentjs-rails (2.17.1)
+ mini_mime (1.1.5)
+ mini_portile2 (2.8.9)
+ minitest (5.25.5)
+ momentjs-rails (2.29.4.1)
railties (>= 3.1)
- multi_json (1.12.1)
- mysql2 (0.4.5)
+ multi_json (1.15.0)
+ mysql2 (0.5.6)
nenv (0.3.0)
- nio4r (1.2.1)
- nokogiri (1.7.0.1)
- mini_portile2 (~> 2.1.0)
- notiffany (0.1.1)
+ net-imap (0.4.22)
+ date
+ net-protocol
+ net-pop (0.1.2)
+ net-protocol
+ net-protocol (0.2.2)
+ timeout
+ net-smtp (0.5.1)
+ net-protocol
+ nio4r (2.7.4)
+ nokogiri (1.15.7)
+ mini_portile2 (~> 2.8.2)
+ racc (~> 1.4)
+ notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
- pg (0.19.0)
- pry (0.10.4)
- coderay (~> 1.1.0)
- method_source (~> 0.8.1)
- slop (~> 3.4)
- public_suffix (2.0.5)
- puma (3.6.2)
- rack (2.0.1)
- rack-dev-mark (0.7.5)
- rack (>= 1.1)
- rack-livereload (0.3.16)
- rack
+ ostruct (0.6.1)
+ pg (1.5.9)
+ pry (0.15.2)
+ coderay (~> 1.1)
+ method_source (~> 1.0)
+ public_suffix (5.1.1)
+ puma (6.6.0)
+ nio4r (~> 2.0)
+ racc (1.8.1)
+ rack (2.2.17)
+ rack-dev-mark (0.8.1)
+ rack (>= 1.1, < 4.0)
+ rack-livereload (0.5.2)
+ rack (< 3)
rack-test (0.6.3)
rack (>= 1.0)
- rails (5.0.1)
- actioncable (= 5.0.1)
- actionmailer (= 5.0.1)
- actionpack (= 5.0.1)
- actionview (= 5.0.1)
- activejob (= 5.0.1)
- activemodel (= 5.0.1)
- activerecord (= 5.0.1)
- activesupport (= 5.0.1)
- bundler (>= 1.3.0, < 2.0)
- railties (= 5.0.1)
+ rails (5.0.7.2)
+ actioncable (= 5.0.7.2)
+ actionmailer (= 5.0.7.2)
+ actionpack (= 5.0.7.2)
+ actionview (= 5.0.7.2)
+ activejob (= 5.0.7.2)
+ activemodel (= 5.0.7.2)
+ activerecord (= 5.0.7.2)
+ activesupport (= 5.0.7.2)
+ bundler (>= 1.3.0)
+ railties (= 5.0.7.2)
sprockets-rails (>= 2.0.0)
- rails-controller-testing (1.0.1)
- actionpack (~> 5.x)
- actionview (~> 5.x)
- activesupport (~> 5.x)
- rails-dom-testing (2.0.2)
- activesupport (>= 4.2.0, < 6.0)
- nokogiri (~> 1.6)
- rails-erd (1.5.0)
- activerecord (>= 3.2)
- activesupport (>= 3.2)
+ rails-controller-testing (1.0.5)
+ actionpack (>= 5.0.1.rc1)
+ actionview (>= 5.0.1.rc1)
+ activesupport (>= 5.0.1.rc1)
+ rails-dom-testing (2.3.0)
+ activesupport (>= 5.0.0)
+ minitest
+ nokogiri (>= 1.6)
+ rails-erd (1.7.2)
+ activerecord (>= 4.2)
+ activesupport (>= 4.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
- rails-html-sanitizer (1.0.3)
- loofah (~> 2.0)
+ rails-html-sanitizer (1.6.2)
+ loofah (~> 2.21)
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
- railties (5.0.1)
- actionpack (= 5.0.1)
- activesupport (= 5.0.1)
+ railties (5.0.7.2)
+ actionpack (= 5.0.7.2)
+ activesupport (= 5.0.7.2)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
- rake (12.0.0)
- rb-fsevent (0.9.8)
- rb-inotify (0.9.7)
- ffi (>= 0.5.0)
- rspec-core (3.5.4)
- rspec-support (~> 3.5.0)
- rspec-expectations (3.5.0)
+ rake (13.3.0)
+ rb-fsevent (0.11.2)
+ rb-inotify (0.11.1)
+ ffi (~> 1.0)
+ regexp_parser (2.10.0)
+ rexml (3.4.1)
+ rouge (4.5.2)
+ rspec-core (3.13.4)
+ rspec-support (~> 3.13.0)
+ rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.5.0)
- rspec-mocks (3.5.0)
+ rspec-support (~> 3.13.0)
+ rspec-mocks (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.5.0)
- rspec-rails (3.5.2)
- actionpack (>= 3.0)
- activesupport (>= 3.0)
- railties (>= 3.0)
- rspec-core (~> 3.5.0)
- rspec-expectations (~> 3.5.0)
- rspec-mocks (~> 3.5.0)
- rspec-support (~> 3.5.0)
- rspec-support (3.5.0)
- ruby-graphviz (1.2.2)
- rubyzip (1.2.0)
- sass (3.4.23)
- sass-rails (5.0.6)
- railties (>= 4.0.0, < 6)
- sass (~> 3.1)
- sprockets (>= 2.8, < 4.0)
- sprockets-rails (>= 2.0, < 4.0)
- tilt (>= 1.1, < 3)
- selenium-webdriver (3.0.5)
- childprocess (~> 0.5)
- rubyzip (~> 1.0)
+ rspec-support (~> 3.13.0)
+ rspec-rails (4.1.2)
+ actionpack (>= 4.2)
+ activesupport (>= 4.2)
+ railties (>= 4.2)
+ rspec-core (~> 3.10)
+ rspec-expectations (~> 3.10)
+ rspec-mocks (~> 3.10)
+ rspec-support (~> 3.10)
+ rspec-support (3.13.4)
+ ruby-graphviz (1.2.5)
+ rexml
+ rubyzip (2.4.1)
+ sass-rails (6.0.0)
+ sassc-rails (~> 2.1, >= 2.1.1)
+ sassc (2.4.0)
+ ffi (~> 1.9)
+ sassc-rails (2.1.2)
+ railties (>= 4.0.0)
+ sassc (>= 2.0)
+ sprockets (> 3.0)
+ sprockets-rails
+ tilt
+ selenium-webdriver (4.9.0)
+ rexml (~> 3.2, >= 3.2.5)
+ rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
shellany (0.0.1)
- shoulda-matchers (2.6.2)
- activesupport (>= 3.0.0)
- slop (3.6.0)
- spring (2.0.0)
- activesupport (>= 4.2)
+ shoulda-matchers (4.5.1)
+ activesupport (>= 4.2.0)
+ spring (4.3.0)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
- spring-watcher-listen (2.0.1)
+ spring-watcher-listen (2.1.0)
listen (>= 2.7, < 4.0)
- spring (>= 1.2, < 3.0)
- sprockets (3.7.1)
+ spring (>= 4)
+ sprockets (4.2.2)
concurrent-ruby (~> 1.0)
- rack (> 1, < 3)
- sprockets-rails (3.2.0)
+ logger
+ rack (>= 2.2.4, < 4)
+ sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
- sqlite3 (1.3.12)
tag-it-rails (2.0.0)
jquery-ui-rails
railties
- thor (0.19.4)
- thread_safe (0.3.5)
- tilt (2.0.5)
- turbolinks (5.0.1)
- turbolinks-source (~> 5)
- turbolinks-source (5.0.0)
- tzinfo (1.2.2)
+ thor (1.3.2)
+ thread_safe (0.3.6)
+ tilt (2.6.0)
+ timeout (0.4.3)
+ turbolinks (5.2.1)
+ turbolinks-source (~> 5.2)
+ turbolinks-source (5.2.0)
+ tzinfo (1.2.11)
thread_safe (~> 0.1)
tzinfo-data (1.2025.2)
tzinfo (>= 1.0.0)
- uglifier (3.0.4)
+ uglifier (4.2.1)
execjs (>= 0.3.0, < 3)
- web-console (3.4.0)
+ web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
- debug_inspector
+ bindex (>= 0.4.0)
railties (>= 5.0)
- websocket (1.2.3)
- websocket-driver (0.6.4)
+ websocket (1.2.11)
+ websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
- websocket-extensions (0.1.2)
- xpath (2.0.0)
- nokogiri (~> 1.3)
- yard (0.9.7)
+ websocket-extensions (0.1.5)
+ xpath (3.2.0)
+ nokogiri (~> 1.8)
+ yard (0.9.37)
PLATFORMS
ruby
DEPENDENCIES
annotate
- bcrypt (~> 3.1.7)
+ bcrypt
better_errors
binding_of_caller
- bootstrap-sass (~> 3.3.6)
+ bootstrap-sass
bootstrap3-datetimepicker-rails
bootstrap_form
byebug
- capybara (~> 2.8)
+ capybara
capybara-screenshot
capybara-webkit
- coffee-rails (~> 4.2)
- database_cleaner (~> 1.3.0)
- date_validator (~> 0.9.0)
+ coffee-rails
+ database_cleaner
+ date_validator
debase
dotenv-rails
- email_validator (~> 1.6)
+ email_validator
enum_help
factory_girl_rails
- faker (~> 1.4.3)
+ faker
+ ffi (~> 1.15.5)
font-awesome-rails
- guard-livereload (~> 2.5)
+ guard-livereload
i18n_generators
- jbuilder (~> 2.5)
+ jbuilder
jquery-rails
- jquery-ui-rails (~> 5.0, >= 5.0.5)
- kaminari (~> 0.17.0)
- launchy (~> 2.4.2)
- listen (~> 3.0.5)
+ jquery-ui-rails
+ kaminari
+ launchy
+ listen
migration_comments
momentjs-rails
- mysql2 (>= 0.3.18, < 0.5)
- pg (~> 0.18)
- puma (~> 3.0)
+ mysql2
+ pg
+ puma
rack-dev-mark
rack-livereload
rails (~> 5.0.1)
rails-controller-testing
rails-erd
rails_12factor
- rspec-rails (~> 3.5)
- sass-rails (~> 5.0)
+ rspec-rails
+ sass-rails
selenium-webdriver
- shoulda-matchers (~> 2.6.2)
+ shoulda-matchers
spring
spring-commands-rspec
- spring-watcher-listen (~> 2.0.0)
- sqlite3
+ spring-watcher-listen
tag-it-rails
- turbolinks (~> 5)
+ turbolinks
tzinfo-data
- uglifier (>= 1.3.0)
- web-console (>= 3.3.0)
+ uglifier
+ web-console
yard
RUBY VERSION
- ruby 2.4.0p0
+ ruby 2.7.8p225
BUNDLED WITH
- 1.13.7
+ 2.1.4
diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js
index 9c88f37..4f65ddf 100644
--- a/app/assets/javascripts/admin.js
+++ b/app/assets/javascripts/admin.js
@@ -16,8 +16,7 @@
//= require bootstrap-sprockets
//= require_tree ./lib
//= require_tree ./shared
-//= require jquery-ui/datepicker
-//= require jquery-ui/datepicker-ja
+//= require jquery-ui
//= require moment
//= require moment/ja
//= require bootstrap-datetimepicker
diff --git a/app/assets/javascripts/customer.js b/app/assets/javascripts/customer.js
index 32e4a67..7e9b2be 100644
--- a/app/assets/javascripts/customer.js
+++ b/app/assets/javascripts/customer.js
@@ -16,8 +16,7 @@
//= require bootstrap-sprockets
//= require_tree ./lib
//= require_tree ./shared
-//= require jquery-ui/datepicker
-//= require jquery-ui/datepicker-ja
+//= require jquery-ui
//= require moment
//= require moment/ja
//= require bootstrap-datetimepicker
diff --git a/app/assets/javascripts/staff.js b/app/assets/javascripts/staff.js
index e746e87..dacfdee 100644
--- a/app/assets/javascripts/staff.js
+++ b/app/assets/javascripts/staff.js
@@ -16,8 +16,7 @@
//= require bootstrap-sprockets
//= require_tree ./lib
//= require_tree ./shared
-//= require jquery-ui/datepicker
-//= require jquery-ui/datepicker-ja
+//= require jquery-ui
//= require moment
//= require moment/ja
//= require jquery-ui
diff --git a/config/database.yml b/config/database.yml
index c44d192..11c63ba 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -26,10 +26,8 @@ development:
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
- adapter: sqlite3
- pool: 5
- timeout: 5000
- database: db/test.sqlite3
+ <<: *default
+ database: baukis-kai_test
# As with config/secrets.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
diff --git a/db/schema.rb b/db/schema.rb
index 04e130c..92e47ae 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -12,192 +12,203 @@
ActiveRecord::Schema.define(version: 20170327081649) do
- create_table "addresses", force: :cascade do |t|
- t.integer "customer_id", null: false
- t.string "type", null: false
- t.string "postal_code", null: false
- t.string "prefecture", null: false
- t.string "city", null: false
- t.string "address1", null: false
- t.string "address2", null: false
- t.string "company_name", default: "", null: false
- t.string "division_name", default: "", null: false
+ create_table "addresses", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "住所" do |t|
+ t.integer "customer_id", null: false, comment: "顧客への外部キー"
+ t.string "type", null: false, comment: "継承カラム"
+ t.string "postal_code", null: false, comment: "郵便番号"
+ t.string "prefecture", null: false, comment: "都道府県"
+ t.string "city", null: false, comment: "市区町村"
+ t.string "address1", null: false, comment: "町域・番地等"
+ t.string "address2", null: false, comment: "建物名・部屋番号"
+ t.string "company_name", default: "", null: false, comment: "会社名"
+ t.string "division_name", default: "", null: false, comment: "部署名"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["city"], name: "index_addresses_on_city"
- t.index ["customer_id"], name: "index_addresses_on_customer_id"
- t.index ["postal_code"], name: "index_addresses_on_postal_code"
- t.index ["prefecture", "city"], name: "index_addresses_on_prefecture_and_city"
- t.index ["type", "city"], name: "index_addresses_on_type_and_city"
- t.index ["type", "customer_id"], name: "index_addresses_on_type_and_customer_id", unique: true
- t.index ["type", "prefecture", "city"], name: "index_addresses_on_type_and_prefecture_and_city"
+ t.index ["city"], name: "index_addresses_on_city", using: :btree
+ t.index ["customer_id"], name: "index_addresses_on_customer_id", using: :btree
+ t.index ["postal_code"], name: "index_addresses_on_postal_code", using: :btree
+ t.index ["prefecture", "city"], name: "index_addresses_on_prefecture_and_city", using: :btree
+ t.index ["type", "city"], name: "index_addresses_on_type_and_city", using: :btree
+ t.index ["type", "customer_id"], name: "index_addresses_on_type_and_customer_id", unique: true, using: :btree
+ t.index ["type", "prefecture", "city"], name: "index_addresses_on_type_and_prefecture_and_city", using: :btree
end
- create_table "administrators", force: :cascade do |t|
- t.string "email", null: false
- t.string "email_for_index", null: false
- t.string "hashed_password"
- t.boolean "suspended", default: false, null: false
+ create_table "administrators", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "管理者" do |t|
+ t.string "email", null: false, comment: "メールアドレス"
+ t.string "email_for_index", null: false, comment: "索引用メールアドレス"
+ t.string "hashed_password", comment: "パスワード"
+ t.boolean "suspended", default: false, null: false, comment: "停止フラグ"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["email_for_index"], name: "index_administrators_on_email_for_index", unique: true
+ t.index ["email_for_index"], name: "index_administrators_on_email_for_index", unique: true, using: :btree
end
- create_table "allowed_sources", force: :cascade do |t|
- t.string "namespace", null: false
- t.integer "octet1", null: false
- t.integer "octet2", null: false
- t.integer "octet3", null: false
- t.integer "octet4", null: false
- t.boolean "wildcard", default: false, null: false
+ create_table "allowed_sources", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "IPアドレス制限" do |t|
+ t.string "namespace", null: false, comment: "名前空間"
+ t.integer "octet1", null: false, comment: "第1オクテット"
+ t.integer "octet2", null: false, comment: "第2オクテット"
+ t.integer "octet3", null: false, comment: "第3オクテット"
+ t.integer "octet4", null: false, comment: "第4オクテット"
+ t.boolean "wildcard", default: false, null: false, comment: "ワイルドカード"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["namespace", "octet1", "octet2", "octet3", "octet4"], name: "index_allowed_sources_on_namespace_and_octets", unique: true
+ t.index ["namespace", "octet1", "octet2", "octet3", "octet4"], name: "index_allowed_sources_on_namespace_and_octets", unique: true, using: :btree
end
- create_table "customers", force: :cascade do |t|
- t.string "email", null: false
- t.string "email_for_index", null: false
- t.string "family_name", null: false
- t.string "given_name", null: false
- t.string "family_name_kana", null: false
- t.string "given_name_kana", null: false
- t.string "gender"
- t.date "birthday"
- t.string "hashed_password"
+ create_table "customers", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "顧客" do |t|
+ t.string "email", null: false, comment: "メールアドレス"
+ t.string "email_for_index", null: false, comment: "顧客用メールアドレス"
+ t.string "family_name", null: false, comment: "姓"
+ t.string "given_name", null: false, comment: "名"
+ t.string "family_name_kana", null: false, comment: "姓(カナ)"
+ t.string "given_name_kana", null: false, comment: "名(カナ)"
+ t.string "gender", comment: "性別"
+ t.date "birthday", comment: "誕生日"
+ t.string "hashed_password", comment: "パスワード"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.integer "birth_year"
- t.integer "birth_month"
- t.integer "birth_mday"
- t.index ["birth_mday", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_mday_and_furigana"
- t.index ["birth_mday", "given_name_kana"], name: "index_customers_on_birth_mday_and_given_name_kana"
- t.index ["birth_month", "birth_mday"], name: "index_customers_on_birth_month_and_birth_mday"
- t.index ["birth_month", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_month_and_furigana"
- t.index ["birth_month", "given_name_kana"], name: "index_customers_on_birth_month_and_given_name_kana"
- t.index ["birth_year", "birth_month", "birth_mday"], name: "index_customers_on_birth_year_and_birth_month_and_birth_mday"
- t.index ["birth_year", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_year_and_furigana"
- t.index ["birth_year", "given_name_kana"], name: "index_customers_on_birth_year_and_given_name_kana"
- t.index ["email_for_index"], name: "index_customers_on_email_for_index", unique: true
- t.index ["family_name_kana", "given_name_kana"], name: "index_customers_on_family_name_kana_and_given_name_kana"
- t.index ["gender", "family_name_kana", "given_name_kana"], name: "index_customers_on_gender_and_furigana"
- t.index ["given_name_kana"], name: "index_customers_on_given_name_kana"
+ t.integer "birth_year", comment: "誕生年"
+ t.integer "birth_month", comment: "誕生月"
+ t.integer "birth_mday", comment: "誕生日"
+ t.index ["birth_mday", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_mday_and_furigana", using: :btree
+ t.index ["birth_mday", "given_name_kana"], name: "index_customers_on_birth_mday_and_given_name_kana", using: :btree
+ t.index ["birth_month", "birth_mday"], name: "index_customers_on_birth_month_and_birth_mday", using: :btree
+ t.index ["birth_month", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_month_and_furigana", using: :btree
+ t.index ["birth_month", "given_name_kana"], name: "index_customers_on_birth_month_and_given_name_kana", using: :btree
+ t.index ["birth_year", "birth_month", "birth_mday"], name: "index_customers_on_birth_year_and_birth_month_and_birth_mday", using: :btree
+ t.index ["birth_year", "family_name_kana", "given_name_kana"], name: "index_customers_on_birth_year_and_furigana", using: :btree
+ t.index ["birth_year", "given_name_kana"], name: "index_customers_on_birth_year_and_given_name_kana", using: :btree
+ t.index ["email_for_index"], name: "index_customers_on_email_for_index", unique: true, using: :btree
+ t.index ["family_name_kana", "given_name_kana"], name: "index_customers_on_family_name_kana_and_given_name_kana", using: :btree
+ t.index ["gender", "family_name_kana", "given_name_kana"], name: "index_customers_on_gender_and_furigana", using: :btree
+ t.index ["given_name_kana"], name: "index_customers_on_given_name_kana", using: :btree
end
- create_table "entries", force: :cascade do |t|
+ create_table "entries", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "申し込み" do |t|
t.integer "program_id", null: false
t.integer "customer_id", null: false
- t.boolean "approved", default: false, null: false
- t.boolean "canceled", default: false, null: false
+ t.boolean "approved", default: false, null: false, comment: "承認済みフラグ"
+ t.boolean "canceled", default: false, null: false, comment: "取り消しフラグ"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["customer_id"], name: "index_entries_on_customer_id"
- t.index ["program_id", "customer_id"], name: "index_entries_on_program_id_and_customer_id", unique: true
- t.index ["program_id"], name: "index_entries_on_program_id"
+ t.index ["customer_id"], name: "index_entries_on_customer_id", using: :btree
+ t.index ["program_id", "customer_id"], name: "index_entries_on_program_id_and_customer_id", unique: true, using: :btree
+ t.index ["program_id"], name: "index_entries_on_program_id", using: :btree
end
- create_table "hash_locks", force: :cascade do |t|
- t.string "table", null: false
- t.string "column", null: false
- t.string "key", null: false
+ create_table "hash_locks", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "排他制御" do |t|
+ t.string "table", null: false, comment: "テーブル"
+ t.string "column", null: false, comment: "カラム"
+ t.string "key", null: false, comment: "キー"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["table", "column", "key"], name: "index_hash_locks_on_table_and_column_and_key", unique: true
+ t.index ["table", "column", "key"], name: "index_hash_locks_on_table_and_column_and_key", unique: true, using: :btree
end
- create_table "message_tag_links", force: :cascade do |t|
+ create_table "message_tag_links", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "タグリンクテーブル" do |t|
t.integer "message_id", null: false
t.integer "tag_id", null: false
- t.index ["message_id", "tag_id"], name: "index_message_tag_links_on_message_id_and_tag_id", unique: true
- t.index ["message_id"], name: "index_message_tag_links_on_message_id"
- t.index ["tag_id"], name: "index_message_tag_links_on_tag_id"
+ t.index ["message_id", "tag_id"], name: "index_message_tag_links_on_message_id_and_tag_id", unique: true, using: :btree
+ t.index ["message_id"], name: "index_message_tag_links_on_message_id", using: :btree
+ t.index ["tag_id"], name: "index_message_tag_links_on_tag_id", using: :btree
end
- create_table "messages", force: :cascade do |t|
+ create_table "messages", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "問い合わせ" do |t|
t.integer "customer_id", null: false
t.integer "staff_member_id"
- t.integer "root_id"
- t.integer "parent_id"
- t.string "type", null: false
- t.string "status", default: "new", null: false
- t.string "subject", null: false
- t.text "body", limit: 65535
- t.text "remarks", limit: 65535
- t.boolean "discarded", default: false, null: false
- t.boolean "deleted", default: false, null: false
+ t.integer "root_id", comment: "Messageへの外部キー"
+ t.integer "parent_id", comment: "Messageへの外部キー"
+ t.string "type", null: false, comment: "継承カラム"
+ t.string "status", default: "new", null: false, comment: "状態(職員向け)"
+ t.string "subject", null: false, comment: "件名"
+ t.text "body", limit: 65535, comment: "本文"
+ t.text "remarks", limit: 65535, comment: "備考(職員向け)"
+ t.boolean "discarded", default: false, null: false, comment: "顧客側の削除フラグ"
+ t.boolean "deleted", default: false, null: false, comment: "職員側の削除フラグ"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["customer_id", "deleted", "created_at"], name: "index_messages_on_customer_id_and_deleted_and_created_at"
- t.index ["customer_id", "deleted", "status", "created_at"], name: "index_messages_on_c_d_s_c"
- t.index ["customer_id", "discarded", "created_at"], name: "index_messages_on_customer_id_and_discarded_and_created_at"
- t.index ["customer_id"], name: "index_messages_on_customer_id"
- t.index ["parent_id"], name: "fk_rails_aafcb31dbf"
- t.index ["root_id", "deleted", "created_at"], name: "index_messages_on_root_id_and_deleted_and_created_at"
- t.index ["staff_member_id"], name: "index_messages_on_staff_member_id"
- t.index ["type", "customer_id"], name: "index_messages_on_type_and_customer_id"
- t.index ["type", "staff_member_id"], name: "index_messages_on_type_and_staff_member_id"
+ t.index ["customer_id", "deleted", "created_at"], name: "index_messages_on_customer_id_and_deleted_and_created_at", using: :btree
+ t.index ["customer_id", "deleted", "status", "created_at"], name: "index_messages_on_c_d_s_c", using: :btree
+ t.index ["customer_id", "discarded", "created_at"], name: "index_messages_on_customer_id_and_discarded_and_created_at", using: :btree
+ t.index ["customer_id"], name: "index_messages_on_customer_id", using: :btree
+ t.index ["parent_id"], name: "fk_rails_aafcb31dbf", using: :btree
+ t.index ["root_id", "deleted", "created_at"], name: "index_messages_on_root_id_and_deleted_and_created_at", using: :btree
+ t.index ["staff_member_id"], name: "index_messages_on_staff_member_id", using: :btree
+ t.index ["type", "customer_id"], name: "index_messages_on_type_and_customer_id", using: :btree
+ t.index ["type", "staff_member_id"], name: "index_messages_on_type_and_staff_member_id", using: :btree
end
- create_table "phones", force: :cascade do |t|
- t.integer "customer_id", null: false
- t.integer "address_id"
- t.string "number", null: false
- t.string "number_for_index", null: false
- t.boolean "primary", default: false, null: false
+ create_table "phones", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "電話" do |t|
+ t.integer "customer_id", null: false, comment: "顧客への外部キー"
+ t.integer "address_id", comment: "住所への外部キー"
+ t.string "number", null: false, comment: "電話番号"
+ t.string "number_for_index", null: false, comment: "索引用電話番号"
+ t.boolean "primary", default: false, null: false, comment: "優先フラグ"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.string "last_four_digits"
- t.index ["address_id"], name: "index_phones_on_address_id"
- t.index ["customer_id"], name: "index_phones_on_customer_id"
- t.index ["last_four_digits"], name: "index_phones_on_last_four_digits"
- t.index ["number_for_index"], name: "index_phones_on_number_for_index"
+ t.string "last_four_digits", comment: "電話番号下4桁"
+ t.index ["address_id"], name: "index_phones_on_address_id", using: :btree
+ t.index ["customer_id"], name: "index_phones_on_customer_id", using: :btree
+ t.index ["last_four_digits"], name: "index_phones_on_last_four_digits", using: :btree
+ t.index ["number_for_index"], name: "index_phones_on_number_for_index", using: :btree
end
- create_table "programs", force: :cascade do |t|
- t.integer "registrant_id", null: false
- t.string "title", null: false
- t.text "description", limit: 65535
- t.datetime "application_start_time", null: false
- t.datetime "application_end_time", null: false
- t.integer "min_number_of_participants"
- t.integer "max_number_of_participants"
+ create_table "programs", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "プログラム" do |t|
+ t.integer "registrant_id", null: false, comment: "登録職員(外部キー)"
+ t.string "title", null: false, comment: "タイトル"
+ t.text "description", limit: 65535, comment: "説明"
+ t.datetime "application_start_time", null: false, comment: "申し込み開始日"
+ t.datetime "application_end_time", null: false, comment: "申し込み終了日"
+ t.integer "min_number_of_participants", comment: "最小参観者数"
+ t.integer "max_number_of_participants", comment: "最大参観者数"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["application_start_time"], name: "index_programs_on_application_start_time"
- t.index ["registrant_id"], name: "index_programs_on_registrant_id"
+ t.index ["application_start_time"], name: "index_programs_on_application_start_time", using: :btree
+ t.index ["registrant_id"], name: "index_programs_on_registrant_id", using: :btree
end
- create_table "staff_events", force: :cascade do |t|
- t.integer "staff_member_id", null: false
- t.string "type", null: false
- t.datetime "created_at", null: false
- t.index ["created_at"], name: "index_staff_events_on_created_at"
- t.index ["staff_member_id", "created_at"], name: "index_staff_events_on_staff_member_id_and_created_at"
- t.index ["staff_member_id"], name: "index_staff_events_on_staff_member_id"
+ create_table "staff_events", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "職員イベント" do |t|
+ t.integer "staff_member_id", null: false, comment: "職員レコードへの外部キー"
+ t.string "type", null: false, comment: "イベントタイプ"
+ t.datetime "created_at", null: false, comment: "発生時刻"
+ t.index ["created_at"], name: "index_staff_events_on_created_at", using: :btree
+ t.index ["staff_member_id", "created_at"], name: "index_staff_events_on_staff_member_id_and_created_at", using: :btree
+ t.index ["staff_member_id"], name: "index_staff_events_on_staff_member_id", using: :btree
end
- create_table "staff_members", force: :cascade do |t|
- t.string "email", null: false
- t.string "email_for_index", null: false
- t.string "family_name", null: false
- t.string "given_name", null: false
- t.string "family_name_kana", null: false
- t.string "given_name_kana", null: false
- t.string "hashed_password"
- t.date "start_date", null: false
- t.date "end_date"
- t.boolean "suspended", default: false, null: false
+ create_table "staff_members", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "職員" do |t|
+ t.string "email", null: false, comment: "メールアドレス"
+ t.string "email_for_index", null: false, comment: "索引用メールアドレス"
+ t.string "family_name", null: false, comment: "姓"
+ t.string "given_name", null: false, comment: "名"
+ t.string "family_name_kana", null: false, comment: "姓(カナ)"
+ t.string "given_name_kana", null: false, comment: "名(カナ)"
+ t.string "hashed_password", comment: "パスワード"
+ t.date "start_date", null: false, comment: "開始日"
+ t.date "end_date", comment: "終了日"
+ t.boolean "suspended", default: false, null: false, comment: "停止フラグ"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["email_for_index"], name: "index_staff_members_on_email_for_index", unique: true
- t.index ["family_name_kana", "given_name_kana"], name: "index_staff_members_on_family_name_kana_and_given_name_kana"
+ t.index ["email_for_index"], name: "index_staff_members_on_email_for_index", unique: true, using: :btree
+ t.index ["family_name_kana", "given_name_kana"], name: "index_staff_members_on_family_name_kana_and_given_name_kana", using: :btree
end
- create_table "tags", force: :cascade do |t|
+ create_table "tags", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3", comment: "タグ" do |t|
t.string "value", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["value"], name: "index_tags_on_value", unique: true
+ t.index ["value"], name: "index_tags_on_value", unique: true, using: :btree
end
+ add_foreign_key "addresses", "customers"
+ add_foreign_key "entries", "customers"
+ add_foreign_key "entries", "programs"
+ add_foreign_key "messages", "customers"
+ add_foreign_key "messages", "messages", column: "parent_id"
+ add_foreign_key "messages", "messages", column: "root_id"
+ add_foreign_key "messages", "staff_members"
+ add_foreign_key "phones", "addresses"
+ add_foreign_key "phones", "customers"
+ add_foreign_key "programs", "staff_members", column: "registrant_id"
+ add_foreign_key "staff_events", "staff_members"
end
コミット: 844ee5c¶
メッセージ¶
chore:開発コンテナ修正
変更されたファイル¶
- M Dockerfile
- M README.md
変更内容¶
commit 844ee5c1ac6bceaa413cb3c0f60bdae598b74cef
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 14:45:08 2025 +0900
chore:開発コンテナ修正
diff --git a/Dockerfile b/Dockerfile
index 1c31907..6f34f59 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,25 +1,14 @@
-# ベースイメージとして Ubuntu 18.04 を使用
-FROM ubuntu:18.04 AS base
+FROM ubuntu:18.04
-# 環境変数の設定
-ENV DEBIAN_FRONTEND=noninteractive \
- LANG=ja_JP.UTF-8 \
- LC_ALL=ja_JP.UTF-8 \
- LC_CTYPE=ja_JP.UTF-8 \
- RUBY_VER=3.4.4 \
- BUNDLER_VER=2.6.7 \
- NODE_VER=16 \
- PACKER_VERSION=1.9.2 \
- TERRAFORM_VERSION=1.6.6
+# Setup locale
+RUN \
+apt-get -yq update && \
+apt-get install -y language-pack-ja-base language-pack-ja
+RUN update-locale LANG=ja_JP.UTF-8 LANGUAGE=ja_JP:ja
+ENV LANG=ja_JP.UTF-8
+ENV LC_ALL=ja_JP.UTF-8
+ENV LC_CTYPE=ja_JP.UTF-8
-# ロケールのセットアップ
-RUN apt-get update && apt-get install -y \
- language-pack-ja-base \
- language-pack-ja \
- && update-locale LANG=ja_JP.UTF-8 LANGUAGE=ja_JP:ja \
- && rm -rf /var/lib/apt/lists/*
-
-# 基本的なパッケージのインストール
RUN apt-get update && \
apt-get install -y \
sudo \
@@ -55,6 +44,7 @@ RUN apt-get update && \
xvfb \
qtbase5-dev \
libqt5webkit5-dev \
+ libqtwebkit-dev \
xauth \
libcurl4-openssl-dev \
software-properties-common \
@@ -63,71 +53,35 @@ RUN apt-get update && \
libgdbm-dev \
libdb-dev \
lsof \
- libmariadb-dev \
- curl \
- unzip \
- sudo \
- ansible \
- rsync \
- vim \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/*
-
-# Rubyのインストール
-RUN git clone https://github.com/sstephenson/rbenv ~/.rbenv \
- && git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build \
- && ~/.rbenv/plugins/ruby-build/install.sh \
- && echo 'export PATH="/$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc \
- && echo 'eval "$(rbenv init -)"' >> ~/.bashrc \
- && . ~/.bashrc \
- && rbenv install $RUBY_VER \
- && rbenv global $RUBY_VER
-
-# Node.jsのインストール
-RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
- && apt-get install -y nodejs \
- && npm install -g yarn \
- && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash \
- && . $HOME/.nvm/nvm.sh \
- && nvm install $NODE_VER \
- && nvm use $NODE_VER
-
- # pipの更新とAWSツールのインストール
- RUN curl -sS https://bootstrap.pypa.io/pip/3.6/get-pip.py | python3 \
- && python3 -m pip install --no-cache-dir --upgrade pip \
- && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
- && unzip awscliv2.zip \
- && ./aws/install \
- && rm -rf awscliv2.zip aws \
- && python3 -m pip install --no-cache-dir awsebcli --upgrade
-
-# HashiCorpツールのインストール
-RUN curl -fsSL https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip -o packer.zip \
- && unzip packer.zip -d /usr/local/bin \
- && rm packer.zip \
- && curl -fsSL https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -o terraform.zip \
- && unzip terraform.zip -d /usr/local/bin \
- && rm terraform.zip
-
-# EasyRSAのセットアップ
-RUN mkdir -p /home/vscode/easy-rsa \
- && useradd -m vscode || true \
- && wget -qO- https://github.com/OpenVPN/easy-rsa/releases/download/v3.1.5/EasyRSA-3.1.5.tgz | tar xz -C /home/vscode/easy-rsa/ --strip-components=1 \
- && chown -R vscode:vscode /home/vscode/easy-rsa \
- && chmod -R 755 /home/vscode/easy-rsa
+ vim
-# ヘルパースクリプトの追加
-COPY --chmod=755 <<EOF /usr/local/bin/check-easyrsa
-#!/bin/bash
-echo "Checking for EasyRSA:"
-find /usr -name "easyrsa" -type f
-echo ""
-echo "Checking for OpenSSL configs:"
-find /usr -name "openssl-*.cnf"
-EOF
+# Ruby
+ENV RUBY_VER 2.4.0
+ENV BUNDLER_VER 1.13.7
+RUN rm -rf ~/.rbenv
+RUN git clone https://github.com/sstephenson/rbenv ~/.rbenv
+RUN git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
+RUN ~/.rbenv/plugins/ruby-build/install.sh
+RUN echo 'export PATH="/$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
+RUN echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
+RUN . ~/.bash_profile && \
+ rbenv install $RUBY_VER && \
+ rbenv global $RUBY_VER
+ENV PATH ~/.rbenv/shims:$PATH
+RUN ~/.rbenv/shims/gem install bundler:$BUNDLER_VER
-# パスの設定
-ENV PATH="/root/.rbenv/shims:$PATH"
+# Node
+ENV NODE_VER 16
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
+RUN . $HOME/.nvm/nvm.sh && \
+ nvm install $NODE_VER && \
+ nvm use $NODE_VER && \
+ node -v && npm -v && \
+ npm i -g yarn
+RUN apt install -y nodejs
-# 作業ディレクトリの設定
-WORKDIR /srv
\ No newline at end of file
+# Workaround for Ruby
+RUN apt-get install -y libmysqlclient-dev
+RUN ~/.rbenv/shims/gem install mysql2 -v '0.4.5' --source 'https://rubygems.org/'
+RUN apt-get install -y libssl1.0-dev
+RUN ~/.rbenv/shims/gem install puma -v '3.6.0' --source 'https://rubygems.org/'
diff --git a/README.md b/README.md
index 3aeee2f..7c335bc 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,7 @@ Baukis 改
### Dockerのセットアップ
```
-docker build -t app:base-kai .
+docker build -t app:base .
docker compose build
docker compose up -d
```
コミット: ab7daed¶
メッセージ¶
chore:開発コンテナ修正
変更されたファイル¶
- M .devcontainer/devcontainer.json
- M Dockerfile
- A Dockerfile-app
- D Dockerfile-base
- M Dockerfile-console
- M README.md
- M docker-compose.yml
変更内容¶
commit ab7daed0ca434f77d06815a2910034f452ab1c08
Author: k2works <kakimomokuri@gmail.com>
Date: Sat Jun 7 13:48:07 2025 +0900
chore:開発コンテナ修正
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 55a3816..dd9b1b4 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,8 +1,8 @@
-// For format details, see https://aka.ms/devcontainer.json. For config options, see the
-// README at: https://github.com/devcontainers/templates/tree/main/src/docker-in-docker
{
- "name": "Docker in Docker",
- "image": "baukis-kai",
+ "name": "Baukis-Kai Dev Container",
+ "build": {
+ "dockerfile": "../Dockerfile"
+ },
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
@@ -12,19 +12,9 @@
}
},
- // Use 'forwardPorts' to make a list of ports inside the container available locally.
- // "forwardPorts": [],
-
- // Use 'postCreateCommand' to run commands after the container is created.
- // "postCreateCommand": "docker --version",
-
- // Configure tool-specific properties.
- "customizations" : {
- "jetbrains" : {
- "backend" : "IntelliJ"
- }
- },
-
- // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
- // "remoteUser": "root"
-}
+ "customizations": {
+ "jetbrains": {
+ "backend": "IntelliJ"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index c68b6cd..1c31907 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,11 +1,133 @@
-FROM baukis-kai
+# ベースイメージとして Ubuntu 18.04 を使用
+FROM ubuntu:18.04 AS base
-# Bundle install
-WORKDIR /srv
-COPY Gemfile /srv/Gemfile
-COPY Gemfile.lock /srv/Gemfile.lock
-RUN ~/.rbenv/shims/bundle install
+# 環境変数の設定
+ENV DEBIAN_FRONTEND=noninteractive \
+ LANG=ja_JP.UTF-8 \
+ LC_ALL=ja_JP.UTF-8 \
+ LC_CTYPE=ja_JP.UTF-8 \
+ RUBY_VER=3.4.4 \
+ BUNDLER_VER=2.6.7 \
+ NODE_VER=16 \
+ PACKER_VERSION=1.9.2 \
+ TERRAFORM_VERSION=1.6.6
-COPY . /srv
+# ロケールのセットアップ
+RUN apt-get update && apt-get install -y \
+ language-pack-ja-base \
+ language-pack-ja \
+ && update-locale LANG=ja_JP.UTF-8 LANGUAGE=ja_JP:ja \
+ && rm -rf /var/lib/apt/lists/*
-CMD ["bash", "-c", "bundle exec rake assets:precompile && bundle exec rake db:migrate && bundle exec rails server -b 0.0.0.0"]
+# 基本的なパッケージのインストール
+RUN apt-get update && \
+ apt-get install -y \
+ sudo \
+ build-essential \
+ zip \
+ unzip \
+ git \
+ curl \
+ wget \
+ git-core \
+ libssl-dev \
+ libqt4-dev \
+ libc6-dev \
+ automake \
+ libtool \
+ libyaml-dev \
+ zlib1g \
+ zlib1g-dev \
+ openssl \
+ libreadline-dev \
+ libxml2-dev \
+ libxslt1-dev \
+ libncurses5-dev \
+ pkg-config \
+ chrpath \
+ libfontconfig1-dev \
+ libxft-dev \
+ libpq-dev \
+ libsqlite3-dev \
+ libmysqlclient-dev \
+ default-mysql-client \
+ postgresql-client \
+ xvfb \
+ qtbase5-dev \
+ libqt5webkit5-dev \
+ xauth \
+ libcurl4-openssl-dev \
+ software-properties-common \
+ libffi-dev \
+ libgdbm5 \
+ libgdbm-dev \
+ libdb-dev \
+ lsof \
+ libmariadb-dev \
+ curl \
+ unzip \
+ sudo \
+ ansible \
+ rsync \
+ vim \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/*
+
+# Rubyのインストール
+RUN git clone https://github.com/sstephenson/rbenv ~/.rbenv \
+ && git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build \
+ && ~/.rbenv/plugins/ruby-build/install.sh \
+ && echo 'export PATH="/$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc \
+ && echo 'eval "$(rbenv init -)"' >> ~/.bashrc \
+ && . ~/.bashrc \
+ && rbenv install $RUBY_VER \
+ && rbenv global $RUBY_VER
+
+# Node.jsのインストール
+RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
+ && apt-get install -y nodejs \
+ && npm install -g yarn \
+ && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash \
+ && . $HOME/.nvm/nvm.sh \
+ && nvm install $NODE_VER \
+ && nvm use $NODE_VER
+
+ # pipの更新とAWSツールのインストール
+ RUN curl -sS https://bootstrap.pypa.io/pip/3.6/get-pip.py | python3 \
+ && python3 -m pip install --no-cache-dir --upgrade pip \
+ && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
+ && unzip awscliv2.zip \
+ && ./aws/install \
+ && rm -rf awscliv2.zip aws \
+ && python3 -m pip install --no-cache-dir awsebcli --upgrade
+
+# HashiCorpツールのインストール
+RUN curl -fsSL https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip -o packer.zip \
+ && unzip packer.zip -d /usr/local/bin \
+ && rm packer.zip \
+ && curl -fsSL https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -o terraform.zip \
+ && unzip terraform.zip -d /usr/local/bin \
+ && rm terraform.zip
+
+# EasyRSAのセットアップ
+RUN mkdir -p /home/vscode/easy-rsa \
+ && useradd -m vscode || true \
+ && wget -qO- https://github.com/OpenVPN/easy-rsa/releases/download/v3.1.5/EasyRSA-3.1.5.tgz | tar xz -C /home/vscode/easy-rsa/ --strip-components=1 \
+ && chown -R vscode:vscode /home/vscode/easy-rsa \
+ && chmod -R 755 /home/vscode/easy-rsa
+
+# ヘルパースクリプトの追加
+COPY --chmod=755 <<EOF /usr/local/bin/check-easyrsa
+#!/bin/bash
+echo "Checking for EasyRSA:"
+find /usr -name "easyrsa" -type f
+echo ""
+echo "Checking for OpenSSL configs:"
+find /usr -name "openssl-*.cnf"
+EOF
+
+# パスの設定
+ENV PATH="/root/.rbenv/shims:$PATH"
+
+# 作業ディレクトリの設定
+WORKDIR /srv
\ No newline at end of file
diff --git a/Dockerfile-app b/Dockerfile-app
new file mode 100644
index 0000000..df34212
--- /dev/null
+++ b/Dockerfile-app
@@ -0,0 +1,11 @@
+FROM app:base
+
+# Bundle install
+WORKDIR /srv
+COPY Gemfile /srv/Gemfile
+COPY Gemfile.lock /srv/Gemfile.lock
+RUN ~/.rbenv/shims/bundle install
+
+COPY . /srv
+
+CMD ["bash", "-c", "bundle exec rake assets:precompile && bundle exec rake db:migrate && bundle exec rails server -b 0.0.0.0"]
diff --git a/Dockerfile-base b/Dockerfile-base
deleted file mode 100644
index 91daa36..0000000
--- a/Dockerfile-base
+++ /dev/null
@@ -1,95 +0,0 @@
-FROM ubuntu:18.04
-
-# Setup locale
-RUN \
-apt-get -yq update && \
-apt-get install -y language-pack-ja-base language-pack-ja
-RUN update-locale LANG=ja_JP.UTF-8 LANGUAGE=ja_JP:ja
-ENV LANG=ja_JP.UTF-8
-ENV LC_ALL=ja_JP.UTF-8
-ENV LC_CTYPE=ja_JP.UTF-8
-
-RUN apt-get update && \
- apt-get install -y \
- sudo \
- build-essential \
- zip \
- unzip \
- git \
- curl \
- wget \
- git-core \
- libssl-dev \
- libqt4-dev \
- libc6-dev \
- automake \
- libtool \
- libyaml-dev \
- zlib1g \
- zlib1g-dev \
- openssl \
- libreadline-dev \
- libxml2-dev \
- libxslt1-dev \
- libncurses5-dev \
- pkg-config \
- chrpath \
- libfontconfig1-dev \
- libxft-dev \
- libpq-dev \
- libsqlite3-dev \
- libmysqlclient-dev \
- default-mysql-client \
- postgresql-client \
- xvfb \
- qtbase5-dev \
- libqt5webkit5-dev \
- libqtwebkit-dev \
- xauth \
- libcurl4-openssl-dev \
- software-properties-common \
- libffi-dev \
- libgdbm5 \
- libgdbm-dev \
- libdb-dev \
- lsof \
- vim
-
-# Ruby
-ENV RUBY_VER 2.4.0
-ENV BUNDLER_VER 1.13.7
-RUN rm -rf ~/.rbenv
-RUN git clone https://github.com/sstephenson/rbenv ~/.rbenv
-RUN git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
-RUN ~/.rbenv/plugins/ruby-build/install.sh
-RUN echo 'export PATH="/$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
-RUN echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
-RUN . ~/.bash_profile && \
- rbenv install $RUBY_VER && \
- rbenv global $RUBY_VER
-ENV PATH ~/.rbenv/shims:$PATH
-RUN ~/.rbenv/shims/gem install bundler:$BUNDLER_VER
-
-# Node
-ENV NODE_VER 16
-RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
-RUN . $HOME/.nvm/nvm.sh && \
- nvm install $NODE_VER && \
- nvm use $NODE_VER && \
- node -v && npm -v && \
- npm i -g yarn
-RUN apt install -y nodejs
-
-# Workaround for Ruby
-RUN apt-get install -y libmysqlclient-dev
-RUN ~/.rbenv/shims/gem install mysql2 -v '0.4.5' --source 'https://rubygems.org/'
-RUN apt-get install -y libssl1.0-dev
-RUN ~/.rbenv/shims/gem install puma -v '3.6.0' --source 'https://rubygems.org/'
-
-# Bundle install
-WORKDIR /srv
-COPY Gemfile /srv/Gemfile
-COPY Gemfile.lock /srv/Gemfile.lock
-RUN ~/.rbenv/shims/bundle install
-
-SHELL ["/bin/bash", "-c"]
\ No newline at end of file
diff --git a/Dockerfile-console b/Dockerfile-console
index f9c8976..103a983 100644
--- a/Dockerfile-console
+++ b/Dockerfile-console
@@ -1,80 +1,4 @@
-FROM baukis-kai
-
-# タイムゾーンの設定を非対話的に行うための環境変数
-ENV DEBIAN_FRONTEND=noninteractive
-ENV TZ=Asia/Tokyo
-
-# PATH変数に ~/.local/bin を追加
-ENV PATH="$PATH:/root/.local/bin"
-
-# バージョン指定
-ENV PACKER_VERSION=1.9.2
-ENV TERRAFORM_VERSION=1.6.6
-
-# 必要なパッケージのインストール
-RUN apt-get update && \
- apt-get install -y \
- curl \
- unzip \
- sudo \
- ansible \
- rsync \
- vim \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/*
-
-# AWS CLIのインストール
-RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
- unzip awscliv2.zip && \
- sudo ./aws/install && \
- rm -rf awscliv2.zip aws
-
-# EB CLIのインストール
-RUN curl -O https://bootstrap.pypa.io/pip/3.6/get-pip.py
-RUN python3 get-pip.py --user
-RUN ~/.local/bin/pip install awsebcli --upgrade --user
-
-# Packerのインストール
-RUN curl -fsSL https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip -o packer.zip && \
- unzip packer.zip -d /usr/local/bin && \
- rm packer.zip
-
-# Terraformのインストール
-RUN curl -fsSL https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -o terraform.zip && \
- unzip terraform.zip -d /usr/local/bin && \
- rm terraform.zip
-
-# Ubuntu特有のEasyRSAパスを確認
-RUN apt-get update && apt-get install -y easy-rsa && \
- EASYRSA_PATH=$(find /usr -name "easyrsa" -type f | head -1) && \
- if [ -n "$EASYRSA_PATH" ]; then \
- echo "Found EasyRSA at $EASYRSA_PATH"; \
- EASYRSA_DIR=$(dirname $EASYRSA_PATH); \
- mkdir -p /home/vscode/easy-rsa; \
- cp -r $EASYRSA_DIR/* /home/vscode/easy-rsa/; \
- else \
- echo "EasyRSA not found in standard locations, downloading..."; \
- mkdir -p /home/vscode/easy-rsa; \
- wget -qO- https://github.com/OpenVPN/easy-rsa/releases/download/v3.1.5/EasyRSA-3.1.5.tgz | tar xz -C /home/vscode/easy-rsa/ --strip-components=1; \
- fi && \
- mkdir -p /home/vscode && \
- useradd -m vscode || true && \
- chown -R vscode:vscode /home/vscode/easy-rsa && \
- chmod -R 755 /home/vscode/easy-rsa
-
-# ヘルパーコマンドの作成
-RUN echo '#!/bin/bash\necho "Checking for EasyRSA:"\nfind /usr -name "easyrsa" -type f\necho ""\necho "Checking for OpenSSL configs:"\nfind /usr -name "openssl-*.cnf"' > /usr/local/bin/check-easyrsa && \
- chmod +x /usr/local/bin/check-easyrsa
-
-# Homebrewのインストール
-RUN apt-get update && apt-get install -y build-essential procps curl file git
-RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || true
-RUN echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /root/.bashrc
-RUN eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
-ENV PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
-
-# aws-vaultのインストール
-RUN /bin/bash -c "source /root/.bashrc && brew install aws-vault"
+FROM app:base
# Bundle install
WORKDIR /srv
@@ -82,4 +6,6 @@ COPY Gemfile /srv/Gemfile
COPY Gemfile.lock /srv/Gemfile.lock
RUN ~/.rbenv/shims/bundle install
+COPY . /srv
+
SHELL ["/bin/bash", "-c"]
\ No newline at end of file
diff --git a/README.md b/README.md
index 8067995..3aeee2f 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,7 @@ Baukis 改
### Dockerのセットアップ
```
-docker build -t baukis-kai -f Dockerfile-base .
+docker build -t app:base-kai .
docker compose build
docker compose up -d
```
diff --git a/docker-compose.yml b/docker-compose.yml
index 60075e0..d9c992c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,6 +2,7 @@ services:
app:
build:
context: .
+ dockerfile: Dockerfile-app
depends_on:
- db
environment:
@@ -16,7 +17,7 @@ services:
volumes:
- ./:/app
db:
- image: mysql:5.7
+ image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: user
@@ -42,6 +43,8 @@ services:
depends_on:
- db
stdin_open: true
+ ports:
+ - "3333:3000"
volumes:
mysql-db: