Skip to content

Commit 26cc8c8

Browse files
committed
[MAINT] Update gems, oauth-related fixes
1 parent d57fc51 commit 26cc8c8

File tree

13 files changed

+104
-116
lines changed

13 files changed

+104
-116
lines changed

.github/workflows/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,15 @@ jobs:
6060
bundler-cache: true
6161

6262
- name: Precompile assets
63+
env:
64+
RAILS_ENV: test
65+
RAILS_BUILD: "true"
6366
run: bin/rails assets:precompile
6467

6568
- name: Run tests
6669
env:
6770
RAILS_ENV: test
71+
RAILS_BUILD: "true"
6872
# REDIS_URL: redis://localhost:6379/0
6973
run: bin/rails db:test:prepare test test:system
7074

.kamal/hooks/post-deploy

-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
#!/bin/bash
22

33
echo "$KAMAL_PERFORMER deployed $KAMAL_VERSION to $KAMAL_DESTINATION in $KAMAL_RUNTIME seconds"
4-
5-
echo "Running migrations"
6-
7-
kamal bundle exec rails db:migrate
8-
kamal bundle exec rails db:migrate:queue
9-
kamal bundle exec rails db:migrate:cache

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ COPY . .
5757
RUN bundle exec bootsnap precompile app/ lib/
5858

5959
# Precompiling assets for production without requiring secret RAILS_MASTER_KEY
60-
RUN RAILS_ENV=production SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
60+
RUN RAILS_ENV=production RAILS_BUILD=1 SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
6161

6262
# Final stage for app image
6363
FROM base

Gemfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
source "https://rubygems.org"
22

3-
gem "rails", "8.0.0.rc2"
3+
gem "rails", "8.0.0"
44

55
gem "bootsnap", require: false
66
gem "friendly_id", "~> 5.5.1"
77
gem "kamal", "~> 2.3.0", require: false
8-
gem "thruster", "~> 0.1.8", require: false
9-
gem "mission_control-jobs", "~> 0.4.0"
8+
gem "thruster", "~> 0.1.9", require: false
9+
gem "mission_control-jobs", "~> 0.6.0"
1010
gem "litestream", "~> 0.12.0"
1111
gem "omniauth-github", github: "omniauth/omniauth-github", branch: "master"
1212
gem "omniauth-rails_csrf_protection"
1313
gem "propshaft", "~> 1.1.0"
1414
gem "solid_cache", "~> 1.0.6"
15-
gem "solid_queue", "~> 1.0.1"
16-
gem "sqlite3", "~> 2.2.0"
15+
gem "solid_queue", "~> 1.0.2"
16+
gem "sqlite3", "~> 2.3.0"
1717
gem "stimulus-rails"
1818
gem "turbo-rails", "~> 2.0.11"
1919
gem "puma", ">= 6.4.3"
20-
gem "phlex-rails", "~> 1.2.1"
20+
gem "phlex-rails", "~> 1.2.2"
2121
gem "vite_rails", "~> 3.0.19"
2222

2323
group :development do

Gemfile.lock

