Skip to content

Commit 9522cdd

Browse files
ngallegosclaudeCopilot
authored
Upgrade to Rails 8.1.2 with latest gem versions (#18)
* Upgrade to Rails 8.1.2 with latest gem versions - Rails 7.2 → 8.1.2 (latest) - puma 6.x → 7.2.0 - will_paginate 3.3 → 4.0.1 - rspec-rails 6.1 → 8.0.3 - sqlite3 → 2.9.0 - annotate → annotaterb 4.22.0 (Rails 8 compatible successor) - Update config.load_defaults to 8.1 - Remove deprecated active_support.deprecation config (removed in Rails 8) - Add x86_64-linux platform to Gemfile.lock for CI - CI: use rake db:migrate and set SECRET_KEY_BASE for all steps All 119 tests passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Move test SECRET_KEY_BASE to config and restore deprecation warnings (#19) * Initial plan * Apply PR review feedback: move SECRET_KEY_BASE to test.rb and restore deprecation warnings Co-authored-by: ngallegos <1068686+ngallegos@users.noreply.github.com> * Add security warning comment for test secret key Co-authored-by: ngallegos <1068686+ngallegos@users.noreply.github.com> * Use realistic-length secret key for better production simulation Co-authored-by: ngallegos <1068686+ngallegos@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ngallegos <1068686+ngallegos@users.noreply.github.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: ngallegos <1068686+ngallegos@users.noreply.github.com>
1 parent 0aa398a commit 9522cdd

File tree

7 files changed

+109
-108
lines changed

7 files changed

+109
-108
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ jobs:
2222
- name: Set up database
2323
env:
2424
RAILS_ENV: test
25-
run: bundle exec rails db:migrate
25+
run: bundle exec rake db:migrate
2626

2727
- name: Run tests
2828
env:
2929
RAILS_ENV: test
30-
SECRET_KEY_BASE: test_secret_key_base_for_ci_only
3130
run: bundle exec rspec

Gemfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
source 'https://rubygems.org'
22

3-
gem 'rails', '~> 7.2'
4-
gem 'sqlite3', '~> 2.0'
5-
gem 'puma', '~> 6.0'
3+
gem 'rails', '~> 8.1'
4+
gem 'sqlite3', '~> 2.9'
5+
gem 'puma', '~> 7.0'
66
gem 'bcrypt', '~> 3.1'
7-
gem 'gravatar_image_tag', '~> 1.2'
8-
gem 'will_paginate', '~> 3.3'
9-
gem 'google_visualr', '~> 2.3'
7+
gem 'will_paginate', '~> 4.0'
8+
gem 'google_visualr', '~> 2.5'
109

1110
group :development do
12-
gem 'annotate', '~> 3.2'
11+
gem 'annotaterb', '~> 4.0'
1312
end
1413

1514
group :development, :test do
16-
gem 'rspec-rails', '~> 6.1'
17-
gem 'factory_bot_rails', '~> 6.4'
18-
gem 'faker', '~> 3.2'
15+
gem 'rspec-rails', '~> 8.0'
16+
gem 'factory_bot_rails', '~> 6.5'
17+
gem 'faker', '~> 3.6'
1918
gem 'rails-controller-testing'
2019
end
2120

Gemfile.lock

Lines changed: 79 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,87 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.2.3)
5-
actionpack (= 7.2.3)
6-
activesupport (= 7.2.3)
4+
action_text-trix (2.1.16)
5+
railties
6+
actioncable (8.1.2)
7+
actionpack (= 8.1.2)
8+
activesupport (= 8.1.2)
79
nio4r (~> 2.0)
810
websocket-driver (>= 0.6.1)
911
zeitwerk (~> 2.6)
10-
actionmailbox (7.2.3)
11-
actionpack (= 7.2.3)
12-
activejob (= 7.2.3)
13-
activerecord (= 7.2.3)
14-
activestorage (= 7.2.3)
15-
activesupport (= 7.2.3)
12+
actionmailbox (8.1.2)
13+
actionpack (= 8.1.2)
14+
activejob (= 8.1.2)
15+
activerecord (= 8.1.2)
16+
activestorage (= 8.1.2)
17+
activesupport (= 8.1.2)
1618
mail (>= 2.8.0)
17-
actionmailer (7.2.3)
18-
actionpack (= 7.2.3)
19-
actionview (= 7.2.3)
20-
activejob (= 7.2.3)
21-
activesupport (= 7.2.3)
19+
actionmailer (8.1.2)
20+
actionpack (= 8.1.2)
21+
actionview (= 8.1.2)
22+
activejob (= 8.1.2)
23+
activesupport (= 8.1.2)
2224
mail (>= 2.8.0)
2325
rails-dom-testing (~> 2.2)
24-
actionpack (7.2.3)
25-
actionview (= 7.2.3)
26-
activesupport (= 7.2.3)
27-
cgi
26+
actionpack (8.1.2)
27+
actionview (= 8.1.2)
28+
activesupport (= 8.1.2)
2829
nokogiri (>= 1.8.5)
29-
racc
30-
rack (>= 2.2.4, < 3.3)
30+
rack (>= 2.2.4)
3131
rack-session (>= 1.0.1)
3232
rack-test (>= 0.6.3)
3333
rails-dom-testing (~> 2.2)
3434
rails-html-sanitizer (~> 1.6)
3535
useragent (~> 0.16)
36-
actiontext (7.2.3)
37-
actionpack (= 7.2.3)
38-
activerecord (= 7.2.3)
39-
activestorage (= 7.2.3)
40-
activesupport (= 7.2.3)
36+
actiontext (8.1.2)
37+
action_text-trix (~> 2.1.15)
38+
actionpack (= 8.1.2)
39+
activerecord (= 8.1.2)
40+
activestorage (= 8.1.2)
41+
activesupport (= 8.1.2)
4142
globalid (>= 0.6.0)
4243
nokogiri (>= 1.8.5)
43-
actionview (7.2.3)
44-
activesupport (= 7.2.3)
44+
actionview (8.1.2)
45+
activesupport (= 8.1.2)
4546
builder (~> 3.1)
46-
cgi
4747
erubi (~> 1.11)
4848
rails-dom-testing (~> 2.2)
4949
rails-html-sanitizer (~> 1.6)
50-
activejob (7.2.3)
51-
activesupport (= 7.2.3)
50+
activejob (8.1.2)
51+
activesupport (= 8.1.2)
5252
globalid (>= 0.3.6)
53-
activemodel (7.2.3)
54-
activesupport (= 7.2.3)
55-
activerecord (7.2.3)
56-
activemodel (= 7.2.3)
57-
activesupport (= 7.2.3)
53+
activemodel (8.1.2)
54+
activesupport (= 8.1.2)
55+
activerecord (8.1.2)
56+
activemodel (= 8.1.2)
57+
activesupport (= 8.1.2)
5858
timeout (>= 0.4.0)
59-
activestorage (7.2.3)
60-
actionpack (= 7.2.3)
61-
activejob (= 7.2.3)
62-
activerecord (= 7.2.3)
63-
activesupport (= 7.2.3)
59+
activestorage (8.1.2)
60+
actionpack (= 8.1.2)
61+
activejob (= 8.1.2)
62+
activerecord (= 8.1.2)
63+
activesupport (= 8.1.2)
6464
marcel (~> 1.0)
65-
activesupport (7.2.3)
65+
activesupport (8.1.2)
6666
base64
67-
benchmark (>= 0.3)
6867
bigdecimal
6968
concurrent-ruby (~> 1.0, >= 1.3.1)
7069
connection_pool (>= 2.2.5)
7170
drb
7271
i18n (>= 1.6, < 2)
72+
json
7373
logger (>= 1.4.2)
7474
minitest (>= 5.1)
7575
securerandom (>= 0.3)
7676
tzinfo (~> 2.0, >= 2.0.5)
77+
uri (>= 0.13.1)
7778
addressable (2.8.8)
7879
public_suffix (>= 2.0.2, < 8.0)
79-
annotate (3.2.0)
80-
activerecord (>= 3.2, < 8.0)
81-
rake (>= 10.4, < 14.0)
80+
annotaterb (4.22.0)
81+
activerecord (>= 6.0.0)
82+
activesupport (>= 6.0.0)
8283
base64 (0.3.0)
8384
bcrypt (3.1.21)
84-
benchmark (0.5.0)
8585
bigdecimal (4.0.1)
8686
builder (3.3.0)
8787
capybara (3.40.0)
@@ -93,7 +93,6 @@ GEM
9393
rack-test (>= 0.6.3)
9494
regexp_parser (>= 1.5, < 3.0)
9595
xpath (~> 3.2)
96-
cgi (0.5.1)
9796
concurrent-ruby (1.3.6)
9897
connection_pool (3.0.2)
9998
crass (1.0.6)
@@ -112,7 +111,6 @@ GEM
112111
globalid (1.3.0)
113112
activesupport (>= 6.1)
114113
google_visualr (2.5.1)
115-
gravatar_image_tag (1.2.0)
116114
i18n (1.14.8)
117115
concurrent-ruby (~> 1.0)
118116
io-console (0.8.2)
@@ -121,6 +119,7 @@ GEM
121119
prism (>= 1.3.0)
122120
rdoc (>= 4.0.0)
123121
reline (>= 0.4.2)
122+
json (2.18.1)
124123
logger (1.7.0)
125124
loofah (2.25.0)
126125
crass (~> 1.0.2)
@@ -162,7 +161,7 @@ GEM
162161
date
163162
stringio
164163
public_suffix (7.0.2)
165-
puma (6.6.1)
164+
puma (7.2.0)
166165
nio4r (~> 2.0)
167166
racc (1.8.1)
168167
rack (3.2.5)
@@ -173,20 +172,20 @@ GEM
173172
rack (>= 1.3)
174173
rackup (2.3.1)
175174
rack (>= 3)
176-
rails (7.2.3)
177-
actioncable (= 7.2.3)
178-
actionmailbox (= 7.2.3)
179-
actionmailer (= 7.2.3)
180-
actionpack (= 7.2.3)
181-
actiontext (= 7.2.3)
182-
actionview (= 7.2.3)
183-
activejob (= 7.2.3)
184-
activemodel (= 7.2.3)
185-
activerecord (= 7.2.3)
186-
activestorage (= 7.2.3)
187-
activesupport (= 7.2.3)
175+
rails (8.1.2)
176+
actioncable (= 8.1.2)
177+
actionmailbox (= 8.1.2)
178+
actionmailer (= 8.1.2)
179+
actionpack (= 8.1.2)
180+
actiontext (= 8.1.2)
181+
actionview (= 8.1.2)
182+
activejob (= 8.1.2)
183+
activemodel (= 8.1.2)
184+
activerecord (= 8.1.2)
185+
activestorage (= 8.1.2)
186+
activesupport (= 8.1.2)
188187
bundler (>= 1.15.0)
189-
railties (= 7.2.3)
188+
railties (= 8.1.2)
190189
rails-controller-testing (1.0.5)
191190
actionpack (>= 5.0.1.rc1)
192191
actionview (>= 5.0.1.rc1)
@@ -198,10 +197,9 @@ GEM
198197
rails-html-sanitizer (1.6.2)
199198
loofah (~> 2.21)
200199
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)
201-
railties (7.2.3)
202-
actionpack (= 7.2.3)
203-
activesupport (= 7.2.3)
204-
cgi
200+
railties (8.1.2)
201+
actionpack (= 8.1.2)
202+
activesupport (= 8.1.2)
205203
irb (~> 1.13)
206204
rackup (>= 1.0.0)
207205
rake (>= 12.2)
@@ -224,10 +222,10 @@ GEM
224222
rspec-mocks (3.13.7)
225223
diff-lcs (>= 1.2.0, < 2.0)
226224
rspec-support (~> 3.13.0)
227-
rspec-rails (6.1.5)
228-
actionpack (>= 6.1)
229-
activesupport (>= 6.1)
230-
railties (>= 6.1)
225+
rspec-rails (8.0.3)
226+
actionpack (>= 7.2)
227+
activesupport (>= 7.2)
228+
railties (>= 7.2)
231229
rspec-core (~> 3.13)
232230
rspec-expectations (~> 3.13)
233231
rspec-mocks (~> 3.13)
@@ -244,12 +242,13 @@ GEM
244242
tsort (0.2.0)
245243
tzinfo (2.0.6)
246244
concurrent-ruby (~> 1.0)
245+
uri (1.1.1)
247246
useragent (0.16.11)
248247
websocket-driver (0.8.0)
249248
base64
250249
websocket-extensions (>= 0.1.0)
251250
websocket-extensions (0.1.5)
252-
will_paginate (3.3.1)
251+
will_paginate (4.0.1)
253252
xpath (3.2.0)
254253
nokogiri (~> 1.8)
255254
zeitwerk (2.7.4)
@@ -260,19 +259,18 @@ PLATFORMS
260259
x86_64-linux
261260

