Skip to content

Commit 6cfd00b

Browse files
committed
Bump rails to 6.0
1 parent 44beee5 commit 6cfd00b

21 files changed

Lines changed: 437 additions & 169 deletions

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source 'http://rubygems.org'
22

3-
gem 'rails', '~> 5.2.2'
3+
gem 'rails', '~> 6.0'
44

5+
gem 'listen'
56
gem 'sqlite3'
6-
77
gem 'split', '~> 3.4.1', :require => 'split/dashboard'

Gemfile.lock

Lines changed: 83 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,73 @@
11
GEM
22
remote: http://rubygems.org/
33
specs:
4-
actioncable (5.2.2)
5-
actionpack (= 5.2.2)
4+
actioncable (6.0.1)
5+
actionpack (= 6.0.1)
66
nio4r (~> 2.0)
77
websocket-driver (>= 0.6.1)
8-
actionmailer (5.2.2)
9-
actionpack (= 5.2.2)
10-
actionview (= 5.2.2)
11-
activejob (= 5.2.2)
8+
actionmailbox (6.0.1)
9+
actionpack (= 6.0.1)
10+
activejob (= 6.0.1)
11+
activerecord (= 6.0.1)
12+
activestorage (= 6.0.1)
13+
activesupport (= 6.0.1)
14+
mail (>= 2.7.1)
15+
actionmailer (6.0.1)
16+
actionpack (= 6.0.1)
17+
actionview (= 6.0.1)
18+
activejob (= 6.0.1)
1219
mail (~> 2.5, >= 2.5.4)
1320
rails-dom-testing (~> 2.0)
14-
actionpack (5.2.2)
15-
actionview (= 5.2.2)
16-
activesupport (= 5.2.2)
21+
actionpack (6.0.1)
22+
actionview (= 6.0.1)
23+
activesupport (= 6.0.1)
1724
rack (~> 2.0)
1825
rack-test (>= 0.6.3)
1926
rails-dom-testing (~> 2.0)
20-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
21-
actionview (5.2.2)
22-
activesupport (= 5.2.2)
27+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
28+
actiontext (6.0.1)
29+
actionpack (= 6.0.1)
30+
activerecord (= 6.0.1)
31+
activestorage (= 6.0.1)
32+
activesupport (= 6.0.1)
33+
nokogiri (>= 1.8.5)
34+
actionview (6.0.1)
35+
activesupport (= 6.0.1)
2336
builder (~> 3.1)
2437
erubi (~> 1.4)
2538
rails-dom-testing (~> 2.0)
26-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
27-
activejob (5.2.2)
28-
activesupport (= 5.2.2)
39+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
40+
activejob (6.0.1)
41+
activesupport (= 6.0.1)
2942
globalid (>= 0.3.6)
30-
activemodel (5.2.2)
31-
activesupport (= 5.2.2)
32-
activerecord (5.2.2)
33-
activemodel (= 5.2.2)
34-
activesupport (= 5.2.2)
35-
arel (>= 9.0)
36-
activestorage (5.2.2)
37-
actionpack (= 5.2.2)
38-
activerecord (= 5.2.2)
43+
activemodel (6.0.1)
44+
activesupport (= 6.0.1)
45+
activerecord (6.0.1)
46+
activemodel (= 6.0.1)
47+
activesupport (= 6.0.1)
48+
activestorage (6.0.1)
49+
actionpack (= 6.0.1)
50+
activejob (= 6.0.1)
51+
activerecord (= 6.0.1)
3952
marcel (~> 0.3.1)
40-
activesupport (5.2.2)
53+
activesupport (6.0.1)
4154
concurrent-ruby (~> 1.0, >= 1.0.2)
4255
i18n (>= 0.7, < 2)
4356
minitest (~> 5.1)
4457
tzinfo (~> 1.1)
45-
arel (9.0.0)
58+
zeitwerk (~> 2.2)
4659
builder (3.2.3)
47-
concurrent-ruby (1.1.3)
60+
concurrent-ruby (1.1.5)
4861
crass (1.0.5)
49-
erubi (1.7.1)
50-
globalid (0.4.1)
62+
erubi (1.9.0)
63+
ffi (1.11.3)
64+
globalid (0.4.2)
5165
activesupport (>= 4.2.0)
52-
i18n (1.1.1)
66+
i18n (1.7.0)
5367
concurrent-ruby (~> 1.0)
68+
listen (3.2.0)
69+
rb-fsevent (~> 0.10, >= 0.10.3)
70+
rb-inotify (~> 0.9, >= 0.9.10)
5471
loofah (2.4.0)
5572
crass (~> 1.0.2)
5673
nokogiri (>= 1.5.9)
@@ -59,44 +76,49 @@ GEM
5976
marcel (0.3.3)
6077
mimemagic (~> 0.3.2)
6178
method_source (0.9.2)
62-
mimemagic (0.3.2)
63-
mini_mime (1.0.1)
79+
mimemagic (0.3.3)
80+
mini_mime (1.0.2)
6481
mini_portile2 (2.4.0)
65-
minitest (5.11.3)
82+
minitest (5.13.0)
6683
mustermann (1.0.3)
67-
nio4r (2.3.1)
84+
nio4r (2.5.2)
6885
nokogiri (1.10.5)
6986
mini_portile2 (~> 2.4.0)
7087
rack (2.0.7)
7188
rack-protection (2.0.7)
7289
rack
7390
rack-test (1.1.0)
7491
rack (>= 1.0, < 3)
75-
rails (5.2.2)
76-
actioncable (= 5.2.2)
77-
actionmailer (= 5.2.2)
78-
actionpack (= 5.2.2)
79-
actionview (= 5.2.2)
80-
activejob (= 5.2.2)
81-
activemodel (= 5.2.2)
82-
activerecord (= 5.2.2)
83-
activestorage (= 5.2.2)
84-
activesupport (= 5.2.2)
92+
rails (6.0.1)
93+
actioncable (= 6.0.1)
94+
actionmailbox (= 6.0.1)
95+
actionmailer (= 6.0.1)
96+
actionpack (= 6.0.1)
97+
actiontext (= 6.0.1)
98+
actionview (= 6.0.1)
99+
activejob (= 6.0.1)
100+
activemodel (= 6.0.1)
101+
activerecord (= 6.0.1)
102+
activestorage (= 6.0.1)
103+
activesupport (= 6.0.1)
85104
bundler (>= 1.3.0)
86-
railties (= 5.2.2)
105+
railties (= 6.0.1)
87106
sprockets-rails (>= 2.0.0)
88107
rails-dom-testing (2.0.3)
89108
activesupport (>= 4.2.0)
90109
nokogiri (>= 1.6)
91-
rails-html-sanitizer (1.0.4)
92-
loofah (~> 2.2, >= 2.2.2)
93-
railties (5.2.2)
94-
actionpack (= 5.2.2)
95-
activesupport (= 5.2.2)
110+
rails-html-sanitizer (1.3.0)
111+
loofah (~> 2.3)
112+
railties (6.0.1)
113+
actionpack (= 6.0.1)
114+
activesupport (= 6.0.1)
96115
method_source
97116
rake (>= 0.8.7)
98-
thor (>= 0.19.0, < 2.0)
99-
rake (12.3.1)
117+
thor (>= 0.20.3, < 2.0)
118+
rake (13.0.1)
119+
rb-fsevent (0.10.3)
120+
rb-inotify (0.10.0)
121+
ffi (~> 1.0)
100122
redis (4.1.3)
101123
simple-random (1.0.3)
102124
sinatra (2.0.7)
@@ -108,31 +130,34 @@ GEM
108130
redis (>= 2.1)
109131
simple-random (>= 0.9.3)
110132
sinatra (>= 1.2.6)
111-
sprockets (3.7.2)
133+
sprockets (4.0.0)
112134
concurrent-ruby (~> 1.0)
113135
rack (> 1, < 3)
114136
sprockets-rails (3.2.1)
115137
actionpack (>= 4.0)
116138
activesupport (>= 4.0)
117139
sprockets (>= 3.0.0)
118-
sqlite3 (1.3.13)
140+
sqlite3 (1.4.1)
119141
thor (0.20.3)
120142
thread_safe (0.3.6)
121143
tilt (2.0.10)
122144
tzinfo (1.2.5)
123145
thread_safe (~> 0.1)
124-
websocket-driver (0.7.0)
146+
websocket-driver (0.7.1)
125147
websocket-extensions (>= 0.1.0)
126-
websocket-extensions (0.1.3)
148+
websocket-extensions (0.1.4)
149+
zeitwerk (2.2.1)
127150

