Skip to content

Commit b68702d

Browse files
authored
Merge branch 'main' into 5101_static_error_pages
2 parents 6cea9aa + 7030ad3 commit b68702d

File tree

136 files changed

+2319
-1057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+2319
-1057
lines changed

.cloud66/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
rails:
22
configuration:
3-
ruby_version: 3.2.2
3+
ruby_version: 3.4.3

.rubocop.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ inherit_gem:
1010
inherit_from:
1111
.rubocop_todo.yml
1212

13-
require:
14-
- rubocop-rails
13+
plugins:
1514
- rubocop-performance
16-
- standard
1715
- standard-rails
1816
- standard-performance
1917

18+
require:
19+
- rubocop-rails
20+
- standard
21+
2022
AllCops:
2123
Exclude:
2224
- "vendor/**/*"

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.2
1+
3.4.3

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ gem 'bootsnap', require: false
106106
# Technically they don't need to be in this Gemfile at all, but we are pinning them to
107107
# specific versions for compatibility reasons.
108108
gem "nokogiri", ">= 1.10.4"
109-
gem "sprockets", "~> 4.2.1"
109+
gem "sprockets", "~> 4.2.2"
110110

111111
group :production, :staging do
112112
# Reduce the noise of logs and include custom fields to it for easier access

Gemfile.lock

