Skip to content

Commit 03df67c

Browse files
authored
Send mail after a request is submitted, not saved (#1828)
* Send mail after a request is submitted, not saved * Update rspec
1 parent 641e8c0 commit 03df67c

File tree

4 files changed

+29
-27
lines changed

4 files changed

+29
-27
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ gem "sidekiq"
7373
gem "whenever", require: false
7474

7575
group :development, :test do
76-
gem "rspec-rails", "~> 6.0.0"
76+
gem "rspec-rails", "~> 7.0.1"
7777

7878
gem "bixby"
7979
gem "byebug"

Gemfile.lock

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ GEM
9898
bcrypt_pbkdf (1.1.1-arm64-darwin)
9999
bcrypt_pbkdf (1.1.1-x86_64-darwin)
100100
benchmark (0.4.1)
101-
bigdecimal (3.2.2)
101+
bigdecimal (3.2.3)
102102
bindex (0.8.1)
103103
bixby (5.0.2)
104104
rubocop (= 1.28.2)
@@ -142,7 +142,7 @@ GEM
142142
coercible (1.0.0)
143143
descendants_tracker (~> 0.0.1)
144144
concurrent-ruby (1.3.5)
145-
connection_pool (2.5.3)
145+
connection_pool (2.5.4)
146146
coveralls_reborn (0.29.0)
147147
simplecov (~> 0.22.0)
148148
term-ansicolor (~> 1.7)
@@ -192,7 +192,7 @@ GEM
192192
execjs (2.10.0)
193193
factory_bot (6.5.5)
194194
activesupport (>= 6.1.0)
195-
factory_bot_rails (6.5.0)
195+
factory_bot_rails (6.5.1)
196196
factory_bot (~> 6.5)
197197
railties (>= 6.1.0)
198198
faraday (2.13.4)
@@ -204,7 +204,7 @@ GEM
204204
faye-websocket (0.11.4)
205205
eventmachine (>= 0.12.0)
206206
websocket-driver (>= 0.5.1, < 0.8.0)
207-
ffaker (2.24.0)
207+
ffaker (2.25.0)
208208
ffi (1.17.2-aarch64-linux-gnu)
209209
ffi (1.17.2-arm-linux-gnu)
210210
ffi (1.17.2-arm64-darwin)
@@ -222,11 +222,11 @@ GEM
222222
google-protobuf (3.25.8-x86-linux)
223223
google-protobuf (3.25.8-x86_64-darwin)
224224
google-protobuf (3.25.8-x86_64-linux)
225-
hashdiff (1.2.0)
225+
hashdiff (1.2.1)
226226
hashie (5.0.0)
227227
health-monitor-rails (12.4.0)
228228
railties (>= 6.1)
229-
honeybadger (6.0.6)
229+
honeybadger (6.1.0)
230230
logger
231231
ostruct
232232
i18n (1.14.7)
@@ -290,10 +290,12 @@ GEM
290290
uri
291291
net-http-persistent (4.0.6)
292292
connection_pool (~> 2.2, >= 2.2.4)
293-
net-imap (0.5.9)
293+
net-imap (0.5.10)
294294
date
295295
net-protocol
296-
net-ldap (0.19.0)
296+
net-ldap (0.20.0)
297+
base64
298+
ostruct
297299
net-pop (0.1.2)
298300
net-protocol
299301
net-protocol (0.2.2)
@@ -333,11 +335,11 @@ GEM
333335
parser (3.3.9.0)
334336
ast (~> 2.4.1)
335337
racc
336-
pg (1.6.1)
337-
pg (1.6.1-aarch64-linux)
338-
pg (1.6.1-arm64-darwin)
339-
pg (1.6.1-x86_64-darwin)
340-
pg (1.6.1-x86_64-linux)
338+
pg (1.6.2)
339+
pg (1.6.2-aarch64-linux)
340+
pg (1.6.2-arm64-darwin)
341+
pg (1.6.2-x86_64-darwin)
342+
pg (1.6.2-x86_64-linux)
341343
popper_js (2.11.8)
342344
pp (0.6.2)
343345
prettyprint
@@ -418,7 +420,7 @@ GEM
418420
responders (3.1.1)
419421
actionpack (>= 5.2)
420422
railties (>= 5.2)
421-
rexml (3.4.1)
423+
rexml (3.4.3)
422424
rspec-core (3.13.5)
423425
rspec-support (~> 3.13.0)
424426
rspec-expectations (3.13.5)
@@ -427,14 +429,14 @@ GEM
427429
rspec-mocks (3.13.5)
428430
diff-lcs (>= 1.2.0, < 2.0)
429431
rspec-support (~> 3.13.0)
430-
rspec-rails (6.0.4)
431-
actionpack (>= 6.1)
432-
activesupport (>= 6.1)
433-
railties (>= 6.1)
434-
rspec-core (~> 3.12)
435-
rspec-expectations (~> 3.12)
436-
rspec-mocks (~> 3.12)
437-
rspec-support (~> 3.12)
432+
rspec-rails (7.0.2)
433+
actionpack (>= 7.0)
434+
activesupport (>= 7.0)
435+
railties (>= 7.0)
436+
rspec-core (~> 3.13)
437+
rspec-expectations (~> 3.13)
438+
rspec-mocks (~> 3.13)
439+
rspec-support (~> 3.13)
438440
rspec-retry (0.6.2)
439441
rspec-core (> 3.3)
440442
rspec-support (3.13.5)
@@ -463,7 +465,7 @@ GEM
463465
rubocop (~> 1.19)
464466
ruby-progressbar (1.13.0)
465467
ruby2_keywords (0.0.5)
466-
rubyzip (3.0.2)
468+
rubyzip (3.1.0)
467469
sassc (2.4.0)
468470
ffi (~> 1.9)
469471
sassc-rails (2.1.2)
@@ -533,7 +535,7 @@ GEM
533535
thread_safe (0.3.6)
534536
tilt (2.6.1)
535537
timeout (0.4.3)
536-
tins (1.42.0)
538+
tins (1.43.0)
537539
bigdecimal
538540
sync
539541
turbo-rails (2.0.16)
@@ -629,7 +631,7 @@ DEPENDENCIES
629631
rails (~> 7.1)
630632
rails-controller-testing
631633
redis (~> 4.0)
632-
rspec-rails (~> 6.0.0)
634+
rspec-rails (~> 7.0.1)
633635
rspec-retry
634636
rspec_junit_formatter
635637
selenium-webdriver

app/controllers/new_project_wizard/review_and_submit_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def render_next
1212
if @request_model.valid_to_submit?
1313
@request_model.state = Request::SUBMITTED
1414
@request_model.save
15+
TigerdataMailer.with(request_id: @request_model.id).request_creation.deliver_now
1516
redirect_to request_path(@request_model.id)
1617
else
1718
stubbed_message = "Please resolve errors before submitting your request"

app/controllers/request_wizards_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def save
3636
# Go directly to the step the user clicked on
3737
redirect_to params[:commit]
3838
else
39-
TigerdataMailer.with(request_id: @request_model.id).request_creation.deliver_now
4039
redirect_to "#{requests_path}/#{@request_model.id}"
4140
end
4241
end

0 commit comments

Comments
 (0)