Skip to content

Commit fd9f017

Browse files
committed
rails 8.0
1 parent a07ad0d commit fd9f017

File tree

19 files changed

+725
-441
lines changed

19 files changed

+725
-441
lines changed

Gemfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,15 @@ gem 'bootstrap-sass'
88
gem 'berkeley_library-logging'
99
gem 'bundler-audit'
1010
gem 'coffee-rails'
11-
gem 'drb'
1211
gem 'font-awesome-rails'
1312
gem 'jbuilder', '~> 2.7'
1413
gem 'jquery-rails', '~> 4.4'
15-
gem 'logger'
1614
gem 'lograge', '~> 0.11'
17-
gem 'mutex_m'
1815
gem 'mysql2', '~> 0.5.4'
19-
gem 'nio4r', '~> 2.7'
2016
gem 'nokogiri', '~> 1.18'
2117
gem 'ougai', '~> 1.8'
2218
gem 'puma', '~> 4.3'
23-
gem 'rails', '~> 7.2.2'
19+
gem 'rails', '~> 8.0.0'
2420
gem 'rails-healthcheck'
2521
gem 'rake'
2622
gem 'sass-rails', '>= 6'

Gemfile.lock

Lines changed: 57 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,65 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.2.3)
5-
actionpack (= 7.2.3)
6-
activesupport (= 7.2.3)
4+
actioncable (8.0.4)
5+
actionpack (= 8.0.4)
6+
activesupport (= 8.0.4)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
99
zeitwerk (~> 2.6)
10-
actionmailbox (7.2.3)
11-
actionpack (= 7.2.3)
12-
activejob (= 7.2.3)
13-
activerecord (= 7.2.3)
14-
activestorage (= 7.2.3)
15-
activesupport (= 7.2.3)
10+
actionmailbox (8.0.4)
11+
actionpack (= 8.0.4)
12+
activejob (= 8.0.4)
13+
activerecord (= 8.0.4)
14+
activestorage (= 8.0.4)
15+
activesupport (= 8.0.4)
1616
mail (>= 2.8.0)
17-
actionmailer (7.2.3)
18-
actionpack (= 7.2.3)
19-
actionview (= 7.2.3)
20-
activejob (= 7.2.3)
21-
activesupport (= 7.2.3)
17+
actionmailer (8.0.4)
18+
actionpack (= 8.0.4)
19+
actionview (= 8.0.4)
20+
activejob (= 8.0.4)
21+
activesupport (= 8.0.4)
2222
mail (>= 2.8.0)
2323
rails-dom-testing (~> 2.2)
24-
actionpack (7.2.3)
25-
actionview (= 7.2.3)
26-
activesupport (= 7.2.3)
27-
cgi
24+
actionpack (8.0.4)
25+
actionview (= 8.0.4)
26+
activesupport (= 8.0.4)
2827
nokogiri (>= 1.8.5)
29-
racc
30-
rack (>= 2.2.4, < 3.3)
28+
rack (>= 2.2.4)
3129
rack-session (>= 1.0.1)
3230
rack-test (>= 0.6.3)
3331
rails-dom-testing (~> 2.2)
3432
rails-html-sanitizer (~> 1.6)
3533
useragent (~> 0.16)
36-
actiontext (7.2.3)
37-
actionpack (= 7.2.3)
38-
activerecord (= 7.2.3)
39-
activestorage (= 7.2.3)
40-
activesupport (= 7.2.3)
34+
actiontext (8.0.4)
35+
actionpack (= 8.0.4)
36+
activerecord (= 8.0.4)
37+
activestorage (= 8.0.4)
38+
activesupport (= 8.0.4)
4139
globalid (>= 0.6.0)
4240
nokogiri (>= 1.8.5)
43-
actionview (7.2.3)
44-
activesupport (= 7.2.3)
41+
actionview (8.0.4)
42+
activesupport (= 8.0.4)
4543
builder (~> 3.1)
46-
cgi
4744
erubi (~> 1.11)
4845
rails-dom-testing (~> 2.2)
4946
rails-html-sanitizer (~> 1.6)
50-
activejob (7.2.3)
51-
activesupport (= 7.2.3)
47+
activejob (8.0.4)
48+
activesupport (= 8.0.4)
5249
globalid (>= 0.3.6)
53-
activemodel (7.2.3)
54-
activesupport (= 7.2.3)
55-
activerecord (7.2.3)
56-
activemodel (= 7.2.3)
57-
activesupport (= 7.2.3)
50+
activemodel (8.0.4)
51+
activesupport (= 8.0.4)
52+
activerecord (8.0.4)
53+
activemodel (= 8.0.4)
54+
activesupport (= 8.0.4)
5855
timeout (>= 0.4.0)
59-
activestorage (7.2.3)
60-
actionpack (= 7.2.3)
61-
activejob (= 7.2.3)
62-
activerecord (= 7.2.3)
63-
activesupport (= 7.2.3)
56+
activestorage (8.0.4)
57+
actionpack (= 8.0.4)
58+
activejob (= 8.0.4)
59+
activerecord (= 8.0.4)
60+
activesupport (= 8.0.4)
6461
marcel (~> 1.0)
65-
activesupport (7.2.3)
62+
activesupport (8.0.4)
6663
base64
6764
benchmark (>= 0.3)
6865
bigdecimal
@@ -74,6 +71,7 @@ GEM
7471
minitest (>= 5.1)
7572
securerandom (>= 0.3)
7673
tzinfo (~> 2.0, >= 2.0.5)
74+
uri (>= 0.13.1)
7775
addressable (2.8.7)
7876
public_suffix (>= 2.0.2, < 7.0)
7977
amazing_print (1.8.1)
@@ -108,7 +106,6 @@ GEM
108106
rack-test (>= 0.6.3)
109107
regexp_parser (>= 1.5, < 3.0)
110108
xpath (~> 3.2)
111-
cgi (0.5.0)
112109
coffee-rails (5.0.0)
113110
coffee-script (>= 2.2.0)
114111
railties (>= 5.2.0)
@@ -168,7 +165,6 @@ GEM
168165
matrix (0.4.3)
169166
mini_mime (1.1.5)
170167
minitest (5.26.2)
171-
mutex_m (0.2.0)
172168
mysql2 (0.5.7)
173169
bigdecimal
174170
net-imap (0.5.12)
@@ -214,20 +210,20 @@ GEM
214210
rackup (1.0.1)
215211
rack (< 3)
216212
webrick
217-
rails (7.2.3)
218-
actioncable (= 7.2.3)
219-
actionmailbox (= 7.2.3)
220-
actionmailer (= 7.2.3)
221-
actionpack (= 7.2.3)
222-
actiontext (= 7.2.3)
223-
actionview (= 7.2.3)
224-
activejob (= 7.2.3)
225-
activemodel (= 7.2.3)
226-
activerecord (= 7.2.3)
227-
activestorage (= 7.2.3)
228-
activesupport (= 7.2.3)
213+
rails (8.0.4)
214+
actioncable (= 8.0.4)
215+
actionmailbox (= 8.0.4)
216+
actionmailer (= 8.0.4)
217+
actionpack (= 8.0.4)
218+
actiontext (= 8.0.4)
219+
actionview (= 8.0.4)
220+
activejob (= 8.0.4)
221+
activemodel (= 8.0.4)
222+
activerecord (= 8.0.4)
223+
activestorage (= 8.0.4)
224+
activesupport (= 8.0.4)
229225
bundler (>= 1.15.0)
230-
railties (= 7.2.3)
226+
railties (= 8.0.4)
231227
rails-dom-testing (2.3.0)
232228
activesupport (>= 5.0.0)
233229
minitest
@@ -238,10 +234,9 @@ GEM
238234
rails-html-sanitizer (1.6.2)
239235
loofah (~> 2.21)
240236
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)
241-
railties (7.2.3)
242-
actionpack (= 7.2.3)
243-
activesupport (= 7.2.3)
244-
cgi
237+
railties (8.0.4)
238+
actionpack (= 8.0.4)
239+
activesupport (= 8.0.4)
245240
irb (~> 1.13)
246241
rackup (>= 1.0.0)
247242
rake (>= 12.2)
@@ -338,6 +333,7 @@ GEM
338333
tzinfo (2.0.6)
339334
concurrent-ruby (~> 1.0)
340335
unicode-display_width (2.6.0)
336+
uri (1.1.1)
341337
useragent (0.16.11)
342338
web-console (4.2.1)
343339
actionview (>= 6.0.0)
@@ -372,20 +368,16 @@ DEPENDENCIES
372368
byebug
373369
capybara (>= 2.15)
374370
coffee-rails
375-
drb
376371
font-awesome-rails
377372
jbuilder (~> 2.7)
378373
jquery-rails (~> 4.4)
379374
listen (~> 3.2)
380-
logger
381375
lograge (~> 0.11)
382-
mutex_m
383376
mysql2 (~> 0.5.4)
384-
nio4r (~> 2.7)
385377
nokogiri (~> 1.18)
386378
ougai (~> 1.8)
387379
puma (~> 4.3)
388-
rails (~> 7.2.2)
380+
rails (~> 8.0.0)
389381
rails-healthcheck
390382
rake
391383
rspec-rails