128151
PLATFORMS
129152
ruby
130153
x86_64-darwin-18
154+
x86_64-darwin-19
131155

132156
DEPENDENCIES
133-
rails (~> 5.2.2)
157+
listen
158+
rails (~> 6.0)
134159
split (~> 3.4.1)
135160
sqlite3
136161

137162
BUNDLED WITH
138-
2.0.1
163+
2.0.2

bin/rails

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env ruby
2+
APP_PATH = File.expand_path('../config/application', __dir__)
3+
require_relative '../config/boot'
4+
require 'rails/commands'

bin/rake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env ruby
2+
require_relative '../config/boot'
3+
require 'rake'
4+
Rake.application.run

bin/setup

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env ruby
2+
require 'fileutils'
3+
4+
# path to your application root.
5+
APP_ROOT = File.expand_path('..', __dir__)
6+
7+
def system!(*args)
8+
system(*args) || abort("\n== Command #{args} failed ==")
9+
end
10+
11+
FileUtils.chdir APP_ROOT do
12+
# This script is a way to setup or update your development environment automatically.
13+
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
14+
# Add necessary setup steps to this file.
15+
16+
puts '== Installing dependencies =='
17+
system! 'gem install bundler --conservative'
18+
system('bundle check') || system!('bundle install')
19+
20+
# puts "\n== Copying sample files =="
21+
# unless File.exist?('config/database.yml')
22+
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
23+
# end
24+
25+
puts "\n== Preparing database =="
26+
system! 'bin/rails db:prepare'
27+
28+
puts "\n== Removing old logs and tempfiles =="
29+
system! 'bin/rails log:clear tmp:clear'
30+
31+
puts "\n== Restarting application server =="
32+
system! 'bin/rails restart'
33+
end

