Skip to content

chore(deps): update dependency rails to v8 #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 55 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ecdcfe4
chore(deps): update dependency rails to v8
renovate[bot] Dec 13, 2024
e829eb6
Update Gemfile
lodewiges Jan 19, 2025
4211fef
Merge branch 'staging' into renovate/major-ruby-on-rails-packages
lodewiges Feb 14, 2025
e4c4215
chore(deps): update dependency rails to v8
renovate[bot] Feb 16, 2025
a1f0a3d
Merge branch 'renovate/major-ruby-on-rails-packages' of https://githu…
lodewiges Feb 16, 2025
831a503
Merge branch 'staging' into renovate/major-ruby-on-rails-packages
lodewiges Feb 16, 2025
2d22dbf
generated gem.lock file
lodewiges Feb 16, 2025
333cdd9
Merge branch 'renovate/major-ruby-on-rails-package
lodewiges Feb 16, 2025
4a49cf2
Fixes build failure
lodewiges Feb 16, 2025
528ed50
Fix build error
lodewiges Feb 28, 2025
789de11
Merge branch 'staging' into renovate/major-ruby-on-rails-packages
lodewiges Feb 28, 2025
8c98210
Merge branch 'staging' into renovate/major-ruby-on-rails-packages
lodewiges Mar 9, 2025
5945d11
Merge branch 'staging' into renovate/major-ruby-on-rails-packages
lodewiges Mar 18, 2025
ecd937f
Merge branch 'staging' into renovate/major-ruby-on-rails-packages
lodewiges Mar 19, 2025
1a4837b
fix gemfile.lock
lodewiges Mar 19, 2025
1fde5ef
Intial commit
lodewiges Mar 19, 2025
51dcd9f
generated gemfile.lock
lodewiges Mar 19, 2025
be9f69e
update rspec-rails
lodewiges Mar 19, 2025
5b477c0
update aplitaion.rb
lodewiges Mar 19, 2025
c4faf75
Update application.rb
lodewiges Mar 19, 2025
906faa7
update sql to be more restrictive
lodewiges Mar 19, 2025
f66db19
made some changes to tests
lodewiges Mar 19, 2025
a8d2cfb
fix typo
lodewiges Mar 19, 2025
3d165a2
tried alternating some stuff
lodewiges Mar 19, 2025
1d49cd4
tried downgrading rspec
lodewiges Mar 19, 2025
331c4de
downgrading rspec to v6
lodewiges Mar 19, 2025
c8e9fd6
Update Gemfile.lock
lodewiges Mar 19, 2025
2389971
Update Gemfile.lock
lodewiges Mar 19, 2025
b38be0a
Revert "made some changes to tests"
lodewiges Mar 20, 2025
0323871
Merge branch 'staging' into renovate/minor-update-rails
lodewiges Mar 20, 2025
2ca621b
Merge branch 'staging' into renovate/major-ruby-on-rails-packages
lodewiges Mar 24, 2025
8ee0834
fixed lint
lodewiges Mar 25, 2025
acdaf6e
fixed tests
lodewiges Mar 25, 2025
cceae7e
Merge branch 'staging' into renovate/minor-update-rails
lodewiges Mar 25, 2025
5e0d692
fixed lint
lodewiges Mar 25, 2025
abc5e64
update rails config to 7.2
lodewiges Mar 25, 2025
f178798
ran rails update
lodewiges Mar 25, 2025
920532c
Merge branch 'renovate/minor-update-rails'
lodewiges Mar 25, 2025
a6caf57
fix lint
lodewiges Mar 25, 2025
001429c
fix some tests
lodewiges Mar 25, 2025
ac63a3d
Update test.rb
lodewiges Mar 25, 2025
90f5c91
update random stuff
lodewiges Mar 25, 2025
2c529e7
change file permissions
lodewiges Mar 25, 2025
8adacc9
try if rack works right now
lodewiges Mar 26, 2025
186cda2
revert Update Gemfile.lock
lodewiges Mar 28, 2025
2aa52df
Merge branch 'staging' into renovate/major-ruby-on-rails-packages
lodewiges Mar 28, 2025
452bd49
Merge branch 'renovate/major-ruby-on-rails-packages' of https://githu…
lodewiges Mar 28, 2025
35a8897
update aplication.rb
lodewiges Mar 28, 2025
9b7acea
change tes.rb
lodewiges Mar 28, 2025
7dc07b3
change test.rb
lodewiges Mar 28, 2025
8d02788
change tests
lodewiges Mar 28, 2025
c3682cb
remove 7.1 defaults
lodewiges Mar 28, 2025
32af823
Merge branch 'renovate/minor-update-rails' into renovate/major-ruby-o…
lodewiges Mar 28, 2025
f9b57e6
Update Gemfile.lock
lodewiges Mar 28, 2025
2d4568b
Merge branch 'staging' into renovate/major-ruby-on-rails-packages
lodewiges Apr 24, 2025
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 .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins:
- rubocop-rspec_rails