262261
DEPENDENCIES
263-
annotate (~> 3.2)
262+
annotaterb (~> 4.0)
264263
bcrypt (~> 3.1)
265264
capybara (~> 3.40)
266-
factory_bot_rails (~> 6.4)
267-
faker (~> 3.2)
268-
google_visualr (~> 2.3)
269-
gravatar_image_tag (~> 1.2)
270-
puma (~> 6.0)
271-
rails (~> 7.2)
265+
factory_bot_rails (~> 6.5)
266+
faker (~> 3.6)
267+
google_visualr (~> 2.5)
268+
puma (~> 7.0)
269+
rails (~> 8.1)
272270
rails-controller-testing
273-
rspec-rails (~> 6.1)
274-
sqlite3 (~> 2.0)
275-
will_paginate (~> 3.3)
271+
rspec-rails (~> 8.0)
272+
sqlite3 (~> 2.9)
273+
will_paginate (~> 4.0)
276274

277275
BUNDLED WITH
278276
4.0.3

config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
module Run500Miles
88
class Application < Rails::Application
9-
config.load_defaults 7.2
9+
config.load_defaults 8.1
1010

1111
# Filter sensitive parameters from logs
1212
config.filter_parameters += [:password]

config/environments/development.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
config.action_mailer.raise_delivery_errors = false
1313
config.action_mailer.perform_caching = false
1414