Lines changed: 40 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,12 @@ GEM
130130
autoprefixer-rails (>= 9.1.0)
131131
popper_js (>= 2.11.6, < 3)
132132
sassc-rails (>= 2.0.0)
133-
brakeman (7.0.0)
133+
brakeman (7.0.2)
134134
racc
135135
bugsnag (6.27.1)
136136
concurrent-ruby (~> 1.0)
137137
builder (3.3.0)
138-
bullet (8.0.0)
138+
bullet (8.0.5)
139139
activesupport (>= 3.0.0)
140140
uniform_notifier (~> 1.11)
141141
capybara (3.40.0)
@@ -157,7 +157,7 @@ GEM
157157
tzinfo
158158
coderay (1.1.3)
159159
concurrent-ruby (1.3.5)
160-
connection_pool (2.5.0)
160+
connection_pool (2.5.3)
161161
crack (1.0.0)
162162
bigdecimal
163163
rexml
@@ -268,10 +268,10 @@ GEM
268268
concurrent-ruby (~> 1.1)
269269
webrick (~> 1.7)
270270
websocket-driver (~> 0.7)
271-
ffi (1.17.0)
272-
ffi (1.17.0-arm64-darwin)
273-
ffi (1.17.0-x86_64-darwin)
274-
ffi (1.17.0-x86_64-linux-gnu)
271+
ffi (1.17.2)
272+
ffi (1.17.2-arm64-darwin)
273+
ffi (1.17.2-x86_64-darwin)
274+
ffi (1.17.2-x86_64-linux-gnu)
275275
filterrific (5.2.7)
276276
flipper (1.3.4)
277277
concurrent-ruby (< 2)
@@ -329,8 +329,8 @@ GEM
329329
actionview (>= 5.0.0)
330330
activesupport (>= 5.0.0)
331331
jmespath (1.6.2)
332-
json (2.10.2)
333-
jwt (2.9.1)
332+
json (2.11.3)
333+
jwt (2.10.1)
334334
base64
335335
kaminari (1.2.2)
336336
activesupport (>= 4.1.0)
@@ -344,7 +344,7 @@ GEM
344344
activerecord
345345
kaminari-core (= 1.2.2)
346346
kaminari-core (1.2.2)
347-
knapsack_pro (8.1.0)
347+
knapsack_pro (8.1.2)
348348
rake
349349
language_server-protocol (3.17.0.4)
350350
launchy (3.0.0)
@@ -412,14 +412,14 @@ GEM
412412
net-protocol
413413
newrelic_rpm (9.16.0)
414414
nio4r (2.7.4)
415-
nokogiri (1.18.7)
415+
nokogiri (1.18.8)
416416
mini_portile2 (~> 2.8.2)
417417
racc (~> 1.4)
418-
nokogiri (1.18.7-arm64-darwin)
418+
nokogiri (1.18.8-arm64-darwin)
419419
racc (~> 1.4)
420-
nokogiri (1.18.7-x86_64-darwin)
420+
nokogiri (1.18.8-x86_64-darwin)
421421
racc (~> 1.4)
422-
nokogiri (1.18.7-x86_64-linux-gnu)
422+
nokogiri (1.18.8-x86_64-linux-gnu)
423423
racc (~> 1.4)
424424
notiffany (0.1.3)
425425
nenv (~> 0.1)
@@ -431,7 +431,7 @@ GEM
431431
rack (>= 1.2, < 4)
432432
snaky_hash (~> 2.0)
433433
version_gem (~> 1.1)
434-
omniauth (2.1.2)
434+
omniauth (2.1.3)
435435
hashie (>= 3.4.6)
436436
rack (>= 2.2.3)
437437
rack-protection
@@ -454,8 +454,8 @@ GEM
454454
paper_trail (16.0.0)
455455
activerecord (>= 6.1)
456456
request_store (~> 1.4)
457-
parallel (1.26.3)
458-
parser (3.3.7.4)
457+
parallel (1.27.0)
458+
parser (3.3.8.0)
459459
ast (~> 2.4.1)
460460
racc
461461
pdf-core (0.10.0)
@@ -505,7 +505,7 @@ GEM
505505
puma (6.6.0)
506506
nio4r (~> 2.0)
507507
racc (1.8.1)
508-
rack (3.1.12)
508+
rack (3.1.13)
509509
rack-mini-profiler (3.3.1)
510510
rack (>= 1.2.0)
511511
rack-protection (4.0.0)
@@ -596,22 +596,24 @@ GEM
596596
rspec-mocks (~> 3.13)
597597
rspec-support (~> 3.13)
598598
rspec-support (3.13.2)
599-
rubocop (1.70.0)
599+
rubocop (1.75.4)
600600
json (~> 2.3)
601-
language_server-protocol (>= 3.17.0)
601+
language_server-protocol (~> 3.17.0.2)
602+
lint_roller (~> 1.1.0)
602603
parallel (~> 1.10)
603604
parser (>= 3.3.0.2)
604605
rainbow (>= 2.2.2, < 4.0)
605606
regexp_parser (>= 2.9.3, < 3.0)
606-
rubocop-ast (>= 1.36.2, < 2.0)
607+
rubocop-ast (>= 1.44.0, < 2.0)
607608
ruby-progressbar (~> 1.7)
608609
unicode-display_width (>= 2.4.0, < 4.0)
609-
rubocop-ast (1.43.0)
610+
rubocop-ast (1.44.1)
610611
parser (>= 3.3.7.2)
611612
prism (~> 1.4)
612-
rubocop-performance (1.23.1)
613-
rubocop (>= 1.48.1, < 2.0)
614-
rubocop-ast (>= 1.31.1, < 2.0)
613+
rubocop-performance (1.25.0)
614+
lint_roller (~> 1.1)
615+
rubocop (>= 1.75.0, < 2.0)
616+
rubocop-ast (>= 1.38.0, < 2.0)
615617
rubocop-rails (2.25.1)
616618
activesupport (>= 4.2.0)
617619
rack (>= 1.1)
@@ -663,33 +665,34 @@ GEM
663665
activejob (>= 7.2)
664666
activerecord (>= 7.2)
665667
railties (>= 7.2)
666-
sprockets (4.2.1)
668+
sprockets (4.2.2)
667669
concurrent-ruby (~> 1.0)
670+
logger
668671
rack (>= 2.2.4, < 4)
669672
sprockets-rails (3.4.2)
670673
actionpack (>= 5.2)
671674
activesupport (>= 5.2)
672675
sprockets (>= 3.0.0)
673676
stackprof (0.2.27)
674-
standard (1.44.0)
677+
standard (1.49.0)
675678
language_server-protocol (~> 3.17.0.2)
676679
lint_roller (~> 1.0)
677-
rubocop (~> 1.70.0)
680+
rubocop (~> 1.75.2)
678681
standard-custom (~> 1.0.0)
679-
standard-performance (~> 1.6)
682+
standard-performance (~> 1.8)
680683
standard-custom (1.0.2)
681684
lint_roller (~> 1.0)
682685
rubocop (~> 1.50)
683-
standard-performance (1.6.0)
686+
standard-performance (1.8.0)
684687
lint_roller (~> 1.1)
685-
rubocop-performance (~> 1.23.0)
688+
rubocop-performance (~> 1.25.0)
686689
standard-rails (1.1.0)
687690
lint_roller (~> 1.0)
688691
rubocop-rails (~> 2.25.0)
689692
stimulus-rails (1.3.4)
690693
railties (>= 6.0.0)
691694
stringio (3.1.6)
692-
strong_migrations (2.2.1)
695+
strong_migrations (2.3.0)
693696
activerecord (>= 7)
694697
terser (1.2.5)
695698
execjs (>= 0.3.0, < 3)
@@ -732,16 +735,11 @@ GEM
732735
zeitwerk (2.7.2)
733736

