Skip to content

Commit

Permalink
theoretically updating to 7.1?
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Lerner committed Sep 17, 2024
1 parent 8092c43 commit 89377ec
Show file tree
Hide file tree
Showing 28 changed files with 2,928 additions and 2,655 deletions.
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '3.3.4'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1'
# NOTE: Can't use 7.2 yet until https://github.com/rails/rails/pull/52703
# gets released (after 7.2.1, I guess)
gem 'rails', '~> 7.1.0'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'

Expand Down Expand Up @@ -83,7 +85,8 @@ end

group :production do
gem 'passenger', '>= 5.3.2', require: 'phusion_passenger/rack_handler'
gem 'rackup', '~> 0.1.0' # HACK: because https://github.com/rack/rackup/issues/13
gem 'rack', '>=3.0'
gem 'rackup', '>=2.0.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
Expand Down
185 changes: 105 additions & 80 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,71 +8,86 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.7.8)
actionpack (= 6.1.7.8)
activesupport (= 6.1.7.8)
actioncable (7.1.4)
actionpack (= 7.1.4)
activesupport (= 7.1.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.8)
actionpack (= 6.1.7.8)
activejob (= 6.1.7.8)
activerecord (= 6.1.7.8)
activestorage (= 6.1.7.8)
activesupport (= 6.1.7.8)
zeitwerk (~> 2.6)
actionmailbox (7.1.4)
actionpack (= 7.1.4)
activejob (= 7.1.4)
activerecord (= 7.1.4)
activestorage (= 7.1.4)
activesupport (= 7.1.4)
mail (>= 2.7.1)
actionmailer (6.1.7.8)
actionpack (= 6.1.7.8)
actionview (= 6.1.7.8)
activejob (= 6.1.7.8)
activesupport (= 6.1.7.8)
net-imap
net-pop
net-smtp
actionmailer (7.1.4)
actionpack (= 7.1.4)
actionview (= 7.1.4)
activejob (= 7.1.4)
activesupport (= 7.1.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.7.8)
actionview (= 6.1.7.8)
activesupport (= 6.1.7.8)
rack (~> 2.0, >= 2.0.9)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.4)
actionview (= 7.1.4)
activesupport (= 7.1.4)
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 (6.1.7.8)
actionpack (= 6.1.7.8)
activerecord (= 6.1.7.8)
activestorage (= 6.1.7.8)
activesupport (= 6.1.7.8)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.4)
actionpack (= 7.1.4)
activerecord (= 7.1.4)
activestorage (= 7.1.4)
activesupport (= 7.1.4)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (6.1.7.8)
activesupport (= 6.1.7.8)
actionview (7.1.4)
activesupport (= 7.1.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.7.8)
activesupport (= 6.1.7.8)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.4)
activesupport (= 7.1.4)
globalid (>= 0.3.6)
activemodel (6.1.7.8)
activesupport (= 6.1.7.8)
activerecord (6.1.7.8)
activemodel (= 6.1.7.8)
activesupport (= 6.1.7.8)
activemodel (7.1.4)
activesupport (= 7.1.4)
activerecord (7.1.4)
activemodel (= 7.1.4)
activesupport (= 7.1.4)
timeout (>= 0.4.0)
activerecord-explain-analyze (0.1.0)
activerecord (>= 4)
pg
activerecord_json_validator (2.1.5)
activerecord (>= 4.2.0, < 8)
json_schemer (~> 0.2.18)
activestorage (6.1.7.8)
actionpack (= 6.1.7.8)
activejob (= 6.1.7.8)
activerecord (= 6.1.7.8)
activesupport (= 6.1.7.8)
activestorage (7.1.4)
actionpack (= 7.1.4)
activejob (= 7.1.4)
activerecord (= 7.1.4)
activesupport (= 7.1.4)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.7.8)
activesupport (7.1.4)
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)
zeitwerk (~> 2.3)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
ansi (1.5.0)
Expand Down Expand Up @@ -125,6 +140,7 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
drb (2.2.1)
ecma-re-validator (0.4.0)
regexp_parser (~> 2.2)
erubi (1.13.0)
Expand Down Expand Up @@ -154,6 +170,10 @@ GEM
i18n (1.14.6)
concurrent-ruby (~> 1.0)
interception (0.5)
io-console (0.7.2)
irb (1.14.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.7.2)
json-schema (4.1.1)
addressable (>= 2.8)
Expand Down Expand Up @@ -191,6 +211,7 @@ GEM
msgpack (1.7.2)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
mutex_m (0.2.0)
net-http (0.4.1)
uri
net-imap (0.4.16)
Expand Down Expand Up @@ -246,61 +267,70 @@ GEM
pry-stack_explorer (0.6.1)
binding_of_caller (~> 1.0)
pry (~> 0.13)
psych (5.1.2)
stringio
public_suffix (6.0.1)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.8.1)
rack (2.2.9)
rack-protection (3.2.0)
rack (3.1.7)
rack-protection (4.0.0)
base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
rack (>= 3.0.0, < 4)
rack-proxy (0.7.7)
rack
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (0.1.0)
rack
webrick
rails (6.1.7.8)
actioncable (= 6.1.7.8)
actionmailbox (= 6.1.7.8)
actionmailer (= 6.1.7.8)
actionpack (= 6.1.7.8)
actiontext (= 6.1.7.8)
actionview (= 6.1.7.8)
activejob (= 6.1.7.8)
activemodel (= 6.1.7.8)
activerecord (= 6.1.7.8)
activestorage (= 6.1.7.8)
activesupport (= 6.1.7.8)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.4)
actioncable (= 7.1.4)
actionmailbox (= 7.1.4)
actionmailer (= 7.1.4)
actionpack (= 7.1.4)
actiontext (= 7.1.4)
actionview (= 7.1.4)
activejob (= 7.1.4)
activemodel (= 7.1.4)
activerecord (= 7.1.4)
activestorage (= 7.1.4)
activesupport (= 7.1.4)
bundler (>= 1.15.0)
railties (= 6.1.7.8)
sprockets-rails (>= 2.0.0)
railties (= 7.1.4)
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 (6.1.7.8)
actionpack (= 6.1.7.8)
activesupport (= 6.1.7.8)
method_source
railties (7.1.4)
actionpack (= 7.1.4)
activesupport (= 7.1.4)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0)
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.11.1)
ffi (~> 1.0)
rdoc (6.7.0)
psych (>= 4.0.0)
react-rails (3.2.1)
babel-transpiler (>= 0.7.0)
connection_pool
execjs
railties (>= 3.2)
tilt
regexp_parser (2.9.2)
reline (0.5.10)
io-console (~> 0.5)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
Expand Down Expand Up @@ -341,13 +371,7 @@ GEM
hashie
version_gem (~> 1.1, >= 1.1.1)
spring (4.0.0)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.5.2)
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
stringio (3.1.1)
thor (1.3.2)
tilt (2.4.0)
timeout (0.4.1)
Expand Down Expand Up @@ -415,8 +439,9 @@ DEPENDENCIES
pry-rescue
pry-stack_explorer
puma (~> 6.4)
rackup (~> 0.1.0)
rails (~> 6.1)
rack (>= 3.0)
rackup (>= 2.0.0)
rails (~> 7.1.0)
react-rails
rubocop-capybara
rubocop-factory_bot
Expand Down
4 changes: 2 additions & 2 deletions app/graphql/association_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def validate