15-
config.active_support.deprecation = :log
15+
config.active_support.report_deprecations = true
1616
config.active_record.migration_error = :page_load
1717
config.active_record.verbose_query_logs = true
1818
end

config/environments/test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@
1313
config.active_support.disallowed_deprecation = :raise
1414
config.active_support.disallowed_deprecation_warnings = []
1515
config.active_record.maintain_test_schema = true
16+
17+
# Set deterministic secret key for test environment
18+
# WARNING: This is only for test environment - never use in production!
19+
# Using a realistic-length key to better simulate production behavior
20+
config.secret_key_base = '173b11beda45abe0420fe63478ddc88a7b81de671837caffc6e9f31adce2d64bf2aba4ed886f10c8e22909fd55d08077859d3deb6c796776ff91e0b905566480'
1621
end

db/schema.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,37 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.2].define(version: 2012_01_09_000251) do
13+
ActiveRecord::Schema[8.1].define(version: 2012_01_09_000251) do
1414
create_table "activities", force: :cascade do |t|
15-
t.string "comment"
16-
t.integer "user_id"
1715
t.date "activity_date"
16+
t.integer "activity_type"
17+
t.string "comment"
18+
t.datetime "created_at", precision: nil
1819
t.float "distance"
1920
t.integer "hours"
21+
t.string "location", default: ""
2022
t.integer "minutes"
21-
t.datetime "created_at", precision: nil
2223
t.datetime "updated_at", precision: nil
23-
t.string "location", default: ""
24-
t.integer "activity_type"
24+
t.integer "user_id"
2525
t.index ["user_id", "created_at"], name: "index_activities_on_user_id_and_created_at"
2626
end
2727

2828
create_table "configurations", force: :cascade do |t|
29-
t.string "key"
30-
t.text "value"
3129
t.datetime "created_at", precision: nil
30+
t.string "key"
3231
t.datetime "updated_at", precision: nil
32+
t.text "value"
3333
end
3434

3535
create_table "users", force: :cascade do |t|
36-
t.string "fname"
37-
t.string "lname"
38-
t.string "email"
36+
t.boolean "admin", default: false
3937
t.datetime "created_at", precision: nil
40-
t.datetime "updated_at", precision: nil
38+
t.string "email"
4139
t.string "encrypted_password"
40+
t.string "fname"
41+
t.string "lname"
4242
t.string "salt"
43-
t.boolean "admin", default: false
43+
t.datetime "updated_at", precision: nil
4444
t.string "user_type", default: "2"
4545
t.index ["email"], name: "index_users_on_email", unique: true
4646
t.index ["user_type"], name: "index_users_on_user_type"

0 commit comments

Comments
 (0)