-
Notifications
You must be signed in to change notification settings - Fork 0
/
5.1 to 5.2.diff
717 lines (677 loc) · 26.5 KB
/
5.1 to 5.2.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/.gitignore rails 5.2/.gitignore
--- rails 5.1/.gitignore 2023-08-21 12:38:13
+++ rails 5.2/.gitignore 2023-08-21 12:38:15
@@ -17,7 +17,15 @@
!/log/.keep
!/tmp/.keep
+# Ignore uploaded files in development
+/storage/*
+!/storage/.keep
+
/node_modules
/yarn-error.log
+/public/assets
.byebug_history
+
+# Ignore master key for decrypting credentials and more.
+/config/master.key
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/.ruby-version rails 5.2/.ruby-version
--- rails 5.1/.ruby-version 1969-12-31 16:00:00
+++ rails 5.2/.ruby-version 2023-08-21 12:38:15
@@ -0,0 +1 @@
+2.7.8
\ No newline at end of file
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/Gemfile rails 5.2/Gemfile
--- rails 5.1/Gemfile 2023-08-21 12:38:13
+++ rails 5.2/Gemfile 2023-08-21 12:38:15
@@ -1,23 +1,20 @@
source 'https://rubygems.org'
+git_source(:github) { |repo| "https://github.com/#{repo}.git" }
-git_source(:github) do |repo_name|
- repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
- "https://github.com/#{repo_name}.git"
-end
+ruby '2.7.8'
-
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '~> 5.1.7'
+gem 'rails', '~> 5.2.8', '>= 5.2.8.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
-gem 'puma', '~> 3.7'
+gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
-# gem 'therubyracer', platforms: :ruby
+# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
@@ -30,24 +27,35 @@
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
+# Use ActiveStorage variant
+# gem 'mini_magick', '~> 4.8'
+
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
+# Reduces boot times through caching; required in config/boot.rb
+gem 'bootsnap', '>= 1.1.0', require: false
+
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
- # Adds support for Capybara system testing and selenium driver
- gem 'capybara', '>= 2.15'
- gem 'selenium-webdriver'
end
group :development do
- # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
+ # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
+end
+
+group :test do
+ # Adds support for Capybara system testing and selenium driver
+ gem 'capybara', '>= 2.15'
+ gem 'selenium-webdriver'
+ # Easy installation and use of chromedriver to run system tests with Chrome
+ gem 'chromedriver-helper'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/Gemfile.lock rails 5.2/Gemfile.lock
--- rails 5.1/Gemfile.lock 2023-08-21 12:38:15
+++ rails 5.2/Gemfile.lock 2023-08-21 12:38:17
@@ -1,47 +1,55 @@
GEM
remote: https://rubygems.org/
specs:
- actioncable (5.1.7)
- actionpack (= 5.1.7)
+ actioncable (5.2.8.1)
+ actionpack (= 5.2.8.1)
nio4r (~> 2.0)
- websocket-driver (~> 0.6.1)
- actionmailer (5.1.7)
- actionpack (= 5.1.7)
- actionview (= 5.1.7)
- activejob (= 5.1.7)
+ websocket-driver (>= 0.6.1)
+ actionmailer (5.2.8.1)
+ actionpack (= 5.2.8.1)
+ actionview (= 5.2.8.1)
+ activejob (= 5.2.8.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (5.1.7)
- actionview (= 5.1.7)
- activesupport (= 5.1.7)
- rack (~> 2.0)
+ actionpack (5.2.8.1)
+ actionview (= 5.2.8.1)
+ activesupport (= 5.2.8.1)
+ rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (5.1.7)
- activesupport (= 5.1.7)
+ actionview (5.2.8.1)
+ activesupport (= 5.2.8.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
- activejob (5.1.7)
- activesupport (= 5.1.7)
+ activejob (5.2.8.1)
+ activesupport (= 5.2.8.1)
globalid (>= 0.3.6)
- activemodel (5.1.7)
- activesupport (= 5.1.7)
- activerecord (5.1.7)
- activemodel (= 5.1.7)
- activesupport (= 5.1.7)
- arel (~> 8.0)
- activesupport (5.1.7)
+ activemodel (5.2.8.1)
+ activesupport (= 5.2.8.1)
+ activerecord (5.2.8.1)
+ activemodel (= 5.2.8.1)
+ activesupport (= 5.2.8.1)
+ arel (>= 9.0)
+ activestorage (5.2.8.1)
+ actionpack (= 5.2.8.1)
+ activerecord (= 5.2.8.1)
+ marcel (~> 1.0.0)
+ activesupport (5.2.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
- arel (8.0.0)
+ archive-zip (0.12.0)
+ io-like (~> 0.3.0)
+ arel (9.0.0)
bindex (0.8.1)
+ bootsnap (1.16.0)
+ msgpack (~> 1.2)
builder (3.2.4)
byebug (11.1.3)
capybara (3.39.2)
@@ -53,6 +61,9 @@
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
+ chromedriver-helper (2.1.1)
+ archive-zip (~> 0.10)
+ nokogiri (~> 1.8)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
@@ -70,6 +81,7 @@
activesupport (>= 5.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
+ io-like (0.3.1)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
@@ -85,10 +97,12 @@
net-imap
net-pop
net-smtp
+ marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.5)
minitest (5.19.0)
+ msgpack (1.7.2)
net-imap (0.3.7)
date
net-protocol
@@ -107,17 +121,18 @@
rack (2.2.8)
rack-test (2.1.0)
rack (>= 1.3)
- rails (5.1.7)
- actioncable (= 5.1.7)
- actionmailer (= 5.1.7)
- actionpack (= 5.1.7)
- actionview (= 5.1.7)
- activejob (= 5.1.7)
- activemodel (= 5.1.7)
- activerecord (= 5.1.7)
- activesupport (= 5.1.7)
+ rails (5.2.8.1)
+ actioncable (= 5.2.8.1)
+ actionmailer (= 5.2.8.1)
+ actionpack (= 5.2.8.1)
+ actionview (= 5.2.8.1)
+ activejob (= 5.2.8.1)
+ activemodel (= 5.2.8.1)
+ activerecord (= 5.2.8.1)
+ activestorage (= 5.2.8.1)
+ activesupport (= 5.2.8.1)
bundler (>= 1.3.0)
- railties (= 5.1.7)
+ railties (= 5.2.8.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
@@ -126,12 +141,12 @@
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (5.1.7)
- actionpack (= 5.1.7)
- activesupport (= 5.1.7)
+ railties (5.2.8.1)
+ actionpack (= 5.2.8.1)
+ activesupport (= 5.2.8.1)
method_source
rake (>= 0.8.7)
- thor (>= 0.18.1, < 2.0)
+ thor (>= 0.19.0, < 2.0)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
@@ -145,8 +160,8 @@
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
- sass-rails (5.0.7)
- railties (>= 4.0.0, < 6)
+ sass-rails (5.1.0)
+ railties (>= 5.2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
@@ -162,9 +177,9 @@
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
- sprockets-rails (3.2.2)
- actionpack (>= 4.0)
- activesupport (>= 4.0)
+ sprockets-rails (3.4.2)
+ actionpack (>= 5.2)
+ activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.6.3-arm64-darwin)
thor (1.2.2)
@@ -184,7 +199,7 @@
bindex (>= 0.4.0)
railties (>= 5.0)
websocket (1.2.9)
- websocket-driver (0.6.5)
+ websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
@@ -194,13 +209,15 @@
arm64-darwin-22
DEPENDENCIES
+ bootsnap (>= 1.1.0)
byebug
capybara (>= 2.15)
+ chromedriver-helper
coffee-rails (~> 4.2)
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
- puma (~> 3.7)
- rails (~> 5.1.7)
+ puma (~> 3.11)
+ rails (~> 5.2.8, >= 5.2.8.1)
sass-rails (~> 5.0)
selenium-webdriver
spring
@@ -210,6 +227,9 @@
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
+
+RUBY VERSION
+ ruby 2.7.8p225
BUNDLED WITH
2.4.12
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/app/assets/javascripts/application.js rails 5.2/app/assets/javascripts/application.js
--- rails 5.1/app/assets/javascripts/application.js 2023-08-21 12:38:13
+++ rails 5.2/app/assets/javascripts/application.js 2023-08-21 12:38:15
@@ -11,5 +11,6 @@
// about supported directives.
//
//= require rails-ujs
+//= require activestorage
//= require turbolinks
//= require_tree .
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/app/controllers/application_controller.rb rails 5.2/app/controllers/application_controller.rb
--- rails 5.1/app/controllers/application_controller.rb 2023-08-21 12:38:13
+++ rails 5.2/app/controllers/application_controller.rb 2023-08-21 12:38:15
@@ -1,3 +1,2 @@
class ApplicationController < ActionController::Base
- protect_from_forgery with: :exception
end
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/app/views/layouts/application.html.erb rails 5.2/app/views/layouts/application.html.erb
--- rails 5.1/app/views/layouts/application.html.erb 2023-08-21 12:38:13
+++ rails 5.2/app/views/layouts/application.html.erb 2023-08-21 12:38:15
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html>
<head>
- <title>Rails51</title>
+ <title>Rails52</title>
<%= csrf_meta_tags %>
+ <%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/bin/bundle rails 5.2/bin/bundle
--- rails 5.1/bin/bundle 2023-08-21 12:38:13
+++ rails 5.2/bin/bundle 2023-08-21 12:38:15
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
load Gem.bin_path('bundler', 'bundle')
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/bin/setup rails 5.2/bin/setup
--- rails 5.1/bin/setup 2023-08-21 12:38:13
+++ rails 5.2/bin/setup 2023-08-21 12:38:15
@@ -1,10 +1,9 @@
#!/usr/bin/env ruby
-require 'pathname'
require 'fileutils'
include FileUtils
# path to your application root.
-APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+APP_ROOT = File.expand_path('..', __dir__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
@@ -20,7 +19,6 @@
# Install JavaScript dependencies if using Yarn
# system('bin/yarn')
-
# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/bin/update rails 5.2/bin/update
--- rails 5.1/bin/update 2023-08-21 12:38:13
+++ rails 5.2/bin/update 2023-08-21 12:38:15
@@ -1,10 +1,9 @@
#!/usr/bin/env ruby
-require 'pathname'
require 'fileutils'
include FileUtils
# path to your application root.
-APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+APP_ROOT = File.expand_path('..', __dir__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
@@ -17,6 +16,9 @@
puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
+
+ # Install JavaScript dependencies if using Yarn
+ # system('bin/yarn')
puts "\n== Updating database =="
system! 'bin/rails db:migrate'
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/bin/yarn rails 5.2/bin/yarn
--- rails 5.1/bin/yarn 2023-08-21 12:38:13
+++ rails 5.2/bin/yarn 2023-08-21 12:38:15
@@ -1,8 +1,8 @@
#!/usr/bin/env ruby
-VENDOR_PATH = File.expand_path('..', __dir__)
-Dir.chdir(VENDOR_PATH) do
+APP_ROOT = File.expand_path('..', __dir__)
+Dir.chdir(APP_ROOT) do
begin
- exec "yarnpkg #{ARGV.join(" ")}"
+ exec "yarnpkg", *ARGV
rescue Errno::ENOENT
$stderr.puts "Yarn executable was not detected in the system."
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/application.rb rails 5.2/config/application.rb
--- rails 5.1/config/application.rb 2023-08-21 12:38:13
+++ rails 5.2/config/application.rb 2023-08-21 12:38:15
@@ -6,13 +6,14 @@
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
-module Rails51
+module Rails52
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
- config.load_defaults 5.1
+ config.load_defaults 5.2
# Settings in config/environments/* take precedence over those specified here.
- # Application configuration should go into files in config/initializers
- # -- all .rb files in that directory are automatically loaded.
+ # Application configuration can go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded after loading
+ # the framework and any gems in your application.
end
end
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/boot.rb rails 5.2/config/boot.rb
--- rails 5.1/config/boot.rb 2023-08-21 12:38:13
+++ rails 5.2/config/boot.rb 2023-08-21 12:38:16
@@ -1,3 +1,4 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
+require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/cable.yml rails 5.2/config/cable.yml
--- rails 5.1/config/cable.yml 2023-08-21 12:38:13
+++ rails 5.2/config/cable.yml 2023-08-21 12:38:15
@@ -6,5 +6,5 @@
production:
adapter: redis
- url: redis://localhost:6379/1
- channel_prefix: rails_5_1_production
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
+ channel_prefix: rails_5_2_production
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/credentials.yml.enc rails 5.2/config/credentials.yml.enc
--- rails 5.1/config/credentials.yml.enc 1969-12-31 16:00:00
+++ rails 5.2/config/credentials.yml.enc 2023-08-21 12:38:16
@@ -0,0 +1 @@
+O4YgwOXP87GsOt/KWTv3+GLCRBQ/EqZe4RToBos7Rp3INsOyBOF+UPmGoc7q5x27VDRJgsPA/mNsaRhFhAwG6ePpLWrplG55xwJ0ITyDf6eReJd4eZ0C5kvYGLLVbWEszpN9TpOZEwweXfuyroTH52ScCniwfk6s8ymGK2RCtJHFcw28RGiKE+YkzORp9HfBUkbQO4yl71PgMug0USudvW87Ew0Uv899gZcVvN8nsb44HQk4eILLJUI9yxK4vBMY3r0NWcA+GXCp6zvAxQ2TKMlrAXeoJTUT/+TNwaVUvRcDZmRlTM/ZbS2pQG38Qbkfrq5aHB609mNjeZC2wtFfoZJtFVauKhi0j6XepqEkoAUZzDD4sWdP4eyf/9Irfc3NtlSVetrXpCpnxAiTSguTH8q3wN6MjaQh6EXY--57R0MHt7pViswG3c--m62e/ngTmNor+IFYlYVaDA==
\ No newline at end of file
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/environments/development.rb rails 5.2/config/environments/development.rb
--- rails 5.1/config/environments/development.rb 2023-08-21 12:38:13
+++ rails 5.2/config/environments/development.rb 2023-08-21 12:38:15
@@ -13,12 +13,13 @@
config.consider_all_requests_local = true
# Enable/disable caching. By default caching is disabled.
- if Rails.root.join('tmp/caching-dev.txt').exist?
+ # Run rails dev:cache to toggle caching.
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.cache_store = :memory_store
config.public_file_server.headers = {
- 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false
@@ -26,6 +27,9 @@
config.cache_store = :null_store
end
+ # Store uploaded files on the local file system (see config/storage.yml for options)
+ config.active_storage.service = :local
+
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
@@ -36,6 +40,9 @@
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
+
+ # Highlight code that triggered database queries in logs.
+ config.active_record.verbose_query_logs = true
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/environments/production.rb rails 5.2/config/environments/production.rb
--- rails 5.1/config/environments/production.rb 2023-08-21 12:38:13
+++ rails 5.2/config/environments/production.rb 2023-08-21 12:38:15
@@ -14,10 +14,9 @@
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
- # Attempt to read encrypted secrets from `config/secrets.yml.enc`.
- # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
- # `config/secrets.yml.key`.
- config.read_encrypted_secrets = true
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
+ # config.require_master_key = true
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
@@ -39,6 +38,9 @@
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
+ # Store uploaded files on the local file system (see config/storage.yml for options)
+ config.active_storage.service = :local
+
# Mount Action Cable outside main process or domain
# config.action_cable.mount_path = nil
# config.action_cable.url = 'wss://example.com/cable'
@@ -59,7 +61,8 @@
# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
- # config.active_job.queue_name_prefix = "rails_5_1_#{Rails.env}"
+ # config.active_job.queue_name_prefix = "rails_5_2_#{Rails.env}"
+
config.action_mailer.perform_caching = false
# Ignore bad email addresses and do not raise email delivery errors.
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/environments/test.rb rails 5.2/config/environments/test.rb
--- rails 5.1/config/environments/test.rb 2023-08-21 12:38:13
+++ rails 5.2/config/environments/test.rb 2023-08-21 12:38:15
@@ -15,7 +15,7 @@
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
- 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
}
# Show full error reports and disable caching.
@@ -27,6 +27,10 @@
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
+
+ # Store uploaded files on the local file system in a temporary directory
+ config.active_storage.service = :test
+
config.action_mailer.perform_caching = false
# Tell Action Mailer not to deliver emails to the real world.
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/initializers/content_security_policy.rb rails 5.2/config/initializers/content_security_policy.rb
--- rails 5.1/config/initializers/content_security_policy.rb 1969-12-31 16:00:00
+++ rails 5.2/config/initializers/content_security_policy.rb 2023-08-21 12:38:15
@@ -0,0 +1,25 @@
+# Be sure to restart your server when you modify this file.
+
+# Define an application-wide content security policy
+# For further information see the following documentation
+# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
+
+# Rails.application.config.content_security_policy do |policy|
+# policy.default_src :self, :https
+# policy.font_src :self, :https, :data
+# policy.img_src :self, :https, :data
+# policy.object_src :none
+# policy.script_src :self, :https
+# policy.style_src :self, :https
+
+# # Specify URI for violation reports
+# # policy.report_uri "/csp-violation-report-endpoint"
+# end
+
+# If you are using UJS then enable automatic nonce generation
+# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
+
+# Report CSP violations to a specified URI
+# For further information see the following documentation:
+# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
+# Rails.application.config.content_security_policy_report_only = true
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/master.key rails 5.2/config/master.key
--- rails 5.1/config/master.key 1969-12-31 16:00:00
+++ rails 5.2/config/master.key 2023-08-21 12:38:15
@@ -0,0 +1 @@
+a2e86ca348dce2f87614938c5d769735
\ No newline at end of file
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/puma.rb rails 5.2/config/puma.rb
--- rails 5.1/config/puma.rb 2023-08-21 12:38:13
+++ rails 5.2/config/puma.rb 2023-08-21 12:38:15
@@ -15,6 +15,9 @@
#
environment ENV.fetch("RAILS_ENV") { "development" }
+# Specifies the `pidfile` that Puma will use.
+pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
+
# Specifies the number of `workers` to boot in clustered mode.
# Workers are forked webserver processes. If using threads and workers together
# the concurrency of the application would be max `threads` * `workers`.
@@ -26,31 +29,9 @@
# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write
-# process behavior so workers use less memory. If you use this option
-# you need to make sure to reconnect any threads in the `on_worker_boot`
-# block.
+# process behavior so workers use less memory.
#
# preload_app!
-
-# If you are preloading your application and using Active Record, it's
-# recommended that you close any connections to the database before workers
-# are forked to prevent connection leakage.
-#
-# before_fork do
-# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
-# end
-
-# The code in the `on_worker_boot` will be called if you are using
-# clustered mode by specifying a number of `workers`. After each worker
-# process is booted, this block will be run. If you are using the `preload_app!`
-# option, you will want to use this block to reconnect to any threads
-# or connections that may have been created at application boot, as Ruby
-# cannot share connections between processes.
-#
-# on_worker_boot do
-# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
-# end
-#
# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart
Only in rails 5.1/config: secrets.yml
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/spring.rb rails 5.2/config/spring.rb
--- rails 5.1/config/spring.rb 2023-08-21 12:38:13
+++ rails 5.2/config/spring.rb 2023-08-21 12:38:15
@@ -1,6 +1,6 @@
-%w(
+%w[
.ruby-version
.rbenv-vars
tmp/restart.txt
tmp/caching-dev.txt
-).each { |path| Spring.watch(path) }
+].each { |path| Spring.watch(path) }
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/config/storage.yml rails 5.2/config/storage.yml
--- rails 5.1/config/storage.yml 1969-12-31 16:00:00
+++ rails 5.2/config/storage.yml 2023-08-21 12:38:15
@@ -0,0 +1,34 @@
+test:
+ service: Disk
+ root: <%= Rails.root.join("tmp/storage") %>
+
+local:
+ service: Disk
+ root: <%= Rails.root.join("storage") %>
+
+# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
+# amazon:
+# service: S3
+# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
+# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
+# region: us-east-1
+# bucket: your_own_bucket
+
+# Remember not to checkin your GCS keyfile to a repository
+# google:
+# service: GCS
+# project: your_project
+# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
+# bucket: your_own_bucket
+
+# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
+# microsoft:
+# service: AzureStorage
+# storage_account_name: your_account_name
+# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
+# container: your_container_name
+
+# mirror:
+# service: Mirror
+# primary: local
+# mirrors: [ amazon, google, microsoft ]
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/package.json rails 5.2/package.json
--- rails 5.1/package.json 2023-08-21 12:38:13
+++ rails 5.2/package.json 2023-08-21 12:38:15
@@ -1,5 +1,5 @@
{
- "name": "rails_5_1",
+ "name": "rails_5_2",
"private": true,
"dependencies": {}
}
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.1/test/test_helper.rb rails 5.2/test/test_helper.rb
--- rails 5.1/test/test_helper.rb 2023-08-21 12:38:13
+++ rails 5.2/test/test_helper.rb 2023-08-21 12:38:16
@@ -1,5 +1,5 @@
ENV['RAILS_ENV'] ||= 'test'
-require File.expand_path('../../config/environment', __FILE__)
+require_relative '../config/environment'
require 'rails/test_help'
class ActiveSupport::TestCase