Skip to content

Commit d99ab45

Browse files
committed
Update Rails to 7.2.2.2
Rails 7.2 app:update Rails 7.2: enum with positional args Rails 7.2: enum positional args Rails 7.2: Enable 7.2 defaults
1 parent e8ff0e2 commit d99ab45

File tree

19 files changed

+312
-200
lines changed

19 files changed

+312
-200
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source 'https://rubygems.org'
22
ruby file: '.ruby-version'
33

4-
gem 'rails', '~> 7.1.5.1' # LOCKED: It is Rails.
4+
gem 'rails', '~> 7.2.2.2' # LOCKED: It is Rails.
55
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
66
gem 'sprockets-rails'
77

Gemfile.lock

Lines changed: 65 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -9,83 +9,77 @@ GIT
99
GEM
1010
remote: https://rubygems.org/
1111
specs:
12-
actioncable (7.1.5.2)
13-
actionpack (= 7.1.5.2)
14-
activesupport (= 7.1.5.2)
12+
actioncable (7.2.2.2)
13+
actionpack (= 7.2.2.2)
14+
activesupport (= 7.2.2.2)
1515
nio4r (~> 2.0)
1616
websocket-driver (>= 0.6.1)
1717
zeitwerk (~> 2.6)
18-
actionmailbox (7.1.5.2)
19-
actionpack (= 7.1.5.2)
20-
activejob (= 7.1.5.2)
21-
activerecord (= 7.1.5.2)
22-
activestorage (= 7.1.5.2)
23-
activesupport (= 7.1.5.2)
24-
mail (>= 2.7.1)
25-
net-imap
26-
net-pop
27-
net-smtp
28-
actionmailer (7.1.5.2)
29-
actionpack (= 7.1.5.2)
30-
actionview (= 7.1.5.2)
31-
activejob (= 7.1.5.2)
32-
activesupport (= 7.1.5.2)
33-
mail (~> 2.5, >= 2.5.4)
34-
net-imap
35-
net-pop
36-
net-smtp
18+
actionmailbox (7.2.2.2)
19+
actionpack (= 7.2.2.2)
20+
activejob (= 7.2.2.2)
21+
activerecord (= 7.2.2.2)
22+
activestorage (= 7.2.2.2)
23+
activesupport (= 7.2.2.2)
24+
mail (>= 2.8.0)
25+
actionmailer (7.2.2.2)
26+
actionpack (= 7.2.2.2)
27+
actionview (= 7.2.2.2)
28+
activejob (= 7.2.2.2)
29+
activesupport (= 7.2.2.2)
30+
mail (>= 2.8.0)
3731
rails-dom-testing (~> 2.2)
38-
actionpack (7.1.5.2)
39-
actionview (= 7.1.5.2)
40-
activesupport (= 7.1.5.2)
32+
actionpack (7.2.2.2)
33+
actionview (= 7.2.2.2)
34+
activesupport (= 7.2.2.2)
4135
nokogiri (>= 1.8.5)
4236
racc
43-
rack (>= 2.2.4)
37+
rack (>= 2.2.4, < 3.2)
4438
rack-session (>= 1.0.1)
4539
rack-test (>= 0.6.3)
4640
rails-dom-testing (~> 2.2)
4741
rails-html-sanitizer (~> 1.6)
48-
actiontext (7.1.5.2)
49-
actionpack (= 7.1.5.2)
50-
activerecord (= 7.1.5.2)
51-
activestorage (= 7.1.5.2)
52-
activesupport (= 7.1.5.2)
42+
useragent (~> 0.16)
43+
actiontext (7.2.2.2)
44+
actionpack (= 7.2.2.2)
45+
activerecord (= 7.2.2.2)
46+
activestorage (= 7.2.2.2)
47+
activesupport (= 7.2.2.2)
5348
globalid (>= 0.6.0)
5449
nokogiri (>= 1.8.5)
55-
actionview (7.1.5.2)
56-
activesupport (= 7.1.5.2)
50+
actionview (7.2.2.2)
51+
activesupport (= 7.2.2.2)
5752
builder (~> 3.1)
5853
erubi (~> 1.11)
5954
rails-dom-testing (~> 2.2)
6055
rails-html-sanitizer (~> 1.6)
61-
activejob (7.1.5.2)
62-
activesupport (= 7.1.5.2)
56+
activejob (7.2.2.2)
57+
activesupport (= 7.2.2.2)
6358
globalid (>= 0.3.6)
64-
activemodel (7.1.5.2)
65-
activesupport (= 7.1.5.2)
66-
activerecord (7.1.5.2)
67-
activemodel (= 7.1.5.2)
68-
activesupport (= 7.1.5.2)
59+
activemodel (7.2.2.2)
60+
activesupport (= 7.2.2.2)
61+
activerecord (7.2.2.2)
62+
activemodel (= 7.2.2.2)
63+
activesupport (= 7.2.2.2)
6964
timeout (>= 0.4.0)
70-
activestorage (7.1.5.2)
71-
actionpack (= 7.1.5.2)
72-
activejob (= 7.1.5.2)
73-
activerecord (= 7.1.5.2)
74-
activesupport (= 7.1.5.2)
65+
activestorage (7.2.2.2)
66+
actionpack (= 7.2.2.2)
67+
activejob (= 7.2.2.2)
68+
activerecord (= 7.2.2.2)
69+
activesupport (= 7.2.2.2)
7570
marcel (~> 1.0)
76-
activesupport (7.1.5.2)
71+
activesupport (7.2.2.2)
7772
base64
7873
benchmark (>= 0.3)
7974
bigdecimal
80-
concurrent-ruby (~> 1.0, >= 1.0.2)
75+
concurrent-ruby (~> 1.0, >= 1.3.1)
8176
connection_pool (>= 2.2.5)
8277
drb
8378
i18n (>= 1.6, < 2)
8479
logger (>= 1.4.2)
8580
minitest (>= 5.1)
86-
mutex_m
8781
securerandom (>= 0.3)
88-
tzinfo (~> 2.0)
82+
tzinfo (~> 2.0, >= 2.0.5)
8983
acts-as-taggable-on (12.0.0)
9084
activerecord (>= 7.1, < 8.1)
9185
zeitwerk (>= 2.4, < 3.0)
@@ -117,7 +111,7 @@ GEM
117111
erubi (>= 1.0.0)
118112
rack (>= 0.9.0)
119113
rouge (>= 1.0.0)
120-
bigdecimal (3.3.1)
114+
bigdecimal (3.2.3)
121115
bindex (0.8.1)
122116
binding_of_caller (1.0.1)
123117
debug_inspector (>= 1.2.0)
@@ -294,7 +288,7 @@ GEM
294288
mutex_m (0.3.0)
295289
net-http (0.6.0)
296290
uri
297-
net-imap (0.5.9)
291+
net-imap (0.5.10)
298292
date
299293
net-protocol
300294
net-pop (0.1.2)
@@ -383,7 +377,7 @@ GEM
383377
pundit (2.5.2)
384378
activesupport (>= 3.0.0)
385379
racc (1.8.1)
386-
rack (3.2.3)
380+
rack (3.1.19)
387381
rack-mini-profiler (4.0.1)
388382
rack (>= 1.2.0)
389383
rack-protection (4.1.1)
@@ -397,20 +391,20 @@ GEM
397391
rack (>= 1.3)
398392
rackup (2.2.1)
399393
rack (>= 3)
400-
rails (7.1.5.2)
401-
actioncable (= 7.1.5.2)
402-
actionmailbox (= 7.1.5.2)
403-
actionmailer (= 7.1.5.2)
404-
actionpack (= 7.1.5.2)
405-
actiontext (= 7.1.5.2)
406-
actionview (= 7.1.5.2)
407-
activejob (= 7.1.5.2)
408-
activemodel (= 7.1.5.2)
409-
activerecord (= 7.1.5.2)
410-
activestorage (= 7.1.5.2)
411-
activesupport (= 7.1.5.2)
394+
rails (7.2.2.2)
395+
actioncable (= 7.2.2.2)
396+
actionmailbox (= 7.2.2.2)
397+
actionmailer (= 7.2.2.2)
398+
actionpack (= 7.2.2.2)
399+
actiontext (= 7.2.2.2)
400+
actionview (= 7.2.2.2)
401+
activejob (= 7.2.2.2)
402+
activemodel (= 7.2.2.2)
403+
activerecord (= 7.2.2.2)
404+
activestorage (= 7.2.2.2)
405+
activesupport (= 7.2.2.2)
412406
bundler (>= 1.15.0)
413-
railties (= 7.1.5.2)
407+
railties (= 7.2.2.2)
414408
rails-dom-testing (2.3.0)
415409
activesupport (>= 5.0.0)
416410
minitest
@@ -424,10 +418,10 @@ GEM
424418
rack
425419
railties (>= 5.1)
426420
semantic_logger (~> 4.16)
427-
railties (7.1.5.2)
428-
actionpack (= 7.1.5.2)
429-
activesupport (= 7.1.5.2)
430-
irb
421+
railties (7.2.2.2)
422+
actionpack (= 7.2.2.2)
423+
activesupport (= 7.2.2.2)
424+
irb (~> 1.13)
431425
rackup (>= 1.0.0)
432426
rake (>= 12.2)
433427
thor (~> 1.0, >= 1.2.2)
@@ -573,6 +567,7 @@ GEM
573567
unicode-emoji (4.1.0)
574568
uniform_notifier (1.17.0)
575569
uri (1.0.3)
570+
useragent (0.16.11)
576571
version_gem (1.1.3)
577572
web-console (4.2.1)
578573
actionview (>= 6.0.0)
@@ -651,7 +646,7 @@ DEPENDENCIES
651646
puma (~> 6.6)
652647
pundit
653648
rack-mini-profiler (~> 4.0)
654-
rails (~> 7.1.5.1)
649+
rails (~> 7.2.2.2)
655650
rails-html-sanitizer (~> 1.6.2)
656651
rails4-autocomplete
657652
rails_semantic_logger

