diff --git a/Gemfile b/Gemfile
index 67e32ee7..39d384f5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -9,7 +9,7 @@ gem 'sysexits'
gem 'xmlrpc'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '~> 7.2.0'
+gem 'rails', '~> 8.0.0'
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"
@@ -97,6 +97,10 @@ gem 'pry-rails'
# ナビゲーションの定義
gem 'simple-navigation'
+# 日本語変換ライブラリ
+# ruby 3.4.x から標準添付されなくなった
+gem 'nkf'
+
# ActiveJob バックエンド
gem 'sidekiq', '~> 7.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index bdb3a230..9eff74ff 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -8,68 +8,67 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- actioncable (7.2.2)
- actionpack (= 7.2.2)
- activesupport (= 7.2.2)
+ actioncable (8.0.0)
+ actionpack (= 8.0.0)
+ activesupport (= 8.0.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
- actionmailbox (7.2.2)
- actionpack (= 7.2.2)
- activejob (= 7.2.2)
- activerecord (= 7.2.2)
- activestorage (= 7.2.2)
- activesupport (= 7.2.2)
+ actionmailbox (8.0.0)
+ actionpack (= 8.0.0)
+ activejob (= 8.0.0)
+ activerecord (= 8.0.0)
+ activestorage (= 8.0.0)
+ activesupport (= 8.0.0)
mail (>= 2.8.0)
- actionmailer (7.2.2)
- actionpack (= 7.2.2)
- actionview (= 7.2.2)
- activejob (= 7.2.2)
- activesupport (= 7.2.2)
+ actionmailer (8.0.0)
+ actionpack (= 8.0.0)
+ actionview (= 8.0.0)
+ activejob (= 8.0.0)
+ activesupport (= 8.0.0)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (7.2.2)
- actionview (= 7.2.2)
- activesupport (= 7.2.2)
+ actionpack (8.0.0)
+ actionview (= 8.0.0)
+ activesupport (= 8.0.0)
nokogiri (>= 1.8.5)
- racc
- rack (>= 2.2.4, < 3.2)
+ rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actiontext (7.2.2)
- actionpack (= 7.2.2)
- activerecord (= 7.2.2)
- activestorage (= 7.2.2)
- activesupport (= 7.2.2)
+ actiontext (8.0.0)
+ actionpack (= 8.0.0)
+ activerecord (= 8.0.0)
+ activestorage (= 8.0.0)
+ activesupport (= 8.0.0)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
- actionview (7.2.2)
- activesupport (= 7.2.2)
+ actionview (8.0.0)
+ activesupport (= 8.0.0)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (7.2.2)
- activesupport (= 7.2.2)
+ activejob (8.0.0)
+ activesupport (= 8.0.0)
globalid (>= 0.3.6)
- activemodel (7.2.2)
- activesupport (= 7.2.2)
- activerecord (7.2.2)
- activemodel (= 7.2.2)
- activesupport (= 7.2.2)
+ activemodel (8.0.0)
+ activesupport (= 8.0.0)
+ activerecord (8.0.0)
+ activemodel (= 8.0.0)
+ activesupport (= 8.0.0)
timeout (>= 0.4.0)
activerecord-import (1.8.1)
activerecord (>= 4.2)
- activestorage (7.2.2)
- actionpack (= 7.2.2)
- activejob (= 7.2.2)
- activerecord (= 7.2.2)
- activesupport (= 7.2.2)
+ activestorage (8.0.0)
+ actionpack (= 8.0.0)
+ activejob (= 8.0.0)
+ activerecord (= 8.0.0)
+ activesupport (= 8.0.0)
marcel (~> 1.0)
- activesupport (7.2.2)
+ activesupport (8.0.0)
base64
benchmark (>= 0.3)
bigdecimal
@@ -81,6 +80,7 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
+ uri (>= 0.13.1)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
ast (2.4.2)
@@ -88,7 +88,7 @@ GEM
execjs (~> 2)
base64 (0.2.0)
bcrypt (3.1.20)
- benchmark (0.3.0)
+ benchmark (0.4.0)
bigdecimal (3.1.8)
bindex (0.8.1)
bootsnap (1.18.4)
@@ -126,12 +126,12 @@ GEM
factory_bot_rails (6.4.4)
factory_bot (~> 6.5)
railties (>= 5.0.0)
- faraday (2.12.0)
- faraday-net_http (>= 2.0, < 3.4)
+ faraday (2.12.1)
+ faraday-net_http (>= 2.0, < 3.5)
json
logger
- faraday-net_http (3.3.0)
- net-http
+ faraday-net_http (3.4.0)
+ net-http (>= 0.5.0)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
formatador (1.1.0)
@@ -171,7 +171,7 @@ GEM
thor (>= 0.14, < 2.0)
jquery-ui-rails (7.0.0)
railties (>= 3.2.16)
- json (2.7.5)
+ json (2.8.2)
jwt (2.9.3)
base64
kaminari (1.2.2)
@@ -207,15 +207,15 @@ GEM
actionpack (>= 6.0.0, < 8.1)
method_source (1.1.0)
mini_mime (1.1.5)
- minitest (5.25.1)
- msgpack (1.7.3)
+ minitest (5.25.2)
+ msgpack (1.7.5)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
mysql2 (0.5.6)
nenv (0.3.0)
- net-http (0.4.1)
+ net-http (0.5.0)
uri
- net-imap (0.5.0)
+ net-imap (0.5.1)
date
net-protocol
net-pop (0.1.2)
@@ -225,6 +225,7 @@ GEM
net-smtp (0.5.0)
net-protocol
nio4r (2.7.4)
+ nkf (0.2.0)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
@@ -246,19 +247,19 @@ GEM
snaky_hash (~> 2.0)
version_gem (~> 1.1)
parallel (1.26.3)
- parser (3.3.5.1)
+ parser (3.3.6.0)
ast (~> 2.4.1)
racc
power_assert (2.0.4)
- pry (0.14.2)
+ pry (0.15.0)
coderay (~> 1.1)
method_source (~> 1.0)
pry-rails (0.3.11)
pry (>= 0.13.0)
- psych (5.1.2)
+ psych (5.2.0)
stringio
public_suffix (6.0.1)
- puma (6.4.3)
+ puma (6.5.0)
nio4r (~> 2.0)
puma_worker_killer (1.0.0)
bigdecimal (>= 2.0)
@@ -270,23 +271,22 @@ GEM
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
- rackup (2.1.0)
+ rackup (2.2.1)
rack (>= 3)
- webrick (~> 1.8)
- rails (7.2.2)
- actioncable (= 7.2.2)
- actionmailbox (= 7.2.2)
- actionmailer (= 7.2.2)
- actionpack (= 7.2.2)
- actiontext (= 7.2.2)
- actionview (= 7.2.2)
- activejob (= 7.2.2)
- activemodel (= 7.2.2)
- activerecord (= 7.2.2)
- activestorage (= 7.2.2)
- activesupport (= 7.2.2)
+ rails (8.0.0)
+ actioncable (= 8.0.0)
+ actionmailbox (= 8.0.0)
+ actionmailer (= 8.0.0)
+ actionpack (= 8.0.0)
+ actiontext (= 8.0.0)
+ actionview (= 8.0.0)
+ activejob (= 8.0.0)
+ activemodel (= 8.0.0)
+ activerecord (= 8.0.0)
+ activestorage (= 8.0.0)
+ activesupport (= 8.0.0)
bundler (>= 1.15.0)
- railties (= 7.2.2)
+ railties (= 8.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
@@ -298,9 +298,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (7.2.2)
- actionpack (= 7.2.2)
- activesupport (= 7.2.2)
+ railties (8.0.0)
+ actionpack (= 8.0.0)
+ activesupport (= 8.0.0)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
@@ -308,32 +308,32 @@ GEM
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.2.1)
- ranked-model (0.4.10)
+ ranked-model (0.4.11)
activerecord (>= 5.2)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
- rdoc (6.7.0)
+ rdoc (6.8.1)
psych (>= 4.0.0)
redcarpet (3.6.0)
redis-client (0.22.2)
connection_pool
- regexp_parser (2.9.0)
- reline (0.4.2)
+ regexp_parser (2.9.2)
+ reline (0.5.11)
io-console (~> 0.5)
rexml (3.3.9)
rr (3.1.1)
- rubocop (1.68.0)
+ rubocop (1.69.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
- rubocop-ast (>= 1.32.2, < 2.0)
+ rubocop-ast (>= 1.36.1, < 2.0)
ruby-progressbar (~> 1.7)
- unicode-display_width (>= 2.4.0, < 3.0)
- rubocop-ast (1.33.0)
+ unicode-display_width (>= 2.4.0, < 4.0)
+ rubocop-ast (1.36.2)
parser (>= 3.3.1.0)
rubocop-rails (2.27.0)
activesupport (>= 4.2.0)
@@ -352,8 +352,8 @@ GEM
tilt
sdoc (2.6.1)
rdoc (>= 5.0)
- securerandom (0.3.1)
- selenium-webdriver (4.26.0)
+ securerandom (0.3.2)
+ selenium-webdriver (4.27.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
@@ -393,11 +393,11 @@ GEM
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
- stringio (3.1.1)
+ stringio (3.1.2)
sysexits (1.2.0)
terser (1.2.4)
execjs (>= 0.3.0, < 3)
- test-unit (3.6.2)
+ test-unit (3.6.4)
power_assert
test-unit-activesupport (1.1.2)
activesupport
@@ -417,11 +417,13 @@ GEM
test-unit (>= 2.5.2)
thor (1.3.2)
tilt (2.4.0)
- timeout (0.4.1)
+ timeout (0.4.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
- unicode-display_width (2.6.0)
- uri (0.13.1)
+ unicode-display_width (3.1.2)
+ unicode-emoji (~> 4.0, >= 4.0.4)
+ unicode-emoji (4.0.4)
+ uri (1.0.2)
useragent (0.16.10)
version_gem (1.1.4)
web-console (4.2.1)
@@ -465,10 +467,11 @@ DEPENDENCIES
meta-tags
mysql2 (~> 0.5)
net-smtp
+ nkf
pry-rails
puma (< 7)
puma_worker_killer
- rails (~> 7.2.0)
+ rails (~> 8.0.0)
rails-controller-testing
rake
ranked-model
diff --git a/bin/setup b/bin/setup
index 718cd456..be3db3c0 100755
--- a/bin/setup
+++ b/bin/setup
@@ -2,7 +2,6 @@
require "fileutils"
APP_ROOT = File.expand_path("..", __dir__)
-APP_NAME = "log-archiver"
def system!(*args)
system(*args, exception: true)
@@ -14,7 +13,6 @@ FileUtils.chdir APP_ROOT do
# Add necessary setup steps to this file.
puts "== Installing dependencies =="
- system! "gem install bundler --conservative"
system("bundle check") || system!("bundle install")
# puts "\n== Copying sample files =="
@@ -28,10 +26,9 @@ FileUtils.chdir APP_ROOT do
puts "\n== Removing old logs and tempfiles =="
system! "bin/rails log:clear tmp:clear"
- puts "\n== Restarting application server =="
- system! "bin/rails restart"
-
- # puts "\n== Configuring puma-dev =="
- # system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
- # system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
+ unless ARGV.include?("--skip-server")
+ puts "\n== Starting development server =="
+ STDOUT.flush # flush the output before exec(2) so that it displays
+ exec "bin/dev"
+ end
end
diff --git a/bin/thrust b/bin/thrust
new file mode 100755
index 00000000..36bde2d8
--- /dev/null
+++ b/bin/thrust
@@ -0,0 +1,5 @@
+#!/usr/bin/env ruby
+require "rubygems"
+require "bundler/setup"
+
+load Gem.bin_path("thruster", "thrust")
diff --git a/config/application.rb b/config/application.rb
index f0363ee2..459f0c0c 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -9,7 +9,7 @@
module LogArchiver
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
- config.load_defaults 7.2
+ config.load_defaults 8.0
# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 9b673600..4cc21c4e 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -3,9 +3,7 @@
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
- # In the development environment your application's code is reloaded any time
- # it changes. This slows down response time but is perfect for development
- # since you don't have to restart the web server when you make code changes.
+ # Make code changes take effect immediately without server restart.
config.enable_reloading = true
# Do not eager load code on boot.
@@ -17,53 +15,46 @@
# Enable server timing.
config.server_timing = true
- # Enable/disable caching. By default caching is disabled.
- # Run rails dev:cache to toggle caching.
+ # Enable/disable Action Controller caching. By default Action Controller caching is disabled.
+ # Run rails dev:cache to toggle Action Controller 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=#{2.days.to_i}" }
+ config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
else
config.action_controller.perform_caching = false
-
- config.cache_store = :null_store
end
+ # Change to :null_store to avoid any caching.
+ config.cache_store = :memory_store
+
# 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
- # Disable caching for Action Mailer templates even if Action Controller
- # caching is enabled.
+ # Make template changes take effect immediately.
config.action_mailer.perform_caching = false
+ # Set localhost to be used by links generated in mailer templates.
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
- # Raise exceptions for disallowed deprecations.
- config.active_support.disallowed_deprecation = :raise
-
- # Tell Active Support which deprecation messages to disallow.
- config.active_support.disallowed_deprecation_warnings = []
-
# 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
+ # Append comments with runtime information tags to SQL queries in logs.
+ config.active_record.query_log_tags_enabled = true
+
# Highlight code that enqueued background job in logs.
config.active_job.verbose_enqueue_logs = true
- # Suppress logger output for asset requests.
- config.assets.quiet = true
-
# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 7bff5053..5e2cfbdc 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -6,116 +6,92 @@
# Code is not reloaded between requests.
config.enable_reloading = false
- # Eager load code on boot. This eager loads most of Rails and
- # your application in memory, allowing both threaded web servers
- # and those relying on copy on write to perform better.
- # Rake tasks automatically ignore this option for performance.
+ # Eager load code on boot for better performance and memory savings (ignored by Rake tasks).
config.eager_load = true
- # Full error reports are disabled and caching is turned on.
+ # Full error reports are disabled.
config.consider_all_requests_local = false
- config.action_controller.perform_caching = true
-
- # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
- # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
- # config.require_master_key = true
- # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
- # config.public_file_server.enabled = false
+ # Turn on fragment caching in view templates.
+ config.action_controller.perform_caching = true
# Compress CSS using a preprocessor.
config.assets.js_compressor = :terser
config.assets.terser = { output: { ascii_only: false } }
- # config.assets.css_compressor = :sass
# Do not fall back to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
+ # Cache assets for far-future expiry since they are all digest stamped.
+ config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.asset_host = "http://assets.example.com"
- # Specifies the header that your server uses for sending files.
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
- # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
-
# 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.*/ ]
-
# Assume all access to the app is happening through a SSL-terminating reverse proxy.
- # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
- # config.assume_ssl = true
+ #config.assume_ssl = true
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
- # config.force_ssl = true
+ #config.force_ssl = true
# Skip http-to-https redirect for the default health check endpoint.
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
- # Log to STDOUT by default
- config.logger = ActiveSupport::Logger.new(STDOUT)
- .tap { |logger| logger.formatter = ::Logger::Formatter.new }
- .then { |logger| ActiveSupport::TaggedLogging.new(logger) }
-
- # Prepend all log lines with the following tags.
+ # Log to STDOUT with the current request id as a default log tag.
config.log_tags = [ :request_id ]
+ config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
- # "info" includes generic and useful information about system operation, but avoids logging too much
- # information to avoid inadvertent exposure of personally identifiable information (PII). If you
- # want to log everything, set the level to "debug".
+ # Change to "debug" to log everything (including potentially personally-identifiable information!)
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
- # Use a different cache store in production.
+ # Prevent health checks from clogging up the logs.
+ config.silence_healthcheck_path = "/up"
+
+ # Don't log any deprecations.
+ config.active_support.report_deprecations = false
+
+ # Replace the default in-process memory cache store with a durable alternative.
# config.cache_store = :mem_cache_store
- # Use a real queuing backend for Active Job (and separate queues per environment).
+ # Replace the default in-process and non-durable queuing backend for Active Job.
# config.active_job.queue_adapter = :resque
- # config.active_job.queue_name_prefix = "log_archiver_production"
-
- # Disable caching for Action Mailer templates even if Action Controller
- # caching is enabled.
- config.action_mailer.perform_caching = false
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
+ # Set host to be used by links generated in mailer templates.
+ config.action_mailer.default_url_options = { host: "example.com" }
+
+ # Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit.
+ # config.action_mailer.smtp_settings = {
+ # user_name: Rails.application.credentials.dig(:smtp, :user_name),
+ # password: Rails.application.credentials.dig(:smtp, :password),
+ # address: "smtp.example.com",
+ # port: 587,
+ # authentication: :plain
+ # }
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
#config.i18n.fallbacks = true
config.i18n.fallbacks = [I18n.default_locale]
- # Send deprecation notices to registered listeners.
- config.active_support.deprecation = :notify
-
- # Log disallowed deprecations.
- config.active_support.disallowed_deprecation = :log
-
- # Tell Active Support which deprecation messages to disallow.
- config.active_support.disallowed_deprecation_warnings = []
-
- # Use default logging formatter so that PID and timestamp are not suppressed.
- config.log_formatter = ::Logger::Formatter.new
-
- # Use a different logger for distributed setups.
- # require "syslog/logger"
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
-
- # Don't log any deprecations.
- config.active_support.report_deprecations = false
-
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
+ # Only use :id for inspections in production.
+ config.active_record.attributes_for_inspect = [ :id ]
+
# Enable DNS rebinding protection and other `Host` header attacks.
# config.hosts = [
# "example.com", # Allow requests from example.com
# /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
# ]
+ #
# Skip DNS rebinding protection for the default health check endpoint.
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
end
diff --git a/config/environments/test.rb b/config/environments/test.rb
index fd258cca..77e26c2c 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,5 +1,3 @@
-require "active_support/core_ext/integer/time"
-
# 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
@@ -17,12 +15,11 @@
# loading is working properly before deploying your code.
config.eager_load = ENV["CI"].present?
- # Configure public file server for tests with Cache-Control for performance.
- config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" }
+ # Configure public file server for tests with cache-control for performance.
+ config.public_file_server.headers = { "cache-control" => "public, max-age=3600" }
- # Show full error reports and disable caching.
+ # Show full error reports.
config.consider_all_requests_local = true
- config.action_controller.perform_caching = false
config.cache_store = :null_store
# Render exception templates for rescuable exceptions and raise for other exceptions.
@@ -34,18 +31,13 @@
# Store uploaded files on the local file system in a temporary directory.
config.active_storage.service = :test
- # Disable caching for Action Mailer templates even if Action Controller
- # caching is enabled.
- config.action_mailer.perform_caching = false
-
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
- # Unlike controllers, the mailer instance doesn't have any context about the
- # incoming request so you'll need to provide the :host parameter yourself.
- config.action_mailer.default_url_options = { host: "www.example.com" }
+ # Set host to be used by links generated in mailer templates.
+ config.action_mailer.default_url_options = { host: "example.com" }
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
@@ -55,12 +47,6 @@
# @see https://railsguides.jp/upgrading_ruby_on_rails.html#activesupport-testcase-%E3%81%A7%E3%81%AE%E3%83%86%E3%82%B9%E3%83%88%E3%81%AF%E4%BB%8A%E5%BE%8C%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%81%A7%E3%83%A9%E3%83%B3%E3%83%80%E3%83%A0%E3%81%AB%E5%AE%9F%E8%A1%8C%E3%81%95%E3%82%8C%E3%82%8B
config.active_support.test_order = :sorted
- # Raise exceptions for disallowed deprecations.
- config.active_support.disallowed_deprecation = :raise
-
- # Tell Active Support which deprecation messages to disallow.
- config.active_support.disallowed_deprecation_warnings = []
-
# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index bd5bcd2b..48732442 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -5,8 +5,3 @@
# 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 the app/assets
-# folder are already added.
-# Rails.application.config.assets.precompile += %w[ admin.js admin.css ]
diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb
index c010b83d..c0b717f7 100644
--- a/config/initializers/filter_parameter_logging.rb
+++ b/config/initializers/filter_parameter_logging.rb
@@ -4,5 +4,5 @@
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
- :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
+ :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
]
diff --git a/config/initializers/new_framework_defaults_8_0.rb b/config/initializers/new_framework_defaults_8_0.rb
new file mode 100644
index 00000000..92efa951
--- /dev/null
+++ b/config/initializers/new_framework_defaults_8_0.rb
@@ -0,0 +1,30 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file eases your Rails 8.0 framework defaults upgrade.
+#
+# Uncomment each configuration one by one to switch to the new default.
+# Once your application is ready to run with all new defaults, you can remove
+# this file and set the `config.load_defaults` to `8.0`.
+#
+# Read the Guide for Upgrading Ruby on Rails for more info on each option.
+# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
+
+###
+# Specifies whether `to_time` methods preserve the UTC offset of their receivers or preserves the timezone.
+# If set to `:zone`, `to_time` methods will use the timezone of their receivers.
+# If set to `:offset`, `to_time` methods will use the UTC offset.
+# If `false`, `to_time` methods will convert to the local system UTC offset instead.
+#++
+# Rails.application.config.active_support.to_time_preserves_timezone = :zone
+
+###
+# When both `If-Modified-Since` and `If-None-Match` are provided by the client
+# only consider `If-None-Match` as specified by RFC 7232 Section 6.
+# If set to `false` both conditions need to be satisfied.
+#++
+# Rails.application.config.action_dispatch.strict_freshness = true
+
+###
+# Set `Regexp.timeout` to `1`s by default to improve security over Regexp Denial-of-Service attacks.
+#++
+# Regexp.timeout = 1
diff --git a/config/puma.rb b/config/puma.rb
index 50f696f4..6ccdca1b 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -1,13 +1,17 @@
# This configuration file will be evaluated by Puma. The top-level methods that
# are invoked here are part of Puma's configuration DSL. For more information
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
-
+#
# Puma starts a configurable number of processes (workers) and each process
# serves each request in a thread from an internal thread pool.
#
+# You can control the number of workers using ENV["WEB_CONCURRENCY"]. You
+# should only set this value when you want to run 2 or more workers. The
+# default is already 1.
+#
# The ideal number of threads per worker depends both on how much time the
# application spends waiting for IO operations and on how much you wish to
-# to prioritize throughput over latency.
+# prioritize throughput over latency.
#
# As a rule of thumb, increasing the number of threads will increase how much
# traffic a given process can handle (throughput), but due to CRuby's
@@ -16,12 +20,11 @@
#
# The default is set to 3 threads as it's deemed a decent compromise between
# throughput and latency for the average Rails application.
-#
+
# 参考: http://nekorails.hatenablog.com/entry/2018/10/12/101011
# Rails のルートパス
rails_root = File.expand_path('../../', __FILE__)
-
directory rails_root
# Puma can serve each request in a thread from an internal thread pool.
@@ -45,8 +48,8 @@
if ENV.fetch("RAILS_ENV", "development") == "development"
bind "tcp://0.0.0.0:3000"
else
- port ENV.fetch("PORT") { 8081 }
- #bind "unix://#{rails_root}/tmp/sockets/puma.sock"
+ port ENV.fetch("PORT") { 8081 }
+ #bind "unix://#{rails_root}/tmp/sockets/puma.sock"
end
# Specifies the `environment` that Puma will run in.
@@ -55,6 +58,9 @@
# pumactl で操作する為に必要なファイル
state_path "#{rails_root}/tmp/pids/puma.state"
+# Allow puma to be restarted by `bin/rails restart` command.
+plugin :tmp_restart
+
# ログファイルのパス
stdout_redirect(
"#{rails_root}/log/puma_stdout.log",
@@ -62,16 +68,18 @@
true
) unless ENV.fetch("RAILS_ENV", "development") == "development"
+# Run the Solid Queue supervisor inside of Puma for single-server deployments
+plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]
+
# Specify the PID file. Defaults to tmp/pids/server.pid in development.
# In other environments, only set the PID file if requested.
-pidfile File.expand_path('../../tmp/pids/puma.pid', __FILE__)
+pidfile File.expand_path('../../tmp/pids/puma.pid', __FILE__) unless ENV["PIDFILE"]
# Specifies the number of `workers` to boot in clustered mode.
-# Workers are forked web server processes. If using threads and workers together
-# the concurrency of the application would be max `threads` * `workers`.
+# Workers are forked web server processes. If using threads and workers
+# together concurrency of the application would be max `threads` * `workers`.
# Workers do not work on JRuby or Windows (both of which do not support
# processes).
-#
workers ENV.fetch("WEB_CONCURRENCY") { 3 }
# Use the `preload_app!` method when specifying a `workers` number.
@@ -111,6 +119,3 @@
on_worker_boot do
ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
end
-
-# Allow puma to be restarted by `bin/rails restart` command.
-plugin :tmp_restart
diff --git a/package.json b/package.json
index 974a7b45..f34d441b 100644
--- a/package.json
+++ b/package.json
@@ -1,24 +1,24 @@
{
"dependencies": {
- "@fortawesome/fontawesome-svg-core": "^6.6.0",
- "@fortawesome/free-brands-svg-icons": "^6.6.0",
- "@fortawesome/free-solid-svg-icons": "^6.6.0",
+ "@fortawesome/fontawesome-svg-core": "^6.7.1",
+ "@fortawesome/free-brands-svg-icons": "^6.7.1",
+ "@fortawesome/free-solid-svg-icons": "^6.7.1",
"case-sensitive-paths-webpack-plugin": "^2.4.0",
"chart.js": "^4.4.6",
"css-loader": "^7.1.2",
"flatpickr": "^4.6.13",
"js-cookie": "^3.0.5",
"mini-css-extract-plugin": "^2.9.2",
- "sass": "^1.80.5",
+ "sass": "^1.81.0",
"sass-loader": "^16.0.3",
"stimulus": "^3.2.2",
- "webpack": "^5.96.0",
+ "webpack": "^5.96.1",
"webpack-assets-manifest": "^5.2.1",
"webpack-cli": "^5.1.4"
},
"devDependencies": {
"@babel/eslint-parser": "^7.25.9",
- "eslint": "^9.13.0",
+ "eslint": "^9.15.0",
"webpack-dev-server": "^5.1.0"
},
"scripts": {
diff --git a/public/400.html b/public/400.html
new file mode 100644
index 00000000..282dbc8c
--- /dev/null
+++ b/public/400.html
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+ The server cannot process the request due to a client error (400 Bad Request)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The server cannot process the request due to a client error. Please check the request and try again. If you’re the application owner check the logs for more information.
+
+
+
+
+
+
diff --git a/public/404.html b/public/404.html
index 2be3af26..c0670bc8 100644
--- a/public/404.html
+++ b/public/404.html
@@ -1,67 +1,114 @@
-
-
-
- The page you were looking for doesn't exist (404)
-
-
-
-
-
-
-
-
-
The page you were looking for doesn't exist.
-
You may have mistyped the address or the page may have moved.
-
-
If you are the application owner check the logs for more information.
-
-
+
+
+
+
+
+
+ The page you were looking for doesn’t exist (404 Not found)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The page you were looking for doesn’t exist. You may have mistyped the address or the page may have moved. If you’re the application owner check the logs for more information.
+
+
+
+
+
diff --git a/public/406-unsupported-browser.html b/public/406-unsupported-browser.html
index 7cf1e168..9532a9cc 100644
--- a/public/406-unsupported-browser.html
+++ b/public/406-unsupported-browser.html
@@ -1,66 +1,114 @@
-
-
-
- Your browser is not supported (406)
-
-
-
-
-
-
-
-
-
Your browser is not supported.
-
Please upgrade your browser to continue.
-
-
-
+
+
+
+
+
+
+ Your browser is not supported (406 Not Acceptable)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Your browser is not supported. Please upgrade your browser to continue.
+
+
+
+
+
diff --git a/public/422.html b/public/422.html
index c08eac0d..8bcf0601 100644
--- a/public/422.html
+++ b/public/422.html
@@ -1,67 +1,114 @@
-
-
-
- The change you wanted was rejected (422)
-
-
-
-
-
-
-
-
-
The change you wanted was rejected.
-
Maybe you tried to change something you didn't have access to.
-
-
If you are the application owner check the logs for more information.
The change you wanted was rejected. Maybe you tried to change something you didn’t have access to. If you’re the application owner check the logs for more information.