config/application.rb

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,35 @@
1-
require File.expand_path('../boot', __FILE__)
2-
3-
require 'rails/all'
1+
require_relative 'boot'
2+
3+
require "rails"
4+
5+
%w(
6+
active_record/railtie
7+
action_controller/railtie
8+
action_view/railtie
9+
action_mailer/railtie
10+
active_job/railtie
11+
action_cable/engine
12+
action_mailbox/engine
13+
action_text/engine
14+
).each do |railtie|
15+
begin
16+
require railtie
17+
rescue LoadError
18+
end
19+
end
420

5-
# If you have a Gemfile, require the gems listed there, including any gems
21+
# Require the gems listed in Gemfile, including any gems
622
# you've limited to :test, :development, or :production.
7-
Bundler.require(:default, Rails.env) if defined?(Bundler)
23+
Bundler.require(*Rails.groups)
824

925
module SplitRailsExample
1026
class Application < Rails::Application
11-
# Settings in config/environments/* take precedence over those specified here.
12-
# Application configuration should go into files in config/initializers
13-
# -- all .rb files in that directory are automatically loaded.
14-
15-
# Custom directories with classes and modules you want to be autoloadable.
16-
# config.autoload_paths += %W(#{config.root}/extras)
17-
18-
# Only load the plugins named here, in the order given (default is alphabetical).
19-
# :all can be used as a placeholder for all plugins not explicitly named.
20-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
27+
# Initialize configuration defaults for originally generated Rails version.
28+
config.load_defaults 6.0
2129

22-
# Activate observers that should always be running.
23-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
24-
25-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
26-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
27-
# config.time_zone = 'Central Time (US & Canada)'
28-
29-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
30-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
31-
# config.i18n.default_locale = :de
32-
33-
# JavaScript files you want as :defaults (application.js is always included).
34-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
35-
36-
# Configure the default encoding used in templates for Ruby 1.9.
37-
config.encoding = "utf-8"
38-
39-
# Configure sensitive parameters which will be filtered from the log file.
40-
config.filter_parameters += [:password]
30+
# Settings in config/environments/* take precedence over those specified here.
31+
# Application configuration can go into files in config/initializers
32+
# -- all .rb files in that directory are automatically loaded after loading
33+
# the framework and any gems in your application.
4134
end
4235
end

config/boot.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
require 'rubygems'
1+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
22

3-
# Set up gems listed in the Gemfile.
4-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5-
6-
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
3+
require 'bundler/setup' # Set up gems listed in the Gemfile.

config/cable.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
development:
2+
adapter: async
3+
4+
test:
5+
adapter: test
6+
7+
production:
8+
adapter: redis
9+
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10+
channel_prefix: split_rails_example_production

config/environment.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Load the rails application
2-
require File.expand_path('../application', __FILE__)
1+
# Load the Rails application.
2+
require_relative 'application'
33

4-
# Initialize the rails application
5-
SplitRailsExample::Application.initialize!
4+
# Initialize the Rails application.
5+
Rails.application.initialize!

0 commit comments

Comments
 (0)