+81-81
Original file line numberDiff line numberDiff line change
@@ -10,65 +10,65 @@ GIT
1010
GEM
1111
remote: https://rubygems.org/
1212
specs:
13-
actioncable (8.0.0.rc2)
14-
actionpack (= 8.0.0.rc2)
15-
activesupport (= 8.0.0.rc2)
13+
actioncable (8.0.0)
14+
actionpack (= 8.0.0)
15+
activesupport (= 8.0.0)
1616
nio4r (~> 2.0)
1717
websocket-driver (>= 0.6.1)
1818
zeitwerk (~> 2.6)
19-
actionmailbox (8.0.0.rc2)
20-
actionpack (= 8.0.0.rc2)
21-
activejob (= 8.0.0.rc2)
22-
activerecord (= 8.0.0.rc2)
23-
activestorage (= 8.0.0.rc2)
24-
activesupport (= 8.0.0.rc2)
19+
actionmailbox (8.0.0)
20+
actionpack (= 8.0.0)
21+
activejob (= 8.0.0)
22+
activerecord (= 8.0.0)
23+
activestorage (= 8.0.0)
24+
activesupport (= 8.0.0)
2525
mail (>= 2.8.0)
26-
actionmailer (8.0.0.rc2)
27-
actionpack (= 8.0.0.rc2)
28-
actionview (= 8.0.0.rc2)
29-
activejob (= 8.0.0.rc2)
30-
activesupport (= 8.0.0.rc2)
26+
actionmailer (8.0.0)
27+
actionpack (= 8.0.0)
28+
actionview (= 8.0.0)
29+
activejob (= 8.0.0)
30+
activesupport (= 8.0.0)
3131
mail (>= 2.8.0)
3232
rails-dom-testing (~> 2.2)
33-
actionpack (8.0.0.rc2)
34-
actionview (= 8.0.0.rc2)
35-
activesupport (= 8.0.0.rc2)
33+
actionpack (8.0.0)
34+
actionview (= 8.0.0)
35+
activesupport (= 8.0.0)
3636
nokogiri (>= 1.8.5)
3737
rack (>= 2.2.4)
3838
rack-session (>= 1.0.1)
3939
rack-test (>= 0.6.3)
4040
rails-dom-testing (~> 2.2)
4141
rails-html-sanitizer (~> 1.6)
4242
useragent (~> 0.16)
43-
actiontext (8.0.0.rc2)
44-
actionpack (= 8.0.0.rc2)
45-
activerecord (= 8.0.0.rc2)
46-
activestorage (= 8.0.0.rc2)
47-
activesupport (= 8.0.0.rc2)
43+
actiontext (8.0.0)
44+
actionpack (= 8.0.0)
45+
activerecord (= 8.0.0)
46+
activestorage (= 8.0.0)
47+
activesupport (= 8.0.0)
4848
globalid (>= 0.6.0)
4949
nokogiri (>= 1.8.5)
50-
actionview (8.0.0.rc2)
51-
activesupport (= 8.0.0.rc2)
50+
actionview (8.0.0)
51+
activesupport (= 8.0.0)
5252
builder (~> 3.1)
5353
erubi (~> 1.11)
5454
rails-dom-testing (~> 2.2)
5555
rails-html-sanitizer (~> 1.6)
56-
activejob (8.0.0.rc2)
57-
activesupport (= 8.0.0.rc2)
56+
activejob (8.0.0)
57+
activesupport (= 8.0.0)
5858
globalid (>= 0.3.6)
59-
activemodel (8.0.0.rc2)
60-
activesupport (= 8.0.0.rc2)
61-
activerecord (8.0.0.rc2)
62-
activemodel (= 8.0.0.rc2)
63-
activesupport (= 8.0.0.rc2)
59+
activemodel (8.0.0)
60+
activesupport (= 8.0.0)
61+
activerecord (8.0.0)
62+
activemodel (= 8.0.0)
63+
activesupport (= 8.0.0)
6464
timeout (>= 0.4.0)
65-
activestorage (8.0.0.rc2)
66-
actionpack (= 8.0.0.rc2)
67-
activejob (= 8.0.0.rc2)
68-
activerecord (= 8.0.0.rc2)
69-
activesupport (= 8.0.0.rc2)
65+
activestorage (8.0.0)
66+
actionpack (= 8.0.0)
67+
activejob (= 8.0.0)
68+
activerecord (= 8.0.0)
69+
activesupport (= 8.0.0)
7070
marcel (~> 1.0)
71-
activesupport (8.0.0.rc2)
71+
activesupport (8.0.0)
7272
base64
7373
benchmark (>= 0.3)
7474
bigdecimal
@@ -232,7 +232,7 @@ GEM
232232
minio (0.4.0-x86_64-darwin)
233233
minio (0.4.0-x86_64-linux)
234234
minitest (5.25.1)
235-
mission_control-jobs (0.4.0)
235+
mission_control-jobs (0.6.0)
236236
actioncable (>= 7.1)
237237
actionpack (>= 7.1)
238238
activejob (>= 7.1)
@@ -249,7 +249,7 @@ GEM
249249
bigdecimal (~> 3.1)
250250
net-http (0.5.0)
251251
uri
252-
net-imap (0.5.0)
252+
net-imap (0.5.1)
253253
date
254254
net-protocol
255255
net-pop (0.1.2)
@@ -302,10 +302,10 @@ GEM
302302
parser (3.3.5.0)
303303
ast (~> 2.4.1)
304304
racc
305-
phlex (1.10.3)
306-
phlex-rails (1.2.1)
307-
phlex (~> 1.10.0)
308-
railties (>= 6.1, < 8)
305+
phlex (1.11.0)
306+
phlex-rails (1.2.2)
307+
phlex (>= 1.10, < 2)
308+
railties (>= 6.1, < 9)
309309
propshaft (1.1.0)
310310
actionpack (>= 7.0.0)
311311
activesupport (>= 7.0.0)
@@ -332,30 +332,30 @@ GEM
332332
rackup (2.1.0)
333333
rack (>= 3)
334334
webrick (~> 1.8)
335-
rails (8.0.0.rc2)
336-
actioncable (= 8.0.0.rc2)
337-
actionmailbox (= 8.0.0.rc2)
338-
actionmailer (= 8.0.0.rc2)
339-
actionpack (= 8.0.0.rc2)
340-
actiontext (= 8.0.0.rc2)
341-
actionview (= 8.0.0.rc2)
342-
activejob (= 8.0.0.rc2)
343-
activemodel (= 8.0.0.rc2)
344-
activerecord (= 8.0.0.rc2)
345-
activestorage (= 8.0.0.rc2)
346-
activesupport (= 8.0.0.rc2)
335+
rails (8.0.0)
336+
actioncable (= 8.0.0)
337+
actionmailbox (= 8.0.0)
338+
actionmailer (= 8.0.0)
339+
actionpack (= 8.0.0)
340+
actiontext (= 8.0.0)
341+
actionview (= 8.0.0)
342+
activejob (= 8.0.0)
343+
activemodel (= 8.0.0)
344+
activerecord (= 8.0.0)
345+
activestorage (= 8.0.0)
346+
activesupport (= 8.0.0)
347347
bundler (>= 1.15.0)
348-
railties (= 8.0.0.rc2)
348+
railties (= 8.0.0)
349349
rails-dom-testing (2.2.0)
350350
activesupport (>= 5.0.0)
351351
minitest
352352
nokogiri (>= 1.6)
353353
rails-html-sanitizer (1.6.0)
354354
loofah (~> 2.21)
355355
nokogiri (~> 1.14)
356-
railties (8.0.0.rc2)
357-
actionpack (= 8.0.0.rc2)
358-
activesupport (= 8.0.0.rc2)
356+
railties (8.0.0)
357+
actionpack (= 8.0.0)
358+
activesupport (= 8.0.0)
359359
irb (~> 1.13)
360360
rackup (>= 1.0.0)
361361
rake (>= 12.2)
@@ -423,23 +423,23 @@ GEM
423423
activejob (>= 7.2)
424424
activerecord (>= 7.2)
425425
railties (>= 7.2)
426-
solid_queue (1.0.1)
426+
solid_queue (1.0.2)
427427
activejob (>= 7.1)
428428
activerecord (>= 7.1)
429429
concurrent-ruby (>= 1.3.1)
430430
fugit (~> 1.11.0)
431431
railties (>= 7.1)
432432
thor (~> 1.3.1)
433-
sqlite3 (2.2.0-aarch64-linux-gnu)
434-
sqlite3 (2.2.0-aarch64-linux-musl)
435-
sqlite3 (2.2.0-arm-linux-gnu)
436-
sqlite3 (2.2.0-arm-linux-musl)
437-
sqlite3 (2.2.0-arm64-darwin)
438-
sqlite3 (2.2.0-x86-linux-gnu)
439-
sqlite3 (2.2.0-x86-linux-musl)
440-
sqlite3 (2.2.0-x86_64-darwin)
441-
sqlite3 (2.2.0-x86_64-linux-gnu)
442-
sqlite3 (2.2.0-x86_64-linux-musl)
433+
sqlite3 (2.3.0-aarch64-linux-gnu)
434+
sqlite3 (2.3.0-aarch64-linux-musl)
435+
sqlite3 (2.3.0-arm-linux-gnu)
436+
sqlite3 (2.3.0-arm-linux-musl)
437+
sqlite3 (2.3.0-arm64-darwin)
438+
sqlite3 (2.3.0-x86-linux-gnu)
439+
sqlite3 (2.3.0-x86-linux-musl)
440+
sqlite3 (2.3.0-x86_64-darwin)
441+
sqlite3 (2.3.0-x86_64-linux-gnu)
442+
sqlite3 (2.3.0-x86_64-linux-musl)
443443
sshkit (1.23.2)
444444
base64
445445
net-scp (>= 1.1.2)
@@ -450,11 +450,11 @@ GEM
450450
railties (>= 6.0.0)
451451
stringio (3.1.1)
452452
thor (1.3.2)
453-
thruster (0.1.8)
454-
thruster (0.1.8-aarch64-linux)
455-
thruster (0.1.8-arm64-darwin)
456-
thruster (0.1.8-x86_64-darwin)
457-
thruster (0.1.8-x86_64-linux)
453+
thruster (0.1.9)
454+
thruster (0.1.9-aarch64-linux)
455+
thruster (0.1.9-arm64-darwin)
456+
thruster (0.1.9-x86_64-darwin)
457+
thruster (0.1.9-x86_64-linux)
458458
timeout (0.4.1)
459459
turbo-rails (2.0.11)
460460
actionpack (>= 6.0.0)
@@ -517,24 +517,24 @@ DEPENDENCIES
517517
kamal (~> 2.3.0)
518518
litestream (~> 0.12.0)
519519
minio (~> 0.4.0)
520-
mission_control-jobs (~> 0.4.0)
520+
mission_control-jobs (~> 0.6.0)
521521
mocha (~> 2.5.0)
522522
omniauth-github!
523523
omniauth-rails_csrf_protection
524524
overcommit
525-
phlex-rails (~> 1.2.1)
525+
phlex-rails (~> 1.2.2)
526526
propshaft (~> 1.1.0)
527527
puma (>= 6.4.3)
528-
rails (= 8.0.0.rc2)
528+
rails (= 8.0.0)
529529
rubocop-rails-omakase
530530
selenium-webdriver (~> 4.26.0)
531531
simplecov
532532
simplecov-tailwindcss
533533
solid_cache (~> 1.0.6)
534-
solid_queue (~> 1.0.1)
535-
sqlite3 (~> 2.2.0)
534+
solid_queue (~> 1.0.2)
535+
sqlite3 (~> 2.3.0)
536536
stimulus-rails
537-
thruster (~> 0.1.8)
537+
thruster (~> 0.1.9)
538538
turbo-rails (~> 2.0.11)
539539
vite_rails (~> 3.0.19)
540540
web-console

