Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source 'https://rubygems.org'
ruby '3.3.1'

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem 'rails', '~> 7.2.3', '>= 7.2.3.1'
gem 'rails', '~> 8.0.0'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem 'sprockets-rails'
Expand Down
143 changes: 71 additions & 72 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,68 +1,65 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.2.3.1)
actionpack (= 7.2.3.1)
activesupport (= 7.2.3.1)
actioncable (8.0.5)
actionpack (= 8.0.5)
activesupport (= 8.0.5)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.2.3.1)
actionpack (= 7.2.3.1)
activejob (= 7.2.3.1)
activerecord (= 7.2.3.1)
activestorage (= 7.2.3.1)
activesupport (= 7.2.3.1)
actionmailbox (8.0.5)
actionpack (= 8.0.5)
activejob (= 8.0.5)
activerecord (= 8.0.5)
activestorage (= 8.0.5)
activesupport (= 8.0.5)
mail (>= 2.8.0)
actionmailer (7.2.3.1)
actionpack (= 7.2.3.1)
actionview (= 7.2.3.1)
activejob (= 7.2.3.1)
activesupport (= 7.2.3.1)
actionmailer (8.0.5)
actionpack (= 8.0.5)
actionview (= 8.0.5)
activejob (= 8.0.5)
activesupport (= 8.0.5)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.2.3.1)
actionview (= 7.2.3.1)
activesupport (= 7.2.3.1)
cgi
actionpack (8.0.5)
actionview (= 8.0.5)
activesupport (= 8.0.5)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.3)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actiontext (7.2.3.1)
actionpack (= 7.2.3.1)
activerecord (= 7.2.3.1)
activestorage (= 7.2.3.1)
activesupport (= 7.2.3.1)
actiontext (8.0.5)
actionpack (= 8.0.5)
activerecord (= 8.0.5)
activestorage (= 8.0.5)
activesupport (= 8.0.5)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.3.1)
activesupport (= 7.2.3.1)
actionview (8.0.5)
activesupport (= 8.0.5)
builder (~> 3.1)
cgi
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.2.3.1)
activesupport (= 7.2.3.1)
activejob (8.0.5)
activesupport (= 8.0.5)
globalid (>= 0.3.6)
activemodel (7.2.3.1)
activesupport (= 7.2.3.1)
activerecord (7.2.3.1)
activemodel (= 7.2.3.1)
activesupport (= 7.2.3.1)
activemodel (8.0.5)
activesupport (= 8.0.5)
activerecord (8.0.5)
activemodel (= 8.0.5)
activesupport (= 8.0.5)
timeout (>= 0.4.0)
activestorage (7.2.3.1)
actionpack (= 7.2.3.1)
activejob (= 7.2.3.1)
activerecord (= 7.2.3.1)
activesupport (= 7.2.3.1)
activestorage (8.0.5)
actionpack (= 8.0.5)
activejob (= 8.0.5)
activerecord (= 8.0.5)
activesupport (= 8.0.5)
marcel (~> 1.0)
activesupport (7.2.3.1)
activesupport (8.0.5)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -71,9 +68,10 @@ GEM
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1, < 6)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
anonymous_loader (0.1.2)
Expand Down Expand Up @@ -113,7 +111,6 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
cgi (0.5.2)
chartkick (5.1.5)
childprocess (5.1.0)
logger (~> 1.5)
Expand Down Expand Up @@ -152,7 +149,7 @@ GEM
faraday-net_http (3.4.4)
net-http (~> 0.5)
ffi (1.17.2-x86_64-linux-gnu)
globalid (1.3.0)
globalid (1.4.0)
activesupport (>= 6.1)
groupdate (6.6.0)
activesupport (>= 7.1)
Expand Down Expand Up @@ -181,7 +178,7 @@ GEM
jbuilder (2.13.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
json (2.20.0)
json (2.21.1)
jwt (3.2.0)
base64
kaminari (1.2.2)
Expand Down Expand Up @@ -213,17 +210,19 @@ GEM
loofah (2.25.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.9.0)
mail (2.9.1)
logger
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.1.0)
marcel (1.2.1)
matrix (0.4.2)
memory_profiler (1.1.0)
mini_mime (1.1.5)
minitest (5.27.0)
minitest (6.0.6)
drb (~> 2.0)
prism (~> 1.5)
msgpack (1.8.3)
multi_xml (0.9.1)
bigdecimal (>= 3.1, < 5)
Expand Down Expand Up @@ -283,9 +282,6 @@ GEM
prettyprint
prettyprint (0.2.0)
prism (1.9.0)
psych (5.4.0)
date
stringio
public_suffix (7.0.5)
puma (8.0.2)
nio4r (~> 2.0)
Expand All @@ -306,31 +302,30 @@ GEM
rack (>= 1.3)
rackup (2.3.1)
rack (>= 3)
rails (7.2.3.1)
actioncable (= 7.2.3.1)
actionmailbox (= 7.2.3.1)
actionmailer (= 7.2.3.1)
actionpack (= 7.2.3.1)
actiontext (= 7.2.3.1)
actionview (= 7.2.3.1)
activejob (= 7.2.3.1)
activemodel (= 7.2.3.1)
activerecord (= 7.2.3.1)
activestorage (= 7.2.3.1)
activesupport (= 7.2.3.1)
rails (8.0.5)
actioncable (= 8.0.5)
actionmailbox (= 8.0.5)
actionmailer (= 8.0.5)
actionpack (= 8.0.5)
actiontext (= 8.0.5)
actionview (= 8.0.5)
activejob (= 8.0.5)
activemodel (= 8.0.5)
activerecord (= 8.0.5)
activestorage (= 8.0.5)
activesupport (= 8.0.5)
bundler (>= 1.15.0)
railties (= 7.2.3.1)
railties (= 8.0.5)
rails-dom-testing (2.3.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.7.0)
loofah (~> 2.25)
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)
railties (7.2.3.1)
actionpack (= 7.2.3.1)
activesupport (= 7.2.3.1)
cgi
railties (8.0.5)
actionpack (= 8.0.5)
activesupport (= 8.0.5)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
Expand All @@ -339,9 +334,14 @@ GEM
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.4.2)
rdoc (7.2.0)
rbs (4.0.3)
logger
prism (>= 1.6.0)
tsort
rdoc (8.0.0)
erb
psych (>= 4.0.0)
prism (>= 1.6.0)
rbs (>= 4.0.0)
tsort
react-rails (3.2.1)
babel-transpiler (>= 0.7.0)
Expand Down Expand Up @@ -454,7 +454,6 @@ GEM
stackprof (0.2.27)
stimulus-rails (1.3.4)
railties (>= 6.0.0)
stringio (3.2.0)
temple (0.10.3)
thor (1.5.0)
tilt (2.7.0)
Expand Down Expand Up @@ -521,7 +520,7 @@ DEPENDENCIES
puma (>= 5.0)
rack (>= 3.2.6)
rack-mini-profiler
rails (~> 7.2.3, >= 7.2.3.1)
rails (~> 8.0.0)
react-rails (~> 3.2)
rspec-rails
rubocop
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/exam_results_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def set_exam_result