app/models/member.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Member < ApplicationRecord
22
include Permissions
33

4-
enum how_you_found_us: {
4+
enum :how_you_found_us, {
55
from_a_friend: 0,
66
search_engine: 1,
77
social_media: 2,

app/models/sponsor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class Sponsor < ApplicationRecord
22
include Auditor::Model
33
require 'uri'
44

5-
enum level: {
5+
enum :level, {
66
hidden: 0, # hidden from the sponsors page but still visible on event pages
77
standard: 1,
88
bronze: 2,

bin/rubocop

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env ruby
2+
require "rubygems"
3+
require "bundler/setup"
4+
5+
# explicit rubocop config increases performance slightly while avoiding config confusion.
6+
ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__))
7+
8+
load Gem.bin_path("rubocop", "rubocop")

bin/setup

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
11
#!/usr/bin/env ruby
22
require "fileutils"
33

4-
# path to your application root.
5-
APP_ROOT = File.expand_path('..', __dir__)
4+
APP_ROOT = File.expand_path("..", __dir__)
5+
APP_NAME = "planner"
66

77
def system!(*args)
8-
system(*args) || abort("\n== Command #{args} failed ==")
8+
system(*args, exception: true)
99
end
1010

1111
FileUtils.chdir APP_ROOT do
1212
# This script is a way to set up or update your development environment automatically.
1313
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
1414
# Add necessary setup steps to this file.
1515

16-
puts '== Installing dependencies =='
17-
system! 'gem install bundler --conservative'
18-
system('bundle check') || system!('bundle install')
16+
puts "== Installing dependencies =="
17+
system! "gem install bundler --conservative"
18+
system("bundle check") || system!("bundle install")
1919

2020
# puts "\n== Copying sample files =="
21-
# unless File.exist?('config/database.yml')
22-
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
21+
# unless File.exist?("config/database.yml")
22+
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
2323
# end
2424

2525
puts "\n== Preparing database =="
26-
system! 'bin/rails db:prepare'
26+
system! "bin/rails db:prepare"
2727

2828
puts "\n== Removing old logs and tempfiles =="
29-
system! 'bin/rails log:clear tmp:clear'
29+
system! "bin/rails log:clear tmp:clear"
3030

3131
puts "\n== Restarting application server =="
32-
system! 'bin/rails restart'
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"
3337
end

config/application.rb

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
require_relative "boot"
22

3-
require "rails"
4-
# Pick the frameworks you want:
5-
require "active_model/railtie"
6-
require "active_job/railtie"
7-
require "active_record/railtie"
8-
require "active_storage/engine"
9-
require "action_controller/railtie"
10-
require "action_mailer/railtie"
11-
require "action_mailbox/engine"
12-
require "action_text/engine"
13-
require "action_view/railtie"
14-
require "action_cable/engine"
3+
require "rails/all"
154
require "sprockets/railtie"
16-
require "rails/test_unit/railtie"
175

186
# Require the gems listed in Gemfile, including any gems
197
# you've limited to :test, :development, or :production.
@@ -22,8 +10,7 @@
2210
module Planner
2311
class Application < Rails::Application
2412
# Initialize configuration defaults for originally generated Rails version.
25-
config.load_defaults 7.1
26-
config.active_support.cache_format_version = 7.1
13+
config.load_defaults 7.2
2714

2815
config.autoload_lib(ignore: %w(assets tasks))
2916

config/cable.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
development:
2+
adapter: async
3+
4+
test:
5+
adapter: test
6+
7+
production:
8+
adapter: redis
9+
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10+
channel_prefix: planner_production

config/environments/development.rb

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Show full error reports.
1515
config.consider_all_requests_local = true
1616

17-
# Enable server timing
17+
# Enable server timing.
1818
config.server_timing = true
1919

2020
# Enable/disable caching. By default caching is disabled.
@@ -24,9 +24,7 @@
2424
config.action_controller.enable_fragment_cache_logging = true
2525

2626
config.cache_store = :memory_store
27-
config.public_file_server.headers = {
28-
'Cache-Control' => "public, max-age=#{2.days.to_i}"
29-
}
27+
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
3028
else
3129
config.action_controller.perform_caching = false
3230

@@ -39,8 +37,12 @@
3937
# Don't care if the mailer can't send.
4038
config.action_mailer.raise_delivery_errors = false
4139

40+
# Disable caching for Action Mailer templates even if Action Controller
41+
# caching is enabled.
4242
config.action_mailer.perform_caching = false
4343

44+
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
45+
4446
# Print deprecation notices to the Rails logger.
4547
config.active_support.deprecation = :log
4648

@@ -68,11 +70,14 @@
6870
# Annotate rendered view with file names.
6971
# config.action_view.annotate_rendered_view_with_filenames = true
7072

71-
# Raise error when a before_action's only/except options reference missing actions
73+
# Uncomment if you wish to allow Action Cable access from any origin.
74+
# config.action_cable.disable_request_forgery_protection = true
75+
76+
# Raise error when a before_action's only/except options reference missing actions.
7277
config.action_controller.raise_on_missing_callback_actions = true
7378

74-
# Required default host to link to!
75-
config.action_mailer.default_url_options = { host: 'localhost:3000' }
79+
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
80+
# config.generators.apply_rubocop_autocorrect_after_generate!
7681

7782
logger = ActiveSupport::Logger.new(STDOUT)
7883
logger.formatter = config.log_formatter

0 commit comments

Comments
 (0)