AllCops:
TargetRailsVersion: 7.1
TargetRailsVersion: 8.0
TargetRubyVersion: 3.3
Exclude:
- 'db/schema.rb'
Expand Down
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ gem 'puma', '~> 6.6'
gem 'pundit', '~> 2.5'
gem 'rack-attack', '~> 6.7'
gem 'rack-cors', '~> 2.0', '>= 2.0.2', require: 'rack/cors'
gem 'rails', '~> 7.1.5', '>= 7.1.5.1'
gem 'rails-i18n', '~> 7.0', '>= 7.0.10'
gem 'rails', '~> 8.0', '>= 8.0.1'
gem 'rails-i18n', '~> 8.0', '>= 8.0.0'
gem 'redis', '~> 5.4'
gem 'roo', '~> 2.10', '>= 2.10.1'
gem 'ruby-filemagic', '~> 0.7', '>= 0.7.3'
Expand All @@ -42,7 +42,7 @@ gem 'sentry-sidekiq', '~> 5.23'
gem 'sepa_king', '~> 0.14'
gem 'sidekiq', '~> 7.3', '>= 7.3.9'
gem 'sidekiq-scheduler', '~> 5.0', '>= 5.0.6'
gem 'validates_timeliness', '~> 7.1.0'
gem 'validates_timeliness', '~> 8.0.0'
gem 'vpim', '~> 24.2', '>= 24.2.20'