def preload_association(records)
if @includes.present?
::ActiveRecord::Associations::Preloader.new.preload(records, Hash[@association_name, @includes])
::ActiveRecord::Associations::Preloader.new(records: records, associations: Hash[@association_name, @includes])
else
::ActiveRecord::Associations::Preloader.new.preload(records, @association_name)
::ActiveRecord::Associations::Preloader.new(records: records, associations: @association_name)
end
end

Expand Down
3 changes: 2 additions & 1 deletion app/models/exam.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class Exam < ApplicationRecord
only_integer: true,
}

enum role: {
attribute :role, :integer
enum :role, {
no_reg: 0,
student: 1,
staff: 2,
Expand Down
2 changes: 1 addition & 1 deletion app/models/term.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Term < ApplicationRecord

# these underscores make .humanize create a space ( ).
# rubocop:disable Naming/VariableNumber
enum semester: { fall: 10, spring: 30, summer_1: 40, summer: 50, summer_2: 60 }
enum :semester, { fall: 10, spring: 30, summer_1: 40, summer: 50, summer_2: 60 }
# rubocop:enable Naming/VariableNumber

has_many :registrations, through: :courses
Expand Down
6 changes: 3 additions & 3 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
load File.expand_path('spring', __dir__)
load File.expand_path("spring", __dir__)
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
require_relative "../config/boot"
require "rails/commands"
6 changes: 3 additions & 3 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
load File.expand_path('spring', __dir__)
require_relative '../config/boot'
require 'rake'
load File.expand_path("spring", __dir__)
require_relative "../config/boot"
require "rake"
Rake.application.run
2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
require 'fileutils'
require "fileutils"

# path to your application root.
APP_ROOT = File.expand_path('..', __dir__)
Expand Down
5 changes: 2 additions & 3 deletions bin/yarn
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/env ruby

APP_ROOT = File.expand_path("..", __dir__)
APP_ROOT = File.expand_path('..', __dir__)
Dir.chdir(APP_ROOT) do
yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
select { |dir| File.expand_path(dir) != __dir__ }.
product(["yarn", "yarnpkg", "yarn.cmd", "yarn.ps1"]).
product(["yarn", "yarn.cmd", "yarn.ps1"]).
map { |dir, file| File.expand_path(file, dir) }.
find { |file| File.executable?(file) }

Expand Down
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module Hourglass
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

config.before_configuration do
unless ENV['BOTTLENOSE_URL']
Expand All @@ -44,8 +45,10 @@ class Application < Rails::Application

# Add subdirectories of models
config.autoload_paths += Dir[Rails.root.join("app", "models", "{*/}")]
config.eager_load_paths += Dir[Rails.root.join("app", "models", "{*/}")]

config.autoload_paths << Rails.root.join('lib')
config.eager_load_paths << Rails.root.join('lib')


# Configuration for the application, engines, and railties goes here.
Expand Down
Loading

0 comments on commit 89377ec

Please sign in to comment.