app/controllers/sessions_controller.rb

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class SessionsController < ApplicationController
22
def create
3+
Rails.logger.info "OmniAuth Auth Hash: #{request.env['omniauth.auth'].inspect}"
34
@user = User.create_from_omniauth(request.env["omniauth.auth"])
45

56
if @user.persisted?
@@ -17,5 +18,8 @@ def destroy
1718
end
1819

1920
def failure
21+
Rails.logger.error "OmniAuth Failure: #{request.env['omniauth.error'].inspect}"
22+
Rails.logger.error "OmniAuth Error Type: #{request.env['omniauth.error.type'].inspect}"
23+
redirect_to root_path, alert: "Authentication failed"
2024
end
2125
end

bin/docker-entrypoint

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if [ -z "${LD_PRELOAD+x}" ] && [ -f /usr/lib/*/libjemalloc.so.2 ]; then
66
fi
77

88
# If running the rails server then create or migrate existing database
9-
if [ "${4}" == "./bin/rails" ] && [ "${5}" == "server" ]; then
9+
if [ "${2}" == "./bin/rails" ] && [ "${3}" == "server" ]; then
1010
./bin/rails db:prepare
1111
fi
1212

config/credentials/production.yml.enc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3EpzulcVbSg2dq4L55l7wpMG9ULgcjdHHeVrFWb7o0barxucpvnPorDssULfEzQKOmPReR1jv5LsnONxBMOLft7Pb+Msyq6svPVyN8teRJT6ClU0IutLy3fyLAG3UygKifYhgTqdsMk5JAqdN6s00VNreSGmDXMzEz6BOGZIrH8PshggYRKPC5AxguGt78VYf6dgbt3rMQlCW/2+V8QgrJsYqfDljjABeQjNRtXsI/yHUNfd6cOTbfALENUK1wYcQp5BKKu/oVHhsN19d3g1yh0tJPyT4OLAocwfEtgR6WCeheVTQf1bocb0VR0a8Y0cvGCEd3VXbKDhEspCUJBw48BDxuNcOS010fd9L8mJDnOvdcZBordo9aYD0Y+7YqhmvifiGDfOAO0wdq4B97E7QNn2aIbJ7d2bOQ==--z1N/dGCYvtprXCZe--5jhVeD5X/C989OcQF6KE0w==
1+
ysavxGyoRl0L8wnsj0i0BAcpPHeAC/yVBptzZNJgBOw0yM3ZGu3Pje31I9AMXTCLE6tpXxCEWSViOkOSHso/DIjtC03h6TYAW3De3kaI0lpYeTKui2FwBtssf7Jw4RJE8ZXQ+PHqZSYJAGP2Ltwt2/pp1kItdoK+hs7MfqKCimBrDnl3wk+9w6CZbGAyv6Nkr7TIEUJfs0VPB0T2DNbEK+RcPyrI+es1ZtLUS04t0F7i6Ap9WFuXZoqrwixCZG6z4z6Awy7/bnfXb5e6wF9IP+ee6mOiu0nFqL2NMMnkPTXK4lmwSM+h3e3ZKPCmT+K1TgDgy+7T6iTDHII5yWHRb3w/iVvruq7uKdWPfmKt7DQZwnJuAQyei+mUyDpCFuBOsLPzhPwlpD+0fMYqE0cn+sQiwwrJZKcswxtUaEUGqUjGMIHVMXuF7Vr3ruPE0o8L07k+SNmUcQuyKolIWvJcKddslx4af0MGgYC6a9+y8/2c5bGfr2Z3bjVwA8sDz0Zisu6O1G90H6nLM5TqfIOqcoLs5NqpLwI6upVT3UlEw7HlndtG--5tPiwvfC/JIr2Z9W--8Q9LL/bHo4YI6treCExYnA==

config/credentials/test.yml.enc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tbwI4tWTBiMxELoDltZkcPLYylRfhNrPQlg6NitlK7JnTBxoeNGg6Z9SiPtDCOdf22So3Zo2lWOvpaWDAFrOYL48662V0bkNwEstsz1t6jz3cgEcIjbvlRFA9X+qUHBRV6NVmGvDxxAfatTb5liWx5yDCqID2aogAlwjz9DoUaqYARA=--DUspbnN6WVvwO7t4--O06oZfFzgMyYVl4ueKEwTw==
1+
aEjgjFpajjUo6W8PTxuvP1GJQppbKXnOanxGrDwqfRW1DcGt2X5jFNwzS1tcQE95Ih7CxJILAbeDOofkN5/zvSBAYxLuk+x7nx9CaAc45IJl1w==--/wUi1cNE3WFN+5Cz--gOrvad1gm8HF8pyw1Kfkdg==

config/initializers/omniauth.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Rails.application.config.middleware.use OmniAuth::Builder do
2-
github_oauth_credentials = Rails.application.credentials.github_oauth
2+
next if ENV["RAILS_BUILD"]
3+
4+
credentials = Rails.application.credentials
5+
github_oauth_credentials = credentials.github_oauth
36

47
provider :github,
58
github_oauth_credentials.client_id,

config/routes.rb

+1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
get "auth/failure", to: "sessions#failure"
2020
delete "sign_out", to: "sessions#destroy"
2121

22+
2223
root to: "static#home"
2324
end
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
require "test_helper"
22

33
class DashboardControllerTest < ActionDispatch::IntegrationTest
4-
test "should get index" do
5-
get dashboard_index_url
6-
assert_response :success
7-
end
84
end

0 commit comments

Comments
 (0)