メモ： Rails 6.0.0.beta3 と Rails 6.0.0.rc1 で各々生成したアプリの差分

Rails 6.0.0.beta3 と Rails 6.0.0.rc1 で各々`rails new`した時の差分めも。

### 実行環境

```shell
$ ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
```

### rails new コマンド

```
$ rails new sample_app -T -d mysql --webpack=vue
```

### 差分

```diff
diff -u -r --exclude='*.log' --exclude=credentials.yml.enc --exclude=master.key rails6b3/sample_app/.ruby-version rails6r1/sample_app/.ruby-version
--- rails6b3/sample_app/.ruby-version	2019-05-10 21:32:57.000000000 +0900
+++ rails6r1/sample_app/.ruby-version	2019-05-10 21:37:12.000000000 +0900
@@ -1 +1 @@
-ruby-2.6.3
\ No newline at end of file
+ruby-2.6.3
diff -u -r --exclude='*.log' --exclude=credentials.yml.enc --exclude=master.key rails6b3/sample_app/Gemfile rails6r1/sample_app/Gemfile
--- rails6b3/sample_app/Gemfile	2019-05-10 21:32:57.000000000 +0900
+++ rails6r1/sample_app/Gemfile	2019-05-10 21:37:12.000000000 +0900
@@ -4,15 +4,15 @@
 ruby '2.6.3'
 
 # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '~> 6.0.0.beta3'
+gem 'rails', '~> 6.0.0.rc1'
 # Use mysql as the database for Active Record
 gem 'mysql2', '>= 0.4.4'
 # Use Puma as the app server
 gem 'puma', '~> 3.11'
 # Use SCSS for stylesheets
-gem 'sass-rails', '~> 5.0'
+gem 'sass-rails', '~> 5'
 # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
-gem 'webpacker', '>= 4.0.0.rc.3'
+gem 'webpacker', '~> 4.0'
 # 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
@@ -26,7 +26,7 @@
 # gem 'image_processing', '~> 1.2'
 
 # Reduces boot times through caching; required in config/boot.rb
-gem 'bootsnap', '>= 1.4.1', require: false
+gem 'bootsnap', '>= 1.4.2', require: false
 
 group :development, :test do
   # Call 'byebug' anywhere in the code to stop execution and get a debugger console
diff -u -r --exclude='*.log' --exclude=credentials.yml.enc --exclude=master.key rails6b3/sample_app/Gemfile.lock rails6r1/sample_app/Gemfile.lock
--- rails6b3/sample_app/Gemfile.lock	2019-05-10 21:33:44.000000000 +0900
+++ rails6r1/sample_app/Gemfile.lock	2019-05-10 21:37:55.000000000 +0900
@@ -180,23 +180,23 @@
   ruby
 
 DEPENDENCIES
-  bootsnap (>= 1.4.1)
+  bootsnap (>= 1.4.2)
   byebug
   jbuilder (~> 2.5)
   listen (>= 3.0.5, < 3.2)
   mysql2 (>= 0.4.4)
   puma (~> 3.11)
-  rails (~> 6.0.0.beta3)
-  sass-rails (~> 5.0)
+  rails (~> 6.0.0.rc1)
+  sass-rails (~> 5)
   spring
   spring-watcher-listen (~> 2.0.0)
   turbolinks (~> 5)
   tzinfo-data
   web-console (>= 3.3.0)
-  webpacker (>= 4.0.0.rc.3)
+  webpacker (~> 4.0)
 
 RUBY VERSION
    ruby 2.6.3p62
 
 BUNDLED WITH
-   2.0.1
+   1.17.3
diff -u -r --exclude='*.log' --exclude=credentials.yml.enc --exclude=master.key rails6b3/sample_app/app/javascript/packs/application.js rails6r1/sample_app/app/javascript/packs/application.js
--- rails6b3/sample_app/app/javascript/packs/application.js	2019-05-10 21:32:57.000000000 +0900
+++ rails6r1/sample_app/app/javascript/packs/application.js	2019-05-10 21:37:12.000000000 +0900
@@ -7,3 +7,11 @@
 require("turbolinks").start()
 require("@rails/activestorage").start()
 require("channels")
+
+
+// Uncomment to copy all static images under ../images to the output folder and reference
+// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
+// or the `imagePath` JavaScript helper below.
+//
+// const images = require.context('../images', true)
+// const imagePath = (name) => images(name, true)
diff -u -r --exclude='*.log' --exclude=credentials.yml.enc --exclude=master.key rails6b3/sample_app/bin/setup rails6r1/sample_app/bin/setup
--- rails6b3/sample_app/bin/setup	2019-05-10 21:32:57.000000000 +0900
+++ rails6r1/sample_app/bin/setup	2019-05-10 21:37:12.000000000 +0900
@@ -9,7 +9,8 @@
 end
 
 FileUtils.chdir APP_ROOT do
-  # This script is a starting point to setup your application.
+  # This script is a way to setup or update your development environment automatically.
+  # This script is idempotent, so that you can run it at anytime and get an expectable outcome.
   # Add necessary setup steps to this file.
 
   puts '== Installing dependencies =='
@@ -25,7 +26,7 @@
   # end
 
   puts "\n== Preparing database =="
-  system! 'bin/rails db:setup'
+  system! 'bin/rails db:prepare'
 
   puts "\n== Removing old logs and tempfiles =="
   system! 'bin/rails log:clear tmp:clear'
Only in rails6b3/sample_app/bin: update
diff -u -r --exclude='*.log' --exclude=credentials.yml.enc --exclude=master.key rails6b3/sample_app/config/environments/test.rb rails6r1/sample_app/config/environments/test.rb
--- rails6b3/sample_app/config/environments/test.rb	2019-05-10 21:32:57.000000000 +0900
+++ rails6r1/sample_app/config/environments/test.rb	2019-05-10 21:37:12.000000000 +0900
@@ -1,11 +1,12 @@
+# The test environment is used exclusively to run your application's
+# test suite. You never need to work with it otherwise. Remember that
+# your test database is "scratch space" for the test suite and is wiped
+# and recreated between test runs. Don't rely on the data there!
+
 Rails.application.configure do
   # Settings specified here will take precedence over those in config/application.rb.
-
-  # The test environment is used exclusively to run your application's
-  # test suite. You never need to work with it otherwise. Remember that
-  # your test database is "scratch space" for the test suite and is wiped
-  # and recreated between test runs. Don't rely on the data there!
-  config.cache_classes = true
+  
+  config.cache_classes = false
 
   # Do not eager load code on boot. This avoids loading your whole application
   # just for the purpose of running a single test. If you are using a tool that
```

### 作業内容

```shell
$ rvm use --install --create 2.6@rails6b3
$ gem install rails -v '6.0.0.beta3' --pre
$ mkdir -p tmp/rails6b3/
$ cd tmp/rails6b3/
$ rails new sample_app -T -d mysql --webpack=vue
$ cd ..
$ mkdir rails6r1
$ cd rails6r1
$ rvm use --install --create 2.6@rails6r1
$ gem install rails -v '6.0.0.rc1' --pre
$ rails new sample_app -T -d mysql --webpack=vue
$ cd ..
$ rm -rf */sample_app/tmp/*
$ diff -u -r --exclude='*.log' --exclude='credentials.yml.enc' --exclude='master.key' rails6b3 rails6r1
```

### 付録： colordiffを使う場合

```shell
colordiff -r --exclude='*.log' --exclude='credentials.yml.enc' --exclude='master.key' rails6b3 rails6r1
```