Skip to content

Commit ea3f791

Browse files
authored
Merge branch 'main' into dependabot/bundler/prawn-rails-1.5.0
2 parents d10b2f5 + 36f4fe8 commit ea3f791

File tree

431 files changed

+6103
-4600
lines changed

Some content is hidden

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

431 files changed

+6103
-4600
lines changed
File renamed without changes.

.rubocop_todo.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ Layout/SpaceInsideHashLiteralBraces:
225225
- 'app/models/product_drive_participant.rb'
226226
- 'app/models/distribution.rb'
227227
- 'app/models/donation.rb'
228-
- 'app/models/inventory_item.rb'
229228
- 'app/models/item.rb'
230229
- 'app/models/item_category.rb'
231230
- 'app/models/kit.rb'

CONTRIBUTING.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,49 @@ Make sure to install **Ubuntu** as your Linux distribution. (This should be defa
5353
<details>
5454
<summary> Bank Users 🏦 </summary>
5555

56+
Pawnee Diaper Bank
57+
A fully set up bank with items, storage locations, donations, distributions, requests, etc.
58+
The bank has multiple partners associated with it.
5659
```
5760
Organization Admin
58-
61+
5962
Password: password!
6063
6164
User
6265
6366
Password: password!
6467
```
68+
69+
Second City Essentials Bank
70+
A fully set up bank with items, storage locations, donations, distributions, requests, etc.
71+
The bank has four items unique to it (named Second City Item #).
72+
```
73+
Organization Admin
74+
75+
Password: password!
76+
77+
User
78+
79+
Password: password!
80+
```
81+
82+
SF Diaper Bank
83+
A bank which has just been accepted and so is not fully set up. It lacks many of the records the other banks have.
84+
```
85+
Organization Admin
86+
87+
Password: password!
88+
89+
User
90+
91+
Password: password!
92+
```
6593
</details>
6694

6795
<details>
6896
<summary> Partner Users 👥 </summary>
6997

98+
Partners in Pawnee Diaper Bank partner groups
7099
```
71100
Verified Partner
72101
@@ -87,10 +116,17 @@ Make sure to install **Ubuntu** as your Linux distribution. (This should be defa
87116
Waiting Approval Partner
88117
89118
Password: password!
90-
91-
Another approved partner (with all groups):
119+
120+
Another verified partner (in second partner group):
92121
93-
Pasword: password!
122+
Password: password!
123+
```
124+
125+
Partners in Second City Essentials Bank partner group
126+
```
127+
Verified partner
128+
129+
Password: password!
94130
```
95131
</details>
96132

@@ -221,7 +257,7 @@ Before submitting a pull request, run all tests and lints. Fix any broken tests
221257
- Once your first PR has been merged, all commits pushed to an open PR will also run these workflows.
222258
223259
#### Local testing
224-
- Run all lints with `bin/lint`.
260+
- Run all lints with `bin/lint`. (You can lint a single file/folder with `bin/lint {path_to_folder_or_file}`.)
225261
- Run all tests with `bundle exec rspec`
226262
- You can run a single test with `bundle exec rspec {path_to_test_name}_spec.rb` or on a specific line by appending `:LineNumber`
227263
- If you need to skip a failing test, place `pending("Reason you are skipping the test")` into the `it` block rather than skipping with `xit`. This will allow rspec to deliver the error message without causing the test suite to fail.

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ gem "jwt"
100100
gem "newrelic_rpm"
101101
# Used to manage periodic cron-like jobs
102102
gem "clockwork"
103+
# Speed up app boot time by caching expensive operations
104+
gem 'bootsnap', require: false
103105

104106
##### DEPENDENCY PINS ######
105107
# These are gems that aren't used directly, only as dependencies for other gems.

Gemfile.lock

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ GEM
111111
bindex (0.8.1)
112112
binding_of_caller (1.0.1)
113113
debug_inspector (>= 1.2.0)
114+
bootsnap (1.18.4)
115+
msgpack (~> 1.2)
114116
bootstrap (5.2.3)
115117
autoprefixer-rails (>= 9.1.0)
116118
popper_js (>= 2.11.6, < 3)
@@ -120,7 +122,7 @@ GEM
120122
bugsnag (6.27.1)
121123
concurrent-ruby (~> 1.0)
122124
builder (3.3.0)
123-
bullet (7.2.0)
125+
bullet (8.0.0)
124126
activesupport (>= 3.0.0)
125127
uniform_notifier (~> 1.11)
126128
capybara (3.40.0)
@@ -143,7 +145,7 @@ GEM
143145
coderay (1.1.3)
144146
concurrent-ruby (1.3.4)
145147
connection_pool (2.4.1)
146-
coverband (6.1.2)
148+
coverband (6.1.4)
147149
redis (>= 3.0)
148150
crack (1.0.0)
149151
bigdecimal
@@ -162,9 +164,9 @@ GEM
162164
irb (~> 1.10)
163165
reline (>= 0.3.8)
164166
debug_inspector (1.2.0)
165-
delayed_job (4.1.11)
167+
delayed_job (4.1.12)
166168
activesupport (>= 3.0, < 8.0)
167-
delayed_job_active_record (4.1.8)
169+
delayed_job_active_record (4.1.10)
168170
activerecord (>= 3.0, < 8.0)
169171
delayed_job (>= 3.0, < 5)
170172
delayed_job_web (1.4.4)
@@ -209,15 +211,15 @@ GEM
209211
dry-inflector (~> 1.0)
210212
dry-logic (~> 1.4)
211213
zeitwerk (~> 2.6)
212-
erb_lint (0.6.0)
214+
erb_lint (0.7.0)
213215
activesupport
214216
better_html (>= 2.0.1)
215217
parser (>= 2.7.1.4)
216218
rainbow
217219
rubocop (>= 1)
218220
smart_properties
219221
erubi (1.13.0)
220-
execjs (2.9.1)
222+
execjs (2.10.0)
221223
factory_bot (6.4.5)
222224
activesupport (>= 5.0.0)
223225
factory_bot_rails (6.4.3)
@@ -259,14 +261,14 @@ GEM
259261
ffi (1.17.0-x86_64-darwin)
260262
ffi (1.17.0-x86_64-linux-gnu)
261263
filterrific (5.2.5)
262-
flipper (1.3.0)
264+
flipper (1.3.2)
263265
concurrent-ruby (< 2)
264-
flipper-active_record (1.3.0)
265-
activerecord (>= 4.2, < 8)
266-
flipper (~> 1.3.0)
267-
flipper-ui (1.3.0)
266+
flipper-active_record (1.3.2)
267+
activerecord (>= 4.2, < 9)
268+
flipper (~> 1.3.2)
269+
flipper-ui (1.3.1)
268270
erubi (>= 1.0.0, < 2.0.0)
269-
flipper (~> 1.3.0)
271+
flipper (~> 1.3.1)
270272
rack (>= 1.4, < 4)
271273
rack-protection (>= 1.5.3, < 5.0.0)
272274
rack-session (>= 1.0.2, < 3.0.0)
@@ -321,7 +323,7 @@ GEM
321323
jbuilder (2.13.0)
322324
actionview (>= 5.0.0)
323325
activesupport (>= 5.0.0)
324-
json (2.7.2)
326+
json (2.7.5)
325327
jwt (2.9.1)
326328
base64
327329
kaminari (1.2.2)
@@ -373,7 +375,7 @@ GEM
373375
method_source (1.1.0)
374376
mini_magick (4.13.2)
375377
mini_mime (1.1.5)
376-
minitest (5.25.1)
378+
minitest (5.25.2)
377379
monetize (1.12.0)
378380
money (~> 6.12)
379381
money (6.16.0)
@@ -383,12 +385,13 @@ GEM
383385
monetize (~> 1.9)
384386
money (~> 6.13)
385387
railties (>= 3.0)
388+
msgpack (1.7.5)
386389
multi_xml (0.7.1)
387390
bigdecimal (~> 3.1)
388391
multipart-post (2.4.1)
389392
mustermann (3.0.0)
390393
ruby2_keywords (~> 0.0.1)
391-
mutex_m (0.2.0)
394+
mutex_m (0.3.0)
392395
nenv (0.3.0)
393396
net-http-persistent (4.0.2)
394397
connection_pool (~> 2.2)
@@ -401,7 +404,7 @@ GEM
401404
timeout
402405
net-smtp (0.5.0)
403406
net-protocol
404-
newrelic_rpm (9.13.0)
407+
newrelic_rpm (9.16.0)
405408
nio4r (2.7.3)
406409
nokogiri (1.16.7-arm64-darwin)
407410
racc (~> 1.4)
@@ -442,7 +445,7 @@ GEM
442445
activerecord (>= 6.1)
443446
request_store (~> 1.4)
444447
parallel (1.26.3)
445-
parser (3.3.4.2)
448+
parser (3.3.5.1)
446449
ast (~> 2.4.1)
447450
racc
448451
pdf-core (0.10.0)
@@ -487,7 +490,7 @@ GEM
487490
puma (6.4.3)
488491
nio4r (~> 2.0)
489492
racc (1.8.1)
490-
rack (2.2.9)
493+
rack (2.2.10)
491494
rack-protection (3.1.0)
492495
rack (~> 2.2, >= 2.2.4)
493496
rack-session (1.0.2)
@@ -555,7 +558,7 @@ GEM
555558
responders (3.1.1)
556559
actionpack (>= 5.2)
557560
railties (>= 5.2)
558-
rexml (3.3.8)
561+
rexml (3.3.9)
559562
rolify (6.0.1)
560563
rouge (4.1.2)
561564
rspec (3.13.0)
@@ -590,9 +593,9 @@ GEM
590593
rubocop-ast (>= 1.31.1, < 2.0)
591594
ruby-progressbar (~> 1.7)
592595
unicode-display_width (>= 2.4.0, < 3.0)
593-
rubocop-ast (1.32.1)
596+
rubocop-ast (1.33.0)
594597
parser (>= 3.3.1.0)
595-
rubocop-performance (1.21.1)
598+
rubocop-performance (1.22.1)
596599
rubocop (>= 1.48.1, < 2.0)
597600
rubocop-ast (>= 1.31.1, < 2.0)
598601
rubocop-rails (2.25.1)
@@ -608,7 +611,7 @@ GEM
608611
ffi (~> 1.12)
609612
logger
610613
ruby2_keywords (0.0.5)
611-
sanitize (6.1.0)
614+
sanitize (6.1.3)
612615
crass (~> 1.0.2)
613616
nokogiri (>= 1.12.0)
614617
sass-rails (6.0.0)
@@ -659,27 +662,27 @@ GEM
659662
standard-custom (1.0.2)
660663
lint_roller (~> 1.0)
661664
rubocop (~> 1.50)
662-
standard-performance (1.4.0)
665+
standard-performance (1.5.0)
663666
lint_roller (~> 1.1)
664-
rubocop-performance (~> 1.21.0)
667+
rubocop-performance (~> 1.22.0)
665668
stimulus-rails (1.3.4)
666669
railties (>= 6.0.0)
667670
stringio (3.1.1)
668671
strong_migrations (1.8.0)
669672
activerecord (>= 5.2)
670-
terser (1.2.3)
673+
terser (1.2.4)
671674
execjs (>= 0.3.0, < 3)
672675
thor (1.3.2)
673676
tilt (2.2.0)
674-
timeout (0.4.1)
677+
timeout (0.4.2)
675678
ttfunk (1.8.0)
676679
bigdecimal (~> 3.1)
677680
turbo-rails (2.0.10)
678681
actionpack (>= 6.0.0)
679682
railties (>= 6.0.0)
680683
tzinfo (2.0.6)
681684
concurrent-ruby (~> 1.0)
682-
unicode-display_width (2.5.0)
685+
unicode-display_width (2.6.0)
683686
uniform_notifier (1.16.0)
684687
version_gem (1.1.4)
685688
warden (1.2.9)
@@ -707,6 +710,7 @@ PLATFORMS
707710
arm64-darwin-21
708711
arm64-darwin-22
709712
arm64-darwin-23
713+
arm64-darwin-24
710714
x86_64-darwin-20
711715
x86_64-darwin-21
712716
x86_64-darwin-22
@@ -719,6 +723,7 @@ DEPENDENCIES
719723
azure-storage-blob
720724
better_errors
721725
binding_of_caller
726+
bootsnap
722727
bootstrap (~> 5.2)
723728
brakeman
724729
bugsnag
@@ -801,4 +806,4 @@ DEPENDENCIES
801806
webmock (~> 3.24)
802807

803808
BUNDLED WITH
804-
2.5.22
809+
2.5.23

app/assets/stylesheets/custom.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,13 @@
9898
margin-top: 40px;
9999
}
100100
}
101+
102+
.accordion-button.saving::after {
103+
background-image: none;
104+
content: "Saving...";
105+
font-size: 0.875rem;
106+
color: #005568;
107+
transform: none;
108+
width: 3rem;
109+
cursor: not-allowed;
110+
}