bin/dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env ruby
2+
exec "./bin/rails", "server", *ARGV

bin/setup

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
require "fileutils"
33

44
APP_ROOT = File.expand_path("..", __dir__)
5-
APP_NAME = "new-nara"
65

76
def system!(*args)
87
system(*args, exception: true)
@@ -14,7 +13,6 @@ FileUtils.chdir APP_ROOT do
1413
# Add necessary setup steps to this file.
1514

1615
puts "== Installing dependencies =="
17-
system! "gem install bundler --conservative"
1816
system("bundle check") || system!("bundle install")
1917

2018
# puts "\n== Copying sample files =="
@@ -28,10 +26,9 @@ FileUtils.chdir APP_ROOT do
2826
puts "\n== Removing old logs and tempfiles =="
2927
system! "bin/rails log:clear tmp:clear"
3028

31-
puts "\n== Restarting application server =="
32-
system! "bin/rails restart"
33-
34-
# puts "\n== Configuring puma-dev =="
35-
# system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
36-
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
29+
unless ARGV.include?("--skip-server")
30+
puts "\n== Starting development server =="
31+
STDOUT.flush # flush the output before exec(2) so that it displays
32+
exec "bin/dev"
33+
end
3734
end

config/application.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
module NewNara
1313
class Application < Rails::Application
1414
# Initialize configuration defaults for originally generated Rails version.
15-
config.load_defaults 7.2
15+
config.load_defaults 8.0
1616

