Skip to content

Commit

Permalink
Merge pull request #198 from splaplapla/upgrade-rails
Browse files Browse the repository at this point in the history
Use rails-7.1.3.2
  • Loading branch information
jiikko authored Apr 22, 2024
2 parents 10493ce + 46c8289 commit 4efe57e
Show file tree
Hide file tree
Showing 16 changed files with 127 additions and 104 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rails_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=test -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=example_test --entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password" # NOTE: https://gist.github.com/kmcphillips/55043742fcf6e882a7e2eb90611a4910
ports:
- 3306:3306
redis:
Expand Down
5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.2.2'

gem 'rails', "7.0.8.1"
# gem "trilogy"
gem "mysql2"
gem 'rails', "7.1.3.2"
gem "trilogy"
gem 'puma'
gem 'cssbundling-rails'
gem 'importmap-rails'
Expand Down
169 changes: 100 additions & 69 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,88 @@ GEM
specs:
action_cable_client (3.1.0)
websocket-eventmachine-client (>= 1.2.0)
actioncable (7.0.8.1)
actionpack (= 7.0.8.1)
activesupport (= 7.0.8.1)
actioncable (7.1.3.2)
actionpack (= 7.1.3.2)
activesupport (= 7.1.3.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8.1)
actionpack (= 7.0.8.1)
activejob (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.3.2)
actionpack (= 7.1.3.2)
activejob (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8.1)
actionpack (= 7.0.8.1)
actionview (= 7.0.8.1)
activejob (= 7.0.8.1)
activesupport (= 7.0.8.1)
actionmailer (7.1.3.2)
actionpack (= 7.1.3.2)
actionview (= 7.1.3.2)
activejob (= 7.1.3.2)
activesupport (= 7.1.3.2)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8.1)
actionview (= 7.0.8.1)
activesupport (= 7.0.8.1)
rack (~> 2.0, >= 2.2.4)
rails-dom-testing (~> 2.2)
actionpack (7.1.3.2)
actionview (= 7.1.3.2)
activesupport (= 7.1.3.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.8.1)
actionpack (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3.2)
actionpack (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8.1)
activesupport (= 7.0.8.1)
actionview (7.1.3.2)
activesupport (= 7.1.3.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.8.1)
activesupport (= 7.0.8.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3.2)
activesupport (= 7.1.3.2)
globalid (>= 0.3.6)
activemodel (7.0.8.1)
activesupport (= 7.0.8.1)
activerecord (7.0.8.1)
activemodel (= 7.0.8.1)
activesupport (= 7.0.8.1)
activestorage (7.0.8.1)
actionpack (= 7.0.8.1)
activejob (= 7.0.8.1)
activerecord (= 7.0.8.1)
activesupport (= 7.0.8.1)
activemodel (7.1.3.2)
activesupport (= 7.1.3.2)
activerecord (7.1.3.2)
activemodel (= 7.1.3.2)
activesupport (= 7.1.3.2)
timeout (>= 0.4.0)
activestorage (7.1.3.2)
actionpack (= 7.1.3.2)
activejob (= 7.1.3.2)
activerecord (= 7.1.3.2)
activesupport (= 7.1.3.2)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8.1)
activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
acts-as-taggable-on (9.0.1)
activerecord (>= 6.0, < 7.1)
acts-as-taggable-on (10.0.0)
activerecord (>= 6.1, < 7.2)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.2.0)
bcrypt (3.1.19)
bigdecimal (3.1.7)
blue_green_process (0.1.4.2)
bootsnap (1.16.0)
msgpack (~> 1.2)
Expand All @@ -94,6 +105,7 @@ GEM
railties (>= 6.0.0)
date (3.3.4)
diff-lcs (1.5.0)
drb (2.2.1)
erubi (1.12.0)
eventmachine (1.2.7)
factory_bot (6.2.1)
Expand All @@ -115,6 +127,10 @@ GEM
importmap-rails (1.2.1)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
io-console (0.7.2)
irb (1.12.0)
rdoc
reline (>= 0.4.2)
json (2.6.3)
json-schema (4.0.0)
addressable (>= 2.8)
Expand Down Expand Up @@ -152,7 +168,7 @@ GEM
ruby2_keywords
msgpack (1.7.1)
multi_xml (0.6.0)
mysql2 (0.5.6)
mutex_m (0.2.0)
net-imap (0.4.10)
date
net-protocol
Expand Down Expand Up @@ -220,56 +236,68 @@ GEM
method_source (~> 1.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
psych (5.1.2)
stringio
public_suffix (5.0.1)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
rack (2.2.9)
rack-protection (3.0.6)
rack
rack-session (1.0.2)
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.8.1)
actioncable (= 7.0.8.1)
actionmailbox (= 7.0.8.1)
actionmailer (= 7.0.8.1)
actionpack (= 7.0.8.1)
actiontext (= 7.0.8.1)
actionview (= 7.0.8.1)
activejob (= 7.0.8.1)
activemodel (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
rackup (1.0.0)
rack (< 3)
webrick
rails (7.1.3.2)
actioncable (= 7.1.3.2)
actionmailbox (= 7.1.3.2)
actionmailer (= 7.1.3.2)
actionpack (= 7.1.3.2)
actiontext (= 7.1.3.2)
actionview (= 7.1.3.2)
activejob (= 7.1.3.2)
activemodel (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
bundler (>= 1.15.0)
railties (= 7.0.8.1)
railties (= 7.1.3.2)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.8.1)
actionpack (= 7.0.8.1)
activesupport (= 7.0.8.1)
method_source
railties (7.1.3.2)
actionpack (= 7.1.3.2)
activesupport (= 7.1.3.2)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbtree (0.4.6)
rdoc (6.6.3.1)
psych (>= 4.0.0)
redis (5.0.6)
redis-client (>= 0.9.0)
redis-client (0.14.1)
connection_pool
redis-namespace (1.11.0)
redis (>= 4)
regexp_parser (2.8.1)
reline (0.5.2)
io-console (~> 0.5)
rexml (3.2.5)
rmagick (5.3.0)
pkg-config (~> 1.4)
Expand Down Expand Up @@ -319,14 +347,17 @@ GEM
set (~> 1.0)
stimulus-rails (1.2.1)
railties (>= 6.0.0)
stringio (3.1.0)
thor (1.3.1)
timecop (0.9.6)
timeout (0.4.1)
trilogy (2.8.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
uri (0.12.2)
version_gem (1.1.3)
webrick (1.8.1)
websocket (1.2.9)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
Expand Down Expand Up @@ -361,7 +392,6 @@ DEPENDENCIES
kaminari
listen
mock_redis
mysql2
newrelic_rpm
omniauth-google-oauth2
omniauth-rails_csrf_protection
Expand All @@ -371,7 +401,7 @@ DEPENDENCIES
pry
pry-rails
puma
rails (= 7.0.8.1)
rails (= 7.1.3.2)
redis
redis-namespace
rmagick
Expand All @@ -381,6 +411,7 @@ DEPENDENCIES
sorcery
stimulus-rails
timecop
trilogy
uri (>= 0.12.2)

RUBY VERSION
Expand Down
2 changes: 1 addition & 1 deletion app/models/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def latest_loading_config_event
sessions_has_config = pbm_sessions.
joins(:events).
where(events: { event_type: [:reload_config, :load_config]})
Event.where(pbm_sessions: sessions_has_config).where(event_type: [:reload_config, :load_config]).order(created_at: :desc).limit(1).first
Event.where(pbm_session: sessions_has_config).where(event_type: [:reload_config, :load_config]).order(created_at: :desc).limit(1).first
end

# @return [String]
Expand Down
2 changes: 1 addition & 1 deletion app/models/event.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Event < ApplicationRecord
serialize :body, JSON
serialize :body, coder: JSON

EVENT_TYPE = {
boot: { value: 0, label: '起動完了', body_visibility: false },
Expand Down
2 changes: 1 addition & 1 deletion app/models/pbm_job.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class PbmJob < ApplicationRecord
belongs_to :device

serialize :args, JSON
serialize :args, coder: JSON

enum action: {
change_pbm_version: 0,
Expand Down
2 changes: 1 addition & 1 deletion app/models/pbm_remote_macro_job.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class PbmRemoteMacroJob < ApplicationRecord
belongs_to :device

serialize :steps, JSON
serialize :steps, coder: JSON

enum status: { queued: 0, in_progress: 5, processed: 10, failed: 15, canceled: 20 }

Expand Down
2 changes: 1 addition & 1 deletion app/models/saved_buttons_setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class SavedButtonsSetting < ApplicationRecord

belongs_to :user

serialize :content, JSON
serialize :content, coder: JSON

before_save :update_content_hash

Expand Down
2 changes: 1 addition & 1 deletion app/models/splatoon2_sketch.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Splatoon2Sketch < ApplicationRecord
belongs_to :user

serialize :crop_data, JSON
serialize :crop_data, coder: JSON

validates :encoded_image, presence: true
validate :validate_image_extension, if: :encoded_image?
Expand Down
2 changes: 1 addition & 1 deletion app/models/streaming_service_account.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class StreamingServiceAccount < ApplicationRecord
belongs_to :streaming_service

serialize :cached_data, JSON
serialize :cached_data, coder: JSON

before_create do
self.cached_data = {}
Expand Down
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 6.1

config.active_support.cache_format_version = 7.0

# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
Expand Down
2 changes: 1 addition & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default: &default
adapter: mysql2
adapter: trilogy
encoding: utf8mb4
charset: utf8mb4
collation: utf8mb4_bin
Expand Down
Loading

0 comments on commit 4efe57e

Please sign in to comment.