app/controllers/admin/base_items_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# [Super Admin] Manage the BaseItems -- this is the only place in the app where Base Items can be
22
# added / modified. Base Items are both the template and common thread for regular Items
3+
#
4+
# See #4656, BaseItems are pending significant changes/possible deletion
35
class Admin::BaseItemsController < AdminController
46
def edit
57
@base_item = BaseItem.find(params[:id])
@@ -40,7 +42,9 @@ def show
4042

4143
def destroy
4244
@base_item = BaseItem.includes(:items).find(params[:id])
43-
if @base_item.items.any? && @base_item.destroy
45+
if @base_item.id == KitCreateService.find_or_create_kit_base_item!.id
46+
redirect_to admin_base_items_path, alert: "You cannot delete the Kits base item. This is reserved for all Kits."
47+
elsif @base_item.items.empty? && @base_item.destroy
4448
redirect_to admin_base_items_path, notice: "Base Item deleted!"
4549
else
4650
redirect_to admin_base_items_path, alert: "Failed to delete Base Item. Are there still items attached?"

app/controllers/admin/organizations_controller.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ def new
4646

4747
def create
4848
@organization = Organization.new(organization_params)
49+
@user = User.new(user_params)
4950

5051
if @organization.save
5152
Organization.seed_items(@organization)
52-
@user = UserInviteService.invite(name: user_params[:name],
53-
email: user_params[:email],
54-
roles: [Role::ORG_USER, Role::ORG_ADMIN],
55-
resource: @organization)
53+
UserInviteService.invite(name: user_params[:name],
54+
email: user_params[:email],
55+
roles: [Role::ORG_USER, Role::ORG_ADMIN],
56+
resource: @organization)
5657
SnapshotEvent.publish(@organization) # need one to start with
5758
redirect_to admin_organizations_path, notice: "Organization added!"
5859
else

0 commit comments

Comments
 (0)