# Only allow a list of trusted parameters through.
def exam_result_params
params.require(:exam_result).permit(:score, :exam_id, :user_id)
params.expect(exam_result: %i[score exam_id user_id])
end
end
2 changes: 1 addition & 1 deletion app/controllers/exams_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ def set_exam

# Only allow a list of trusted parameters through.
def exam_params
params.require(:exam).permit(:weight, :name, :type, :uni_module_id, :due, :completed, :threshold, :released)
params.expect(exam: %i[weight name type uni_module_id due completed threshold released])
end
end
2 changes: 1 addition & 1 deletion app/controllers/semesters_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def set_semester

# Only allow a list of trusted parameters through.
def semester_params
params.require(:semester).permit(:name, :year_id, :final_score)
params.expect(semester: %i[name year_id final_score])
end

def copy_semester(shared_semester, new_semester)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/timelogs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ def set_timelog

# Only allow a list of trusted parameters through.
def timelog_params
params.require(:timelog).permit(:uni_module_id, :date, :minutes, :description)
params.expect(timelog: %i[uni_module_id date minutes description])
end
end
2 changes: 1 addition & 1 deletion app/controllers/uni_module_targets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ def set_uni_module_target
end

def uni_module_target_params
params.require(:uni_module_target).permit(:score, :uni_module_id, :user_id)
params.expect(uni_module_target: %i[score uni_module_id user_id])
end
end
2 changes: 1 addition & 1 deletion app/controllers/uni_modules_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ def set_uni_module

# Only allow a list of trusted parameters through.
def uni_module_params
params.require(:uni_module).permit(:code, :name, :credits, :target, :final_score, :color, semester_ids: [])
params.expect(uni_module: [:code, :name, :credits, :target, :final_score, :color, { semester_ids: [] }])
end
end
4 changes: 2 additions & 2 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def set_user

# Only allow a list of trusted parameters through.
def user_params
params.require(:user).permit(:email)
params.expect(user: [:email])
end

def exam_data
Expand All @@ -80,6 +80,6 @@ def normalize_logs(start_date)
end

def target_params
params.require(:user).permit(:target)
params.expect(user: [:target])
end
end
2 changes: 1 addition & 1 deletion app/controllers/years_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ def set_year

# Only allow a list of trusted parameters through.
def year_params
params.require(:year).permit(:name, :weighting, :final_score)
params.expect(year: %i[name weighting final_score])
end
end
2 changes: 1 addition & 1 deletion spec/requests/years_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

patch year_path(year), params: { year: { user_id: other_user.id } }

expect(response).to redirect_to(year_path(year))
expect(response).to have_http_status(:bad_request)
expect(year.reload.user).to eq(user)
end
end
Expand Down
Loading