-
Notifications
You must be signed in to change notification settings - Fork 0
/
5.0 to 5.1.diff
625 lines (597 loc) · 24.2 KB
/
5.0 to 5.1.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
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/.git/HEAD rails 5.1/.git/HEAD
--- rails 5.0/.git/HEAD 1969-12-31 16:00:00
+++ rails 5.1/.git/HEAD 2023-08-21 12:38:13
@@ -0,0 +1 @@
+ref: refs/heads/develop
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/.git/config rails 5.1/.git/config
--- rails 5.0/.git/config 1969-12-31 16:00:00
+++ rails 5.1/.git/config 2023-08-21 12:38:13
@@ -0,0 +1,5 @@
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/.gitignore rails 5.1/.gitignore
--- rails 5.0/.gitignore 2023-08-21 12:38:11
+++ rails 5.1/.gitignore 2023-08-21 12:38:13
@@ -17,5 +17,7 @@
!/log/.keep
!/tmp/.keep
-# Ignore Byebug command history file.
+/node_modules
+/yarn-error.log
+
.byebug_history
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/Gemfile rails 5.1/Gemfile
--- rails 5.0/Gemfile 2023-08-21 12:38:11
+++ rails 5.1/Gemfile 2023-08-21 12:38:13
@@ -7,28 +7,26 @@
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '~> 5.0.7', '>= 5.0.7.2'
+gem 'rails', '~> 5.1.7'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
-gem 'puma', '~> 3.0'
+gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
-# Use CoffeeScript for .coffee assets and views
-gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
-# Use jquery as the JavaScript library
-gem 'jquery-rails'
+# Use CoffeeScript for .coffee assets and views
+gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
-# gem 'redis', '~> 3.0'
+# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
@@ -37,13 +35,16 @@
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
- gem 'byebug', platform: :mri
+ 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.
gem 'web-console', '>= 3.3.0'
- gem 'listen', '~> 3.0.5'
+ 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'
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/Gemfile.lock rails 5.1/Gemfile.lock
--- rails 5.0/Gemfile.lock 2023-08-21 12:38:13
+++ rails 5.1/Gemfile.lock 2023-08-21 12:38:15
@@ -1,47 +1,58 @@
GEM
remote: https://rubygems.org/
specs:
- actioncable (5.0.7.2)
- actionpack (= 5.0.7.2)
- nio4r (>= 1.2, < 3.0)
+ actioncable (5.1.7)
+ actionpack (= 5.1.7)
+ nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
- actionmailer (5.0.7.2)
- actionpack (= 5.0.7.2)
- actionview (= 5.0.7.2)
- activejob (= 5.0.7.2)
+ actionmailer (5.1.7)
+ actionpack (= 5.1.7)
+ actionview (= 5.1.7)
+ activejob (= 5.1.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (5.0.7.2)
- actionview (= 5.0.7.2)
- activesupport (= 5.0.7.2)
+ actionpack (5.1.7)
+ actionview (= 5.1.7)
+ activesupport (= 5.1.7)
rack (~> 2.0)
- rack-test (~> 0.6.3)
+ rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (5.0.7.2)
- activesupport (= 5.0.7.2)
+ actionview (5.1.7)
+ activesupport (= 5.1.7)
builder (~> 3.1)
- erubis (~> 2.7.0)
+ erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
- activejob (5.0.7.2)
- activesupport (= 5.0.7.2)
+ activejob (5.1.7)
+ activesupport (= 5.1.7)
globalid (>= 0.3.6)
- activemodel (5.0.7.2)
- activesupport (= 5.0.7.2)
- activerecord (5.0.7.2)
- activemodel (= 5.0.7.2)
- activesupport (= 5.0.7.2)
- arel (~> 7.0)
- activesupport (5.0.7.2)
+ 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)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
- arel (7.1.4)
+ addressable (2.8.5)
+ public_suffix (>= 2.0.2, < 6.0)
+ arel (8.0.0)
bindex (0.8.1)
builder (3.2.4)
byebug (11.1.3)
+ capybara (3.39.2)
+ addressable
+ matrix
+ mini_mime (>= 0.1.3)
+ nokogiri (~> 1.8)
+ rack (>= 1.6.0)
+ rack-test (>= 0.6.3)
+ regexp_parser (>= 1.5, < 3.0)
+ xpath (~> 3.2)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
@@ -52,7 +63,7 @@
concurrent-ruby (1.2.2)
crass (1.0.6)
date (3.3.3)
- erubis (2.7.0)
+ erubi (1.12.0)
execjs (2.8.1)
ffi (1.15.5)
globalid (1.1.0)
@@ -62,13 +73,10 @@
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
- jquery-rails (4.6.0)
- rails-dom-testing (>= 1, < 3)
- railties (>= 4.2.0)
- thor (>= 0.14, < 2.0)
- listen (3.0.8)
+ listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
+ ruby_dep (~> 1.2)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
@@ -77,6 +85,7 @@
net-imap
net-pop
net-smtp
+ matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.5)
minitest (5.19.0)
@@ -92,22 +101,23 @@
nio4r (2.5.9)
nokogiri (1.15.4-arm64-darwin)
racc (~> 1.4)
+ public_suffix (5.0.3)
puma (3.12.6)
racc (1.7.1)
rack (2.2.8)
- rack-test (0.6.3)
- rack (>= 1.0)
- rails (5.0.7.2)
- actioncable (= 5.0.7.2)
- actionmailer (= 5.0.7.2)
- actionpack (= 5.0.7.2)
- actionview (= 5.0.7.2)
- activejob (= 5.0.7.2)
- activemodel (= 5.0.7.2)
- activerecord (= 5.0.7.2)
- activesupport (= 5.0.7.2)
+ 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)
bundler (>= 1.3.0)
- railties (= 5.0.7.2)
+ railties (= 5.1.7)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
@@ -116,9 +126,9 @@
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- railties (5.0.7.2)
- actionpack (= 5.0.7.2)
- activesupport (= 5.0.7.2)
+ railties (5.1.7)
+ actionpack (= 5.1.7)
+ activesupport (= 5.1.7)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
@@ -126,6 +136,10 @@
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
+ regexp_parser (2.8.1)
+ rexml (3.2.6)
+ ruby_dep (1.5.0)
+ rubyzip (2.3.2)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
@@ -137,6 +151,10 @@
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
+ selenium-webdriver (4.9.0)
+ rexml (~> 3.2, >= 3.2.5)
+ rubyzip (>= 1.2.2, < 3.0)
+ websocket (~> 1.0)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
@@ -165,22 +183,26 @@
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
+ websocket (1.2.9)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
+ xpath (3.2.0)
+ nokogiri (~> 1.8)
PLATFORMS
arm64-darwin-22
DEPENDENCIES
byebug
+ capybara (>= 2.15)
coffee-rails (~> 4.2)
jbuilder (~> 2.5)
- jquery-rails
- listen (~> 3.0.5)
- puma (~> 3.0)
- rails (~> 5.0.7, >= 5.0.7.2)
+ listen (>= 3.0.5, < 3.2)
+ puma (~> 3.7)
+ rails (~> 5.1.7)
sass-rails (~> 5.0)
+ selenium-webdriver
spring
spring-watcher-listen (~> 2.0.0)
sqlite3
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/app/assets/javascripts/application.js rails 5.1/app/assets/javascripts/application.js
--- rails 5.0/app/assets/javascripts/application.js 2023-08-21 12:38:11
+++ rails 5.1/app/assets/javascripts/application.js 2023-08-21 12:38:13
@@ -1,8 +1,8 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
-// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
-// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
+// vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
@@ -10,7 +10,6 @@
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
-//= require jquery
-//= require jquery_ujs
+//= require rails-ujs
//= require turbolinks
//= require_tree .
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/app/assets/javascripts/cable.js rails 5.1/app/assets/javascripts/cable.js
--- rails 5.0/app/assets/javascripts/cable.js 2023-08-21 12:38:11
+++ rails 5.1/app/assets/javascripts/cable.js 2023-08-21 12:38:13
@@ -1,5 +1,5 @@
// Action Cable provides the framework to deal with WebSockets in Rails.
-// You can generate new channels where WebSocket features live using the rails generate channel command.
+// You can generate new channels where WebSocket features live using the `rails generate channel` command.
//
//= require action_cable
//= require_self
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/app/assets/stylesheets/application.css rails 5.1/app/assets/stylesheets/application.css
--- rails 5.0/app/assets/stylesheets/application.css 2023-08-21 12:38:11
+++ rails 5.1/app/assets/stylesheets/application.css 2023-08-21 12:38:13
@@ -2,8 +2,8 @@
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
+ * vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/app/views/layouts/application.html.erb rails 5.1/app/views/layouts/application.html.erb
--- rails 5.0/app/views/layouts/application.html.erb 2023-08-21 12:38:11
+++ rails 5.1/app/views/layouts/application.html.erb 2023-08-21 12:38:13
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>Rails50</title>
+ <title>Rails51</title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/bin/setup rails 5.1/bin/setup
--- rails 5.0/bin/setup 2023-08-21 12:38:11
+++ rails 5.1/bin/setup 2023-08-21 12:38:13
@@ -18,6 +18,10 @@
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
+ # Install JavaScript dependencies if using Yarn
+ # system('bin/yarn')
+
+
# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml'
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/bin/yarn rails 5.1/bin/yarn
--- rails 5.0/bin/yarn 1969-12-31 16:00:00
+++ rails 5.1/bin/yarn 2023-08-21 12:38:13
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+VENDOR_PATH = File.expand_path('..', __dir__)
+Dir.chdir(VENDOR_PATH) do
+ begin
+ exec "yarnpkg #{ARGV.join(" ")}"
+ rescue Errno::ENOENT
+ $stderr.puts "Yarn executable was not detected in the system."
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
+ exit 1
+ end
+end
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/config/application.rb rails 5.1/config/application.rb
--- rails 5.0/config/application.rb 2023-08-21 12:38:11
+++ rails 5.1/config/application.rb 2023-08-21 12:38:13
@@ -6,8 +6,11 @@
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
-module Rails50
+module Rails51
class Application < Rails::Application
+ # Initialize configuration defaults for originally generated Rails version.
+ config.load_defaults 5.1
+
# 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.
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/config/cable.yml rails 5.1/config/cable.yml
--- rails 5.0/config/cable.yml 2023-08-21 12:38:11
+++ rails 5.1/config/cable.yml 2023-08-21 12:38:13
@@ -7,3 +7,4 @@
production:
adapter: redis
url: redis://localhost:6379/1
+ channel_prefix: rails_5_1_production
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/config/database.yml rails 5.1/config/database.yml
--- rails 5.0/config/database.yml 2023-08-21 12:38:11
+++ rails 5.1/config/database.yml 2023-08-21 12:38:13
@@ -6,7 +6,7 @@
#
default: &default
adapter: sqlite3
- pool: 5
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
development:
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/config/environments/development.rb rails 5.1/config/environments/development.rb
--- rails 5.0/config/environments/development.rb 2023-08-21 12:38:11
+++ rails 5.1/config/environments/development.rb 2023-08-21 12:38:13
@@ -18,7 +18,7 @@
config.cache_store = :memory_store
config.public_file_server.headers = {
- 'Cache-Control' => 'public, max-age=172800'
+ 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
}
else
config.action_controller.perform_caching = false
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/config/environments/production.rb rails 5.1/config/environments/production.rb
--- rails 5.0/config/environments/production.rb 2023-08-21 12:38:11
+++ rails 5.1/config/environments/production.rb 2023-08-21 12:38:13
@@ -14,6 +14,11 @@
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
+
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
@@ -54,7 +59,7 @@
# 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_0_#{Rails.env}"
+ # config.active_job.queue_name_prefix = "rails_5_1_#{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.0/config/environments/test.rb rails 5.1/config/environments/test.rb
--- rails 5.0/config/environments/test.rb 2023-08-21 12:38:11
+++ rails 5.1/config/environments/test.rb 2023-08-21 12:38:13
@@ -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=3600'
+ 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
}
# Show full error reports and disable caching.
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/config/initializers/assets.rb rails 5.1/config/initializers/assets.rb
--- rails 5.0/config/initializers/assets.rb 2023-08-21 12:38:11
+++ rails 5.1/config/initializers/assets.rb 2023-08-21 12:38:13
@@ -3,9 +3,12 @@
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'
-# Add additional assets to the asset load path
+# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
+# Add Yarn node_modules folder to the asset load path.
+Rails.application.config.assets.paths << Rails.root.join('node_modules')
# Precompile additional assets.
-# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
-# Rails.application.config.assets.precompile += %w( search.js )
+# application.js, application.css, and all non-JS/CSS in the app/assets
+# folder are already added.
+# Rails.application.config.assets.precompile += %w( admin.js admin.css )
Only in rails 5.0/config/initializers: new_framework_defaults.rb
Only in rails 5.0/config/initializers: session_store.rb
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/config/locales/en.yml rails 5.1/config/locales/en.yml
--- rails 5.0/config/locales/en.yml 2023-08-21 12:38:11
+++ rails 5.1/config/locales/en.yml 2023-08-21 12:38:13
@@ -16,6 +16,16 @@
#
# This would use the information in config/locales/es.yml.
#
+# The following keys must be escaped otherwise they will not be retrieved by
+# the default I18n backend:
+#
+# true, false, on, off, yes, no
+#
+# Instead, surround them with single quotes.
+#
+# en:
+# 'true': 'foo'
+#
# To learn more, please read the Rails Internationalization guide
# available at http://guides.rubyonrails.org/i18n.html.
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/config/puma.rb rails 5.1/config/puma.rb
--- rails 5.0/config/puma.rb 2023-08-21 12:38:11
+++ rails 5.1/config/puma.rb 2023-08-21 12:38:13
@@ -1,13 +1,13 @@
# Puma can serve each request in a thread from an internal thread pool.
-# The `threads` method setting takes two numbers a minimum and maximum.
+# The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
-# and maximum, this matches the default thread size of Active Record.
+# and maximum; this matches the default thread size of Active Record.
#
-threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
+threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
threads threads_count, threads_count
-# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
+# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
port ENV.fetch("PORT") { 3000 }
@@ -32,16 +32,25 @@
#
# 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 `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, Ruby
+# 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
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/config/secrets.yml rails 5.1/config/secrets.yml
--- rails 5.0/config/secrets.yml 2023-08-21 12:38:11
+++ rails 5.1/config/secrets.yml 2023-08-21 12:38:13
@@ -10,13 +10,23 @@
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
+# Shared secrets are available across all environments.
+
+# shared:
+# api_key: a1B2c3D4e5F6
+
+# Environmental secrets are only available for that specific environment.
+
development:
- secret_key_base: 2128b54ccd068870c2f2c14e97b1ce4ca82d46c91548a51c1726d892b21cef5de839250afe88c18d093145b54276f5ca7dd6a25099674b136e1eb22776725809
+ secret_key_base: b98672372c86f4713750bf0cc44547359ffb6a2d06979302bde133c163c6f03a2394a9733d541324c9ef01717e14e160418767a1d578bcb5dd0273c5e6784ea4
test:
- secret_key_base: 90339be7d910d79af97fe377bfe5aba64aa2bd58819c4f2a6519ed5325de73d7fc4589270641eea5a4770d4e66e938ff435caa89aab795e97aebc04d1001c143
+ secret_key_base: d5ea6adc2ec360e12babc421e359e8965385063555695a780aae3a02a2ba54a101dc2930e5646a8c7fe2950f0cf0eb8afe4e78eb6054cfeaaa9f20cc2ef7490b
-# Do not keep production secrets in the repository,
-# instead read values from the environment.
+# Do not keep production secrets in the unencrypted secrets file.
+# Instead, either read values from the environment.
+# Or, use `bin/rails secrets:setup` to configure encrypted secrets
+# and move the `production:` environment over there.
+
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/package.json rails 5.1/package.json
--- rails 5.0/package.json 1969-12-31 16:00:00
+++ rails 5.1/package.json 2023-08-21 12:38:13
@@ -0,0 +1,5 @@
+{
+ "name": "rails_5_1",
+ "private": true,
+ "dependencies": {}
+}
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/public/robots.txt rails 5.1/public/robots.txt
--- rails 5.0/public/robots.txt 2023-08-21 12:38:11
+++ rails 5.1/public/robots.txt 2023-08-21 12:38:13
@@ -1,5 +1 @@
# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
-#
-# To ban all spiders from the entire site uncomment the next two lines:
-# User-agent: *
-# Disallow: /
diff --ignore-space-change --minimal --recursive --unidirectional-new-file --unified rails 5.0/test/application_system_test_case.rb rails 5.1/test/application_system_test_case.rb
--- rails 5.0/test/application_system_test_case.rb 1969-12-31 16:00:00
+++ rails 5.1/test/application_system_test_case.rb 2023-08-21 12:38:13
@@ -0,0 +1,5 @@
+require "test_helper"
+
+class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
+ driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
+end
Only in rails 5.0/vendor: assets