Skip to content

Commit

Permalink
Merge pull request #5031 from dodona-edu/dependabot/bundler/rails-7.1.0
Browse files Browse the repository at this point in the history
Bump rails from 7.0.8 to 7.1.0
  • Loading branch information
jorg-vr authored Oct 11, 2023
2 parents 57082b7 + c7cb3ff commit 15e6d14
Show file tree
Hide file tree
Showing 23 changed files with 191 additions and 121 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.2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 7.0.8'
gem 'rails', '~> 7.1.0'
# Use mysql as the database for Active Record
gem 'mysql2', '~> 0.5.5'
# Use Puma as the app server
Expand Down
168 changes: 99 additions & 69 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,78 @@ GEM
remote: https://rubygems.org/
specs:
ace-rails-ap (4.5)
actioncable (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
actioncable (7.1.0)
actionpack (= 7.1.0)
activesupport (= 7.1.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
zeitwerk (~> 2.6)
actionmailbox (7.1.0)
actionpack (= 7.1.0)
activejob (= 7.1.0)
activerecord (= 7.1.0)
activestorage (= 7.1.0)
activesupport (= 7.1.0)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8)
actionpack (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activesupport (= 7.0.8)
actionmailer (7.1.0)
actionpack (= 7.1.0)
actionview (= 7.1.0)
activejob (= 7.1.0)
activesupport (= 7.1.0)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8)
actionview (= 7.0.8)
activesupport (= 7.0.8)
rack (~> 2.0, >= 2.2.4)
rails-dom-testing (~> 2.2)
actionpack (7.1.0)
actionview (= 7.1.0)
activesupport (= 7.1.0)
nokogiri (>= 1.8.5)
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 (7.0.8)
actionpack (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.0)
actionpack (= 7.1.0)
activerecord (= 7.1.0)
activestorage (= 7.1.0)
activesupport (= 7.1.0)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8)
activesupport (= 7.0.8)
actionview (7.1.0)
activesupport (= 7.1.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.8)
activesupport (= 7.0.8)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.0)
activesupport (= 7.1.0)
globalid (>= 0.3.6)
activemodel (7.0.8)
activesupport (= 7.0.8)
activerecord (7.0.8)
activemodel (= 7.0.8)
activesupport (= 7.0.8)
activestorage (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activesupport (= 7.0.8)
activemodel (7.1.0)
activesupport (= 7.1.0)
activerecord (7.1.0)
activemodel (= 7.1.0)
activesupport (= 7.1.0)
timeout (>= 0.4.0)
activestorage (7.1.0)
actionpack (= 7.1.0)
activejob (= 7.1.0)
activerecord (= 7.1.0)
activesupport (= 7.1.0)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8)
activesupport (7.1.0)
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)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
Expand All @@ -85,6 +93,7 @@ GEM
base64 (0.1.1)
bcrypt (3.1.18)
bcrypt_pbkdf (1.1.0)
bigdecimal (3.1.4)
bindata (2.4.15)
bindex (0.8.1)
bootsnap (1.16.0)
Expand Down Expand Up @@ -121,6 +130,7 @@ GEM
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
counter_culture (3.5.0)
activerecord (>= 4.2)
activesupport (>= 4.2)
Expand Down Expand Up @@ -164,6 +174,8 @@ GEM
docker-api (2.2.0)
excon (>= 0.47.0)
multi_json
drb (2.1.1)
ruby2_keywords
ed25519 (1.3.0)
erubi (1.12.0)
exception_notification (4.5.0)
Expand Down Expand Up @@ -212,6 +224,10 @@ GEM
image_processing (1.12.2)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
io-console (0.6.0)
irb (1.8.1)
rdoc
reline (>= 0.3.8)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
Expand Down Expand Up @@ -258,7 +274,6 @@ GEM
marcel (1.0.2)
matrix (0.4.2)
memory_profiler (1.0.1)
method_source (1.0.0)
mini_magick (4.11.0)
mini_mime (1.1.5)
minitest (5.20.0)
Expand All @@ -273,8 +288,9 @@ GEM
multi_xml (0.6.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
mutex_m (0.1.2)
mysql2 (0.5.5)
net-imap (0.3.7)
net-imap (0.4.0)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -283,7 +299,7 @@ GEM
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-smtp (0.3.3)
net-smtp (0.4.0)
net-protocol
net-ssh (7.1.0)
nio4r (2.5.9)
Expand Down Expand Up @@ -342,6 +358,8 @@ GEM
premailer (~> 1.7, >= 1.7.9)
pretender (0.5.0)
actionpack (>= 6.1)
psych (5.1.0)
stringio
public_suffix (5.0.3)
puma (6.4.0)
nio4r (~> 2.0)
Expand All @@ -360,22 +378,27 @@ GEM
rack (>= 2.1.0)
rack-protection (3.0.4)
rack
rack-session (1.0.1)
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.8)
actioncable (= 7.0.8)
actionmailbox (= 7.0.8)
actionmailer (= 7.0.8)
actionpack (= 7.0.8)
actiontext (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activemodel (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
rackup (1.0.0)
rack (< 3)
webrick
rails (7.1.0)
actioncable (= 7.1.0)
actionmailbox (= 7.1.0)
actionmailer (= 7.1.0)
actionpack (= 7.1.0)
actiontext (= 7.1.0)
actionview (= 7.1.0)
activejob (= 7.1.0)
activemodel (= 7.1.0)
activerecord (= 7.1.0)
activestorage (= 7.1.0)
activesupport (= 7.1.0)
bundler (>= 1.15.0)
railties (= 7.0.8)
railties (= 7.1.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -390,20 +413,25 @@ GEM
rails-i18n (7.0.8)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
railties (7.1.0)
actionpack (= 7.1.0)
activesupport (= 7.1.0)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rb-readline (0.5.5)
rdoc (6.5.0)
psych (>= 4.0.0)
regexp_parser (2.8.1)
reline (0.3.9)
io-console (~> 0.5)
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
Expand Down Expand Up @@ -476,6 +504,7 @@ GEM
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stackprof (0.2.25)
stringio (3.0.8)
swd (2.0.2)
activesupport (>= 3)
attr_required (>= 0.0.5)
Expand Down Expand Up @@ -515,14 +544,15 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.1)
websocket (1.2.10)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
will_paginate (4.0.0)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.11)
zeitwerk (2.6.12)

PLATFORMS
x86_64-linux
Expand Down Expand Up @@ -587,7 +617,7 @@ DEPENDENCIES
puma (~> 6.4.0)
pundit (~> 2.3.1)
rack-mini-profiler (~> 3.1.1)
rails (~> 7.0.8)
rails (~> 7.1.0)
rails-controller-testing (~> 1.0.5)
rails-i18n (~> 7.0.8)
rb-readline (~> 0.5.5)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api_tokens_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def create
f.js { render 'create', locals: { toast: message, new_token: @token } }
else
errors = @token.errors.full_messages
errors << I18n.t('errors.models.api_token.attributes.not_permitted') unless can_create
errors << I18n.t('activerecord.errors.models.api_token.not_permitted') unless can_create
message = errors.join(', ')
f.html do
redirect_back fallback_location: root_path,
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def sanitize(html)
%w[svg g style circle line rect path polygon text]
@attributes ||= Rails::Html::SafeListSanitizer.allowed_attributes.to_a +
%w[style target data-bs-toggle data-parent data-tab data-line data-element id] +
%w[viewbox width height version style class transform id x y rx ry x1 y1 x2 y2 d points fill stroke stroke-width cx cy r font-size font-family font-weight font-variant]
%w[viewBox width height version style class transform id x y rx ry x1 y1 x2 y2 d points fill stroke stroke-width cx cy r font-size font-family font-weight font-variant]

# Filters allowed tags and attributes
sanitized = ActionController::Base.helpers.sanitize html,
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/packs/application_pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import "core-js/stable";
import "regenerator-runtime/runtime";

import { start as startRails } from "@rails/ujs";
import Rails from "@rails/ujs";

startRails();
Rails.start();

import { I18n } from "i18n/i18n";
window.I18n = new I18n();
Expand Down
1 change: 0 additions & 1 deletion app/models/activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ class Activity < ApplicationRecord
scope :order_by_name, ->(direction) { reorder(Arel.sql("name_#{I18n.locale} IS NULL, name_#{I18n.locale} #{direction}")).order(path: direction) }
scope :order_by_popularity, ->(direction) { reorder("series_count #{direction}") }

enum popularity: { unpopular: 0, neutral: 1, popular: 2, very_popular: 3 }, _prefix: true
POPULARITY_THRESHOLDS = {
unpopular: { min: 0, max: 2 },
neutral: { min: 3, max: 10 },
Expand Down
2 changes: 1 addition & 1 deletion app/views/activities/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
<div class="card-supporting-text">
<d-filter-tabs labels="<%= @tabs.to_json %>"></d-filter-tabs>
<%= render partial: 'layouts/searchbar', locals: {labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"], judges: @judges, popularity: Activity.popularities.keys, no_dropdown_for: ["judges"]} %>
<%= render partial: 'layouts/searchbar', locals: {labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"], judges: @judges, popularity: Activity::POPULARITY_THRESHOLDS.keys, no_dropdown_for: ["judges"]} %>
<div id="activities-table-wrapper">
<%= render partial: 'activities_table', locals: {activities: @activities} %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/series/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<div class="col-12">
<h4 id="add-activities"><%= t ".add_activities" %></h4>
<d-filter-tabs labels="<%= @tabs.to_json %>"></d-filter-tabs>
<%= render partial: 'layouts/searchbar', locals: {baseUrl: available_activities_series_path(@series), eager: true, labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"], popularity: Activity.popularities.keys, local_storage_key: 'seriesActivitySearch'} %>
<%= render partial: 'layouts/searchbar', locals: {baseUrl: available_activities_series_path(@series), eager: true, labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"], popularity: Activity::POPULARITY_THRESHOLDS.keys, local_storage_key: 'seriesActivitySearch'} %>
<div id="activities-table-wrapper">
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion bin/rails
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../config/application', __dir__)
APP_PATH = File.expand_path("../config/application", __dir__)
require_relative "../config/boot"
require "rails/commands"
Loading

0 comments on commit 15e6d14

Please sign in to comment.