chore: update to rails 8

pull/8/head
Nelson Jovel 1 year ago
parent 1fffb79e7f
commit d0721709f5

@ -23,7 +23,7 @@ gem "observer", "~> 0.1.2"
gem "ostruct"
gem "pg"
gem "puma", ">= 6.4.0"
gem "rails", "~> 7.1.3"
gem "rails", "~> 8.0.0"
gem "sprockets-rails"
gem "standard_deviation"
gem "stimulus-rails"
@ -33,7 +33,7 @@ gem "watir"
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem "brakeman"
gem "bullet"
# gem "bullet"
gem "dexter"
gem "erb_lint", require: false
gem "erblint-github"

@ -12,85 +12,79 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.5)
actionpack (= 7.1.5)
activesupport (= 7.1.5)
actioncable (8.0.0)
actionpack (= 8.0.0)
activesupport (= 8.0.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.5)
actionpack (= 7.1.5)
activejob (= 7.1.5)
activerecord (= 7.1.5)
activestorage (= 7.1.5)
activesupport (= 7.1.5)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.5)
actionpack (= 7.1.5)
actionview (= 7.1.5)
activejob (= 7.1.5)
activesupport (= 7.1.5)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
actionmailbox (8.0.0)
actionpack (= 8.0.0)
activejob (= 8.0.0)
activerecord (= 8.0.0)
activestorage (= 8.0.0)
activesupport (= 8.0.0)
mail (>= 2.8.0)
actionmailer (8.0.0)
actionpack (= 8.0.0)
actionview (= 8.0.0)
activejob (= 8.0.0)
activesupport (= 8.0.0)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.1.5)
actionview (= 7.1.5)
activesupport (= 7.1.5)
actionpack (8.0.0)
actionview (= 8.0.0)
activesupport (= 8.0.0)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.5)
actionpack (= 7.1.5)
activerecord (= 7.1.5)
activestorage (= 7.1.5)
activesupport (= 7.1.5)
useragent (~> 0.16)
actiontext (8.0.0)
actionpack (= 8.0.0)
activerecord (= 8.0.0)
activestorage (= 8.0.0)
activesupport (= 8.0.0)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.5)
activesupport (= 7.1.5)
actionview (8.0.0)
activesupport (= 8.0.0)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.5)
activesupport (= 7.1.5)
activejob (8.0.0)
activesupport (= 8.0.0)
globalid (>= 0.3.6)
activemodel (7.1.5)
activesupport (= 7.1.5)
activerecord (7.1.5)
activemodel (= 7.1.5)
activesupport (= 7.1.5)
activemodel (8.0.0)
activesupport (= 8.0.0)
activerecord (8.0.0)
activemodel (= 8.0.0)
activesupport (= 8.0.0)
timeout (>= 0.4.0)
activerecord-import (1.5.1)
activerecord (>= 4.2)
activestorage (7.1.5)
actionpack (= 7.1.5)
activejob (= 7.1.5)
activerecord (= 7.1.5)
activesupport (= 7.1.5)
activestorage (8.0.0)
actionpack (= 8.0.0)
activejob (= 8.0.0)
activerecord (= 8.0.0)
activesupport (= 8.0.0)
marcel (~> 1.0)
activesupport (7.1.5)
activesupport (8.0.0)
base64
benchmark (>= 0.3)
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
securerandom (>= 0.3)
tzinfo (~> 2.0)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
@ -111,9 +105,6 @@ GEM
msgpack (~> 1.2)
brakeman (6.1.0)
builder (3.3.0)
bullet (7.1.4)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.3)
capybara (3.39.2)
addressable
@ -242,7 +233,6 @@ GEM
minitest (5.25.1)
msgpack (1.7.2)
multi_json (1.15.0)
mutex_m (0.3.0)
nenv (0.3.0)
nested_scaffold (1.1.0)
net-imap (0.5.1)
@ -300,20 +290,20 @@ GEM
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.5)
actioncable (= 7.1.5)
actionmailbox (= 7.1.5)
actionmailer (= 7.1.5)
actionpack (= 7.1.5)
actiontext (= 7.1.5)
actionview (= 7.1.5)
activejob (= 7.1.5)
activemodel (= 7.1.5)
activerecord (= 7.1.5)
activestorage (= 7.1.5)
activesupport (= 7.1.5)
rails (8.0.0)
actioncable (= 8.0.0)
actionmailbox (= 8.0.0)
actionmailer (= 8.0.0)
actionpack (= 8.0.0)
actiontext (= 8.0.0)
actionview (= 8.0.0)
activejob (= 8.0.0)
activemodel (= 8.0.0)
activerecord (= 8.0.0)
activestorage (= 8.0.0)
activesupport (= 8.0.0)
bundler (>= 1.15.0)
railties (= 7.1.5)
railties (= 8.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
@ -325,10 +315,10 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.5)
actionpack (= 7.1.5)
activesupport (= 7.1.5)
irb
railties (8.0.0)
actionpack (= 8.0.0)
activesupport (= 8.0.0)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
@ -448,7 +438,8 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
uniform_notifier (1.16.0)
uri (1.0.2)
useragent (0.16.10)
warden (1.2.9)
rack (>= 2.0.9)
watir (7.3.0)
@ -472,7 +463,6 @@ DEPENDENCIES
bcrypt_pbkdf
bootsnap
brakeman
bullet
byebug
capybara
cssbundling-rails
@ -507,7 +497,7 @@ DEPENDENCIES
puma (>= 6.4.0)
rack-livereload
rack-mini-profiler
rails (~> 7.1.3)
rails (~> 8.0.0)
rails-controller-testing
rspec-rails (~> 6.0.3)
rubocop

@ -9,13 +9,6 @@ class Score < ApplicationRecord
NIL_SCORE = Score.new(average: nil, meets_teacher_threshold: false, meets_student_threshold: false,
meets_admin_data_threshold: false)
enum group: {
all_students: 0,
race: 1,
grade: 2,
gender: 3
}
def in_zone?(zone:)
return false if average.nil? || average.is_a?(Float) && average.nan?

@ -9,10 +9,14 @@ Bundler.require(*Rails.groups)
module Edcontext
class Application < Rails::Application
config.load_defaults 7.1
config.load_defaults 8.0
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.active_support.cache_format_version 6.1
#
# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
# Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w[assets tasks])
end
end

@ -1,13 +1,13 @@
Rails.application.configure do
config.after_initialize do
Bullet.enable = true
Bullet.alert = false
Bullet.bullet_logger = true
Bullet.console = true
# Bullet.growl = true
Bullet.rails_logger = true
Bullet.add_footer = true
end
# config.after_initialize do
# Bullet.enable = true
# Bullet.alert = false
# Bullet.bullet_logger = true
# Bullet.console = true
# # Bullet.growl = true
# Bullet.rails_logger = true
# Bullet.add_footer = true
# end
# Settings specified here will take precedence over those in config/application.rb.

@ -10,9 +10,9 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2024_10_31_205926) do
ActiveRecord::Schema[8.0].define(version: 2024_10_31_205926) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
enable_extension "pg_catalog.plpgsql"
create_table "academic_years", id: :serial, force: :cascade do |t|
t.string "range", null: false

@ -65,7 +65,7 @@ RSpec.configure do |config|
# end
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.clean
end
config.before(:each) do |example|

Loading…
Cancel
Save