group :development, :test do
Expand Down
147 changes: 71 additions & 76 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,86 +1,80 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
actioncable (8.0.1)
actionpack (= 8.0.1)
activesupport (= 8.0.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.5.1)
actionpack (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
actionmailbox (8.0.1)
actionpack (= 8.0.1)
activejob (= 8.0.1)
activerecord (= 8.0.1)
activestorage (= 8.0.1)
activesupport (= 8.0.1)
mail (>= 2.8.0)
actionmailer (8.0.1)
actionpack (= 8.0.1)
actionview (= 8.0.1)
activejob (= 8.0.1)
activesupport (= 8.0.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.1.5.1)
actionview (= 7.1.5.1)
activesupport (= 7.1.5.1)
actionpack (8.0.1)
actionview (= 8.0.1)
activesupport (= 8.0.1)
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.1)
actionpack (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
useragent (~> 0.16)
actiontext (8.0.1)
actionpack (= 8.0.1)
activerecord (= 8.0.1)
activestorage (= 8.0.1)
activesupport (= 8.0.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.5.1)
activesupport (= 7.1.5.1)
actionview (8.0.1)
activesupport (= 8.0.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
active_model_otp (2.3.4)
activemodel
rotp (~> 6.3.0)
activejob (7.1.5.1)
activesupport (= 7.1.5.1)
activejob (8.0.1)
activesupport (= 8.0.1)
globalid (>= 0.3.6)
activemodel (7.1.5.1)
activesupport (= 7.1.5.1)
activerecord (7.1.5.1)
activemodel (= 7.1.5.1)
activesupport (= 7.1.5.1)
activemodel (8.0.1)
activesupport (= 8.0.1)
activerecord (8.0.1)
activemodel (= 8.0.1)
activesupport (= 8.0.1)
timeout (>= 0.4.0)
activestorage (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activesupport (= 7.1.5.1)
activestorage (8.0.1)
actionpack (= 8.0.1)
activejob (= 8.0.1)
activerecord (= 8.0.1)
activesupport (= 8.0.1)
marcel (~> 1.0)
activesupport (7.1.5.1)
activesupport (8.0.1)
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.7)
public_suffix (>= 2.0.2, < 7.0)
ast (2.4.3)
Expand All @@ -92,9 +86,10 @@ GEM
better_errors (2.10.1)
erubi (>= 1.0.0)
rack (>= 0.9.0)
rouge (>= 1.0.0)
bigdecimal (3.1.9)
bigdecimal (3.1.9-java)
binding_of_caller (1.0.1)
debug_inspector (>= 1.2.0)
binding_of_caller (1.0.1)
debug_inspector (>= 1.2.0)
bootsnap (1.18.4)
Expand Down Expand Up @@ -273,7 +268,6 @@ GEM
minitest (5.25.5)
msgpack (1.8.0)
msgpack (1.8.0-java)
mutex_m (0.3.0)
nenv (0.3.0)
net-imap (0.5.6)
date
Expand Down Expand Up @@ -355,34 +349,34 @@ GEM
rack (>= 1.3)
rackup (2.2.1)
rack (>= 3)
rails (7.1.5.1)
actioncable (= 7.1.5.1)
actionmailbox (= 7.1.5.1)
actionmailer (= 7.1.5.1)
actionpack (= 7.1.5.1)
actiontext (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activemodel (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
rails (8.0.1)
actioncable (= 8.0.1)
actionmailbox (= 8.0.1)
actionmailer (= 8.0.1)
actionpack (= 8.0.1)
actiontext (= 8.0.1)
actionview (= 8.0.1)
activejob (= 8.0.1)
activemodel (= 8.0.1)
activerecord (= 8.0.1)
activestorage (= 8.0.1)
activesupport (= 8.0.1)
bundler (>= 1.15.0)
railties (= 7.1.5.1)
railties (= 8.0.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
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)
rails-i18n (7.0.10)
rails-i18n (8.0.1)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
irb
railties (>= 8.0.0, < 9)
railties (8.0.1)
actionpack (= 8.0.1)
activesupport (= 8.0.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
Expand Down Expand Up @@ -432,7 +426,6 @@ GEM
nokogiri (~> 1)
rubyzip (>= 1.3.0, < 3.0.0)
rotp (6.3.0)
rouge (4.5.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand Down Expand Up @@ -552,8 +545,10 @@ GEM
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uniform_notifier (1.16.0)
validates_timeliness (7.1.0)
activemodel (>= 7.0.0, < 8)
uri (1.0.2)
useragent (0.16.11)
validates_timeliness (8.0.0)
activemodel (>= 8.0.0, < 9)
timeliness (>= 0.3.10, < 1)
vcr (6.3.1)
base64
Expand Down Expand Up @@ -626,8 +621,8 @@ DEPENDENCIES
rack-attack (~> 6.7)
rack-cors (~> 2.0, >= 2.0.2)
rack-mini-profiler (~> 3.3, >= 3.3.1)
rails (~> 7.1.5, >= 7.1.5.1)
rails-i18n (~> 7.0, >= 7.0.10)
rails (~> 8.0, >= 8.0.1)
rails-i18n (~> 8.0, >= 8.0.0)
rb-readline (~> 0.5, >= 0.5.5)
redis (~> 5.4)
roo (~> 2.10, >= 2.10.1)
Expand All @@ -654,7 +649,7 @@ DEPENDENCIES
terminal-notifier-guard (~> 1.7)
timecop (~> 0.9, >= 0.9.10)
tzinfo-data
validates_timeliness (~> 7.1.0)
validates_timeliness (~> 8.0.0)
vcr (~> 6.3, >= 6.3.1)
vpim (~> 24.2, >= 24.2.20)
webmock (~> 3.25, >= 3.25.1)
Expand Down
21 changes: 12 additions & 9 deletions app/models/debit/mandate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ class Mandate < ApplicationRecord

private

def unique_on_time_interval?
return true unless Debit::Mandate.where.not(id:).where(user_id:)
.exists?([':start_date BETWEEN start_date AND end_date OR
:end_date BETWEEN start_date AND end_date OR
start_date BETWEEN :start_date AND :end_date OR
end_date BETWEEN :start_date AND :end_date OR
(start_date < :start_date AND end_date IS NULL) OR
(start_date > :start_date AND :end_date IS NULL)',
{ start_date:, end_date: }])
def unique_on_time_interval? # rubocop:disable Metrics/MethodLength
return true unless Debit::Mandate.where.not(id:)
.where(user_id:)
.exists?([<<-SQL.squish, { start_date: start_date, end_date: end_date }])

CAST(:start_date AS date) BETWEEN start_date AND end_date OR
CAST(:end_date AS date) BETWEEN start_date AND end_date OR
start_date BETWEEN CAST(:start_date AS date) AND CAST(:end_date AS date) OR
end_date BETWEEN CAST(:start_date AS date) AND CAST(:end_date AS date) OR
(start_date < CAST(:start_date AS date) AND end_date IS NULL) OR
(start_date > CAST(:start_date AS date) AND CAST(:end_date AS date) IS NULL)
SQL

errors.add(:mandate, 'is not unique on time interval')
false
Expand Down
1 change: 1 addition & 0 deletions app/models/import/user.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Import
class User
extend ActiveRecord::Translation
include ActiveModel::Model
include SpreadsheetHelper

attr_reader :errors, :imported_users
Expand Down
21 changes: 12 additions & 9 deletions app/models/membership.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ class Membership < ApplicationRecord

private

def unique_on_time_interval?
return true unless Membership.where.not(id:).where(group_id:, user_id:)
.exists?([':start_date BETWEEN start_date AND end_date OR
:end_date BETWEEN start_date AND end_date OR
start_date BETWEEN :start_date AND :end_date OR
end_date BETWEEN :start_date AND :end_date OR
(start_date < :start_date AND end_date IS NULL) OR
(start_date > :start_date AND :end_date IS NULL)',
{ start_date:, end_date: }])
def unique_on_time_interval? # rubocop:disable Metrics/MethodLength
return true unless Membership.where.not(id:)
.where(group_id:, user_id:)
.exists?([<<-SQL.squish, { start_date: start_date, end_date: end_date }])

CAST(:start_date AS date) BETWEEN start_date AND end_date OR
CAST(:end_date AS date) BETWEEN start_date AND end_date OR
start_date BETWEEN CAST(:start_date AS date) AND CAST(:end_date AS date) OR
end_date BETWEEN CAST(:start_date AS date) AND CAST(:end_date AS date) OR
(start_date < CAST(:start_date AS date) AND end_date IS NULL) OR
(start_date > CAST(:start_date AS date) AND CAST(:end_date AS date) IS NULL)
SQL

errors.add(:membership, 'is not unique on time interval')
false
Expand Down
7 changes: 7 additions & 0 deletions bin/brakeman
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'

ARGV.unshift('--ensure-latest')

load Gem.bin_path('brakeman', 'brakeman')
8 changes: 8 additions & 0 deletions bin/rubocop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'

# explicit rubocop config increases performance slightly while avoiding config confusion.
ARGV.unshift('--config', File.expand_path('../.rubocop.yml', __dir__))

load Gem.bin_path('rubocop', 'rubocop')
4 changes: 4 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ FileUtils.chdir APP_ROOT do

puts "\n== Restarting application server =="
system! 'bin/rails restart'

# puts "\n== Configuring puma-dev =="
# system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
end
7 changes: 5 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require_relative 'boot'
# Pick the frameworks you want:
require 'rails'
require 'active_model/railtie'
require 'active_job/railtie'
Expand All @@ -7,7 +8,10 @@
require 'action_controller/railtie'
require 'action_mailer/railtie'
require 'action_mailbox/engine'
# require "action_view/railtie"
# require 'action_text/engine'
# require 'action_view/railtie'
# require 'action_cable/engine'
# require 'rails/test_unit/railtie'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Expand All @@ -18,7 +22,6 @@ class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.1

config.add_autoload_paths_to_load_path = false
# 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.
Expand Down
Loading
Loading