Skip to content

Commit

Permalink
Upgrade to Rails 7.2.0 (#1632)
Browse files Browse the repository at this point in the history
Updates `@rails/actioncable` from 7.1.3 to 7.2.0
Updates `@rails/actiontext` from 7.1.3 to 7.2.0
Updates `@rails/activestorage` from 7.1.3 to 7.2.0
Updates `rails` gem from 7.1.3 to 7.2.0

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paul Hinze <[email protected]>
  • Loading branch information
dependabot[bot] and phinze authored Aug 13, 2024
1 parent 3c45bbb commit c3dd3ab
Show file tree
Hide file tree
Showing 33 changed files with 182 additions and 166 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "3.1.6"

# Bundle edge Rails instead: gem "rails", github: "rails/rails"
gem "rails", "~> 7.1.3"
gem "rails", "~> 7.2.0"

# Since Rails 7 sprockets is optional; we still use it so we need to depend on
# the gem explicitly
Expand Down
141 changes: 69 additions & 72 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,83 +10,79 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.3.4)
actionpack (= 7.1.3.4)
activesupport (= 7.1.3.4)
actioncable (7.2.0)
actionpack (= 7.2.0)
activesupport (= 7.2.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.3.4)
actionpack (= 7.1.3.4)
activejob (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.3.4)
actionpack (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activesupport (= 7.1.3.4)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
actionmailbox (7.2.0)
actionpack (= 7.2.0)
activejob (= 7.2.0)
activerecord (= 7.2.0)
activestorage (= 7.2.0)
activesupport (= 7.2.0)
mail (>= 2.8.0)
actionmailer (7.2.0)
actionpack (= 7.2.0)
actionview (= 7.2.0)
activejob (= 7.2.0)
activesupport (= 7.2.0)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.1.3.4)
actionview (= 7.1.3.4)
activesupport (= 7.1.3.4)
actionpack (7.2.0)
actionview (= 7.2.0)
activesupport (= 7.2.0)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3.4)
actionpack (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
useragent (~> 0.16)
actiontext (7.2.0)
actionpack (= 7.2.0)
activerecord (= 7.2.0)
activestorage (= 7.2.0)
activesupport (= 7.2.0)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.3.4)
activesupport (= 7.1.3.4)
actionview (7.2.0)
activesupport (= 7.2.0)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3.4)
activesupport (= 7.1.3.4)
activejob (7.2.0)
activesupport (= 7.2.0)
globalid (>= 0.3.6)
activemodel (7.1.3.4)
activesupport (= 7.1.3.4)
activerecord (7.1.3.4)
activemodel (= 7.1.3.4)
activesupport (= 7.1.3.4)
activemodel (7.2.0)
activesupport (= 7.2.0)
activerecord (7.2.0)
activemodel (= 7.2.0)
activesupport (= 7.2.0)
timeout (>= 0.4.0)
activerecord-postgres_enum (2.1.0)
activerecord (>= 5.2)
pg
activestorage (7.1.3.4)
actionpack (= 7.1.3.4)
activejob (= 7.1.3.4)
activerecord (= 7.1.3.4)
activesupport (= 7.1.3.4)
activestorage (7.2.0)
actionpack (= 7.2.0)
activejob (= 7.2.0)
activerecord (= 7.2.0)
activesupport (= 7.2.0)
marcel (~> 1.0)
activesupport (7.1.3.4)
activesupport (7.2.0)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
acts_as_list (1.2.2)
activerecord (>= 6.1)
activesupport (>= 6.1)
Expand Down Expand Up @@ -117,9 +113,9 @@ GEM
appsignal (3.12.6)
rack
ast (2.4.2)
audited (5.6.0)
activerecord (>= 5.2, < 7.2)
activesupport (>= 5.2, < 7.2)
audited (5.4.1)
activerecord (>= 5.0, < 7.7)
activesupport (>= 5.0, < 7.7)
aws-eventstream (1.3.0)
aws-partitions (1.961.0)
aws-sdk-core (3.201.3)
Expand Down Expand Up @@ -353,12 +349,11 @@ GEM
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.4.1)
mutex_m (0.2.0)
net-http (0.4.1)
uri
net-http-persistent (4.0.2)
connection_pool (~> 2.2)
net-imap (0.4.11)
net-imap (0.4.14)
date
net-protocol
net-pop (0.1.2)
Expand Down Expand Up @@ -433,20 +428,20 @@ GEM
rackup (1.0.0)
rack (< 3)
webrick
rails (7.1.3.4)
actioncable (= 7.1.3.4)
actionmailbox (= 7.1.3.4)
actionmailer (= 7.1.3.4)
actionpack (= 7.1.3.4)
actiontext (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activemodel (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
rails (7.2.0)
actioncable (= 7.2.0)
actionmailbox (= 7.2.0)
actionmailer (= 7.2.0)
actionpack (= 7.2.0)
actiontext (= 7.2.0)
actionview (= 7.2.0)
activejob (= 7.2.0)
activemodel (= 7.2.0)
activerecord (= 7.2.0)
activestorage (= 7.2.0)
activesupport (= 7.2.0)
bundler (>= 1.15.0)
railties (= 7.1.3.4)
railties (= 7.2.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -458,10 +453,10 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.3.4)
actionpack (= 7.1.3.4)
activesupport (= 7.1.3.4)
irb
railties (7.2.0)
actionpack (= 7.2.0)
activesupport (= 7.2.0)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
Expand Down Expand Up @@ -515,6 +510,7 @@ GEM
scenic (1.8.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
securerandom (0.3.1)
signet (0.19.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
Expand Down Expand Up @@ -597,6 +593,7 @@ GEM
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
uri (0.13.0)
useragent (0.16.10)
version_gem (1.1.4)
warden (1.2.9)
rack (>= 2.0.9)
Expand Down Expand Up @@ -663,7 +660,7 @@ DEPENDENCIES
pg_search
puma
pundit
rails (~> 7.1.3)
rails (~> 7.2.0)
rails-controller-testing
reverse_markdown
scenic
Expand Down
4 changes: 2 additions & 2 deletions app/models/adjustment.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class Adjustment < ApplicationRecord
monetize :amount_cents

enum payment_source: {
enum :payment_source, {
cash: "cash",
square: "square",
forgiveness: "forgiveness"
}

enum kind: {
enum :kind, {
fine: "fine",
membership: "membership",
donation: "donation",
Expand Down
2 changes: 1 addition & 1 deletion app/models/concerns/item_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module ItemAttributes

has_rich_text :description

enum power_source: {
enum :power_source, {
solar: "solar",
gas: "gas",
air: "air",
Expand Down
2 changes: 1 addition & 1 deletion app/models/concerns/item_statuses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module ItemStatuses
}

included do
enum status: {
enum :status, {
pending: "pending",
active: "active",
maintenance: "maintenance",
Expand Down
2 changes: 1 addition & 1 deletion app/models/item_attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class ItemAttachment < ApplicationRecord

has_one_attached :file

enum kind: {
enum :kind, {
"manual" => "manual",
"parts_list" => "parts_list",
"other" => "other"
Expand Down
4 changes: 2 additions & 2 deletions app/models/member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class Member < ApplicationRecord
has_many :notes, as: :notable

PRONOUNS = ["he/him", "she/her", "they/them"]
enum id_kind: {drivers_license: 0, state_id: 1, city_key: 2, student_id: 3, employee_id: 4, other_id_kind: 5}
enum status: {pending: 0, verified: 1, suspended: 2, deactivated: 3}, _prefix: true
enum :id_kind, {drivers_license: 0, state_id: 1, city_key: 2, student_id: 3, employee_id: 4, other_id_kind: 5}
enum :status, {pending: 0, verified: 1, suspended: 2, deactivated: 3}, prefix: true

validates :email,
format: {with: URI::MailTo::EMAIL_REGEXP, message: "must be a valid email"},
Expand Down
2 changes: 1 addition & 1 deletion app/models/membership.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Membership < ApplicationRecord
class PendingMembership < StandardError; end

enum membership_type: {
enum :membership_type, {
initial: "initial",
renewal: "renewal"
}
Expand Down
2 changes: 1 addition & 1 deletion app/models/renewal_request.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class RenewalRequest < ApplicationRecord
belongs_to :loan

enum status: {
enum :status, {
requested: "requested",
approved: "approved",
rejected: "rejected"
Expand Down
2 changes: 1 addition & 1 deletion app/models/stem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module AnswerTypes
ALL = [TEXT, INTEGER]
end

enum answer_type: {
enum :answer_type, {
AnswerTypes::INTEGER => AnswerTypes::INTEGER,
AnswerTypes::TEXT => AnswerTypes::TEXT
}
Expand Down
2 changes: 1 addition & 1 deletion app/models/ticket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Ticket < ApplicationRecord
"resolved" => "the problem has been fixed"
}

enum status: {
enum :status, {
assess: "assess",
parts: "parts",
repairing: "repairing",
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class User < ApplicationRecord
# while the canonical list of roles is the "user_role" enum in the
# database, this enum exists to help display the list of roles
# elsewhere in the app
enum role: {
enum :role, {
member: "member",
staff: "staff",
admin: "admin",
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20200504134052_assign_member_numbers.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class AssignMemberNumbers < ActiveRecord::Migration[6.0]
class Member < ActiveRecord::Base
enum status: [:pending, :verified, :suspended, :deactivated], _prefix: true
enum :status, [:pending, :verified, :suspended, :deactivated], prefix: true
scope :verified, -> { where(status: statuses[:verified]) }
def assign_number
self.number = (self.class.maximum(:number) || 0) + 1
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20200906182546_add_pronouns_to_members.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class AddPronounsToMembers < ActiveRecord::Migration[6.0]
class TemporaryMember < ActiveRecord::Base
self.table_name = "members"
enum pronoun: [:"he/him", :"she/her", :"they/them", :custom_pronoun]
enum :pronoun, [:"he/him", :"she/her", :"they/them", :custom_pronoun]
end

def change
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20220202191706_create_enum_for_item_status.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateEnumForItemStatus < ActiveRecord::Migration[6.1]
class Item < ActiveRecord::Base
enum status: [:pending, :active, :maintenance, :retired]
enum :status, [:pending, :active, :maintenance, :retired]
end

def change
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"@appsignal/stimulus": "^1.0.18",
"@hotwired/stimulus": "^3.2.2",
"@hotwired/turbo-rails": "^8.0.5",
"@rails/actioncable": "^7.1.3",
"@rails/actiontext": "^7.1.3",
"@rails/actioncable": "^7.2.0",
"@rails/actiontext": "^7.2.0",
"@rails/activestorage": "^7.1.3",
"@rails/ujs": "^7.1.3",
"@selectize/selectize": "^0.15.2",
Expand Down
4 changes: 3 additions & 1 deletion test/controllers/admin/appointments_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class AppointmentsControllerTest < ActionDispatch::IntegrationTest
end

test "renders show page with items to pickup and drop off" do
get admin_appointment_path(@appointment)
assert_nothing_raised do
get admin_appointment_path(@appointment)
end
end
end
end
4 changes: 3 additions & 1 deletion test/controllers/application_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class ApplicationControllerTest < ActionDispatch::IntegrationTest
end

test "ignores a poorly formed referer" do
get new_user_session_path, headers: {referer: "not a valid referer"}
assert_nothing_raised do
get new_user_session_path, headers: {referer: "not a valid referer"}
end
end
end

Expand Down
Loading

0 comments on commit c3dd3ab

Please sign in to comment.