734737
PLATFORMS
735-
arm64-darwin-20
736-
arm64-darwin-21
737-
arm64-darwin-22
738-
arm64-darwin-23
738+
arm64-darwin
739739
ruby
740-
x86_64-darwin-20
741-
x86_64-darwin-21
742-
x86_64-darwin-22
743-
x86_64-darwin-23
740+
x86_64-darwin
744741
x86_64-linux
742+
x86_64-linux-gnu
745743

746744
DEPENDENCIES
747745
annotaterb
@@ -820,7 +818,7 @@ DEPENDENCIES
820818
simple_form
821819
simplecov
822820
solid_cache (~> 1.0)
823-
sprockets (~> 4.2.1)
821+
sprockets (~> 4.2.2)
824822
stackprof
825823
standard (~> 1.40)
826824
standard-performance
@@ -833,4 +831,4 @@ DEPENDENCIES
833831
webmock (~> 3.24)
834832

835833
BUNDLED WITH
836-
2.6.6
834+
2.6.7

app/controllers/admin/organizations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def destroy
8686

8787
def organization_params
8888
params.require(:organization)
89-
.permit(:name, :short_name, :street, :city, :state, :zipcode, :email, :url, :logo, :intake_location, :default_email_text, :account_request_id, :reminder_day, :deadline_day,
89+
.permit(:name, :street, :city, :state, :zipcode, :email, :url, :logo, :intake_location, :default_email_text, :account_request_id, :reminder_day, :deadline_day,
9090
users_attributes: %i(name email organization_admin), account_request_attributes: %i(ndbn_member_id id))
9191
end
9292

app/controllers/application_controller.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class ApplicationController < ActionController::Base
1515

1616
rescue_from ActiveRecord::RecordNotFound, with: :not_found!
1717

18-
rescue_from ActionController::InvalidAuthenticityToken do
18+
rescue_from ActionController::InvalidAuthenticityToken, with: :session_expired
19+
20+
def session_expired
1921
flash[:error] = "Your session expired. This could be due to leaving a page open for a long time, or having multiple tabs open. Try resubmitting."
2022
redirect_back fallback_location: root_path
2123
end
@@ -28,7 +30,7 @@ def current_organization
2830
elsif current_role.resource.is_a?(Organization)
2931
current_role.resource
3032
else
31-
Organization.find_by(short_name: params[:organization_name])
33+
Organization.find_by(id: params[:organization_id])
3234
end
3335
end
3436
helper_method :current_organization
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module Validatable
2+
extend ActiveSupport::Concern
3+
4+
included do
5+
rescue_from ActionController::InvalidAuthenticityToken do
6+
if action_name == "validate"
7+
render json: {valid: false}
8+
else
9+
session_expired
10+
end
11+
end
12+
end
13+
end

app/controllers/distributions_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
class DistributionsController < ApplicationController
77
include DateRangeHelper
88
include DistributionHelper
9+
include Validatable
910

1011
before_action :enable_turbo!, only: %i[new show]
1112
skip_before_action :authenticate_user!, only: %i(calendar)

app/controllers/donations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def index
4949
respond_to do |format|
5050
format.html
5151
format.csv do
52-
send_data Exports::ExportDonationsCSVService.new(donation_ids: @donations.map(&:id)).generate_csv, filename: "Donations-#{Time.zone.today}.csv"
52+
send_data Exports::ExportDonationsCSVService.new(donation_ids: @donations.map(&:id), organization: current_organization).generate_csv, filename: "Donations-#{Time.zone.today}.csv"
5353
end
5454
end
5555
end

0 commit comments

Comments
 (0)