1717
# Please, add to the `ignore` list any other `lib` subdirectories that do
1818
# not contain `.rb` files, or that should not be reloaded or eager loaded.
1919
# Common ones are `templates`, `generators`, or `middleware`, for example.
20-
config.autoload_lib(ignore: %w(assets tasks))
21-
20+
config.autoload_lib(ignore: %w[assets tasks])
21+
2222
# Configuration for the application, engines, and railties goes here.
2323
#
24-
# These settings can be overridden in specific environments using the iles
24+
# These settings can be overridden in specific environments using the files
2525
# in config/environments, which are processed later.
2626
#
2727
# config.time_zone = "Central Time (US & Canada)"

config/environments/development.rb

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
Rails.application.configure do
44
# Settings specified here will take precedence over those in config/application.rb.
55

6-
# In the development environment your application's code is reloaded any time
7-
# it changes. This slows down response time but is perfect for development
8-
# since you don't have to restart the web server when you make code changes.
6+
# Make code changes take effect immediately without server restart.
97
config.enable_reloading = true
108

119
# Do not eager load code on boot.
@@ -17,53 +15,46 @@
1715
# Enable server timing.
1816
config.server_timing = true
1917

20-
# Enable/disable caching. By default caching is disabled.
21-
# Run rails dev:cache to toggle caching.
18+
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
19+
# Run rails dev:cache to toggle Action Controller caching.
2220
if Rails.root.join("tmp/caching-dev.txt").exist?
2321
config.action_controller.perform_caching = true
2422
config.action_controller.enable_fragment_cache_logging = true
25-
26-
config.cache_store = :memory_store
27-
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
23+
config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
2824
else
2925
config.action_controller.perform_caching = false
30-
31-
config.cache_store = :null_store
3226
end
3327

28+
# Change to :null_store to avoid any caching.
29+
config.cache_store = :memory_store
30+
3431
# Store uploaded files on the local file system (see config/storage.yml for options).
3532
config.active_storage.service = :local
3633

3734
# Don't care if the mailer can't send.
3835
config.action_mailer.raise_delivery_errors = false
3936

40-
# Disable caching for Action Mailer templates even if Action Controller
41-
# caching is enabled.
37+
# Make template changes take effect immediately.
4238
config.action_mailer.perform_caching = false
4339

40+
# Set localhost to be used by links generated in mailer templates.
4441
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
4542

4643
# Print deprecation notices to the Rails logger.
4744
config.active_support.deprecation = :log
4845

49-
# Raise exceptions for disallowed deprecations.
50-
config.active_support.disallowed_deprecation = :raise
51-
52-
# Tell Active Support which deprecation messages to disallow.
53-
config.active_support.disallowed_deprecation_warnings = []
54-
5546
# Raise an error on page load if there are pending migrations.
5647
config.active_record.migration_error = :page_load
5748

5849
# Highlight code that triggered database queries in logs.
5950
config.active_record.verbose_query_logs = true
6051

52+
# Append comments with runtime information tags to SQL queries in logs.
53+
config.active_record.query_log_tags_enabled = true
54+
6155
# Highlight code that enqueued background job in logs.
6256
config.active_job.verbose_enqueue_logs = true
6357

64-
# Suppress logger output for asset requests.
65-
config.assets.quiet = true
66-
6758
# Raises error for missing translations.
6859
# config.i18n.raise_on_missing_translations = true
6960

0 commit comments

Comments
 (0)