Skip to content

Commit 9ee3fe0

Browse files
committed
upgrade to rails 5.0.0.beta3
- ran `rails rails:update` - also updated rspec-rails to 3.5.0.beta3 for rails 5 compatibility - modified puma config
1 parent 1914e1e commit 9ee3fe0

23 files changed

+270
-137
lines changed

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ruby "2.3.0"
33

44
#
55
# Bundle edge Rails instead: gem "rails", github: "rails/rails"
6-
gem "rails", "~>4.2"
6+
gem "rails", "5.0.0.beta3"
77

88
# Note: We're using sqllite3 for development and testing
99
gem "sqlite3", group: [:development, :test]
@@ -102,7 +102,7 @@ group :test do
102102
gem "generator_spec"
103103
gem "launchy"
104104
gem "poltergeist"
105-
gem "rspec-rails"
105+
gem "rspec-rails", "3.5.0.beta3"
106106
gem "rspec-retry"
107107
gem "selenium-webdriver", require: !["poltergeist", "poltergeist_errors_ok", "webkit"].include?(ENV["DRIVER"])
108108
end

Gemfile.lock

+67-61
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actionmailer (4.2.6)
5-
actionpack (= 4.2.6)
6-
actionview (= 4.2.6)
7-
activejob (= 4.2.6)
4+
actioncable (5.0.0.beta3)
5+
actionpack (= 5.0.0.beta3)
6+
nio4r (~> 1.2)
7+
websocket-driver (~> 0.6.1)
8+
actionmailer (5.0.0.beta3)
9+
actionpack (= 5.0.0.beta3)
10+
actionview (= 5.0.0.beta3)
11+
activejob (= 5.0.0.beta3)
812
mail (~> 2.5, >= 2.5.4)
913
rails-dom-testing (~> 1.0, >= 1.0.5)
10-
actionpack (4.2.6)
11-
actionview (= 4.2.6)
12-
activesupport (= 4.2.6)
13-
rack (~> 1.6)
14-
rack-test (~> 0.6.2)
14+
actionpack (5.0.0.beta3)
15+
actionview (= 5.0.0.beta3)
16+
activesupport (= 5.0.0.beta3)
17+
rack (~> 2.x)
18+
rack-test (~> 0.6.3)
1519
rails-dom-testing (~> 1.0, >= 1.0.5)
1620
rails-html-sanitizer (~> 1.0, >= 1.0.2)
17-
actionview (4.2.6)
18-
activesupport (= 4.2.6)
21+
actionview (5.0.0.beta3)
22+
activesupport (= 5.0.0.beta3)
1923
builder (~> 3.1)
2024
erubis (~> 2.7.0)
2125
rails-dom-testing (~> 1.0, >= 1.0.5)
2226
rails-html-sanitizer (~> 1.0, >= 1.0.2)
23-
activejob (4.2.6)
24-
activesupport (= 4.2.6)
25-
globalid (>= 0.3.0)
26-
activemodel (4.2.6)
27-
activesupport (= 4.2.6)
28-
builder (~> 3.1)
29-
activerecord (4.2.6)
30-
activemodel (= 4.2.6)
31-
activesupport (= 4.2.6)
32-
arel (~> 6.0)
33-
activesupport (4.2.6)
27+
activejob (5.0.0.beta3)
28+
activesupport (= 5.0.0.beta3)
29+
globalid (>= 0.3.6)
30+
activemodel (5.0.0.beta3)
31+
activesupport (= 5.0.0.beta3)
32+
activerecord (5.0.0.beta3)
33+
activemodel (= 5.0.0.beta3)
34+
activesupport (= 5.0.0.beta3)
35+
arel (~> 7.0)
36+
activesupport (5.0.0.beta3)
37+
concurrent-ruby (~> 1.0)
3438
i18n (~> 0.7)
35-
json (~> 1.7, >= 1.7.7)
3639
minitest (~> 5.1)
37-
thread_safe (~> 0.3, >= 0.3.4)
3840
tzinfo (~> 1.1)
3941
addressable (2.4.0)
4042
archive-zip (0.7.0)
4143
io-like (~> 0.3.0)
42-
arel (6.0.3)
44+
arel (7.0.0)
4345
ast (2.2.0)
4446
autoprefixer-rails (6.3.6)
4547
execjs
@@ -60,8 +62,8 @@ GEM
6062
bundler-audit (0.5.0)
6163
bundler (~> 1.2)
6264
thor (~> 0.18)
63-
byebug (8.2.2)
64-
capybara (2.6.2)
65+
byebug (8.2.3)
66+
capybara (2.7.0)
6567
addressable
6668
mime-types (>= 1.16)
6769
nokogiri (>= 1.3.3)
@@ -71,8 +73,8 @@ GEM
7173
capybara-screenshot (1.0.12)
7274
capybara (>= 1.0, < 3)
7375
launchy
74-
capybara-webkit (1.9.0)
75-
capybara (>= 2.3.0, < 2.7.0)
76+
capybara-webkit (1.10.0)
77+
capybara (>= 2.3.0, < 2.8.0)
7678
json
7779
childprocess (0.5.9)
7880
ffi (~> 1.0, >= 1.0.11)
@@ -139,6 +141,7 @@ GEM
139141
mini_portile2 (2.0.0)
140142
minitest (5.8.4)
141143
multi_json (1.11.2)
144+
nio4r (1.2.1)
142145
nokogiri (1.6.7.2)
143146
mini_portile2 (~> 2.0.0.rc2)
144147
parser (2.3.0.7)
@@ -168,21 +171,23 @@ GEM
168171
pry-stack_explorer (0.4.9.2)
169172
binding_of_caller (>= 0.7)
170173
pry (>= 0.9.11)
171-
puma (3.3.0)
172-
rack (1.6.4)
174+
puma (3.4.0)
175+
rack (2.0.0.alpha)
176+
json
173177
rack-test (0.6.3)
174178
rack (>= 1.0)
175-
rails (4.2.6)
176-
actionmailer (= 4.2.6)
177-
actionpack (= 4.2.6)
178-
actionview (= 4.2.6)
179-
activejob (= 4.2.6)
180-
activemodel (= 4.2.6)
181-
activerecord (= 4.2.6)
182-
activesupport (= 4.2.6)
179+
rails (5.0.0.beta3)
180+
actioncable (= 5.0.0.beta3)
181+
actionmailer (= 5.0.0.beta3)
182+
actionpack (= 5.0.0.beta3)
183+
actionview (= 5.0.0.beta3)
184+
activejob (= 5.0.0.beta3)
185+
activemodel (= 5.0.0.beta3)
186+
activerecord (= 5.0.0.beta3)
187+
activesupport (= 5.0.0.beta3)
183188
bundler (>= 1.3.0, < 2.0)
184-
railties (= 4.2.6)
185-
sprockets-rails
189+
railties (= 5.0.0.beta3)
190+
sprockets-rails (>= 2.0.0)
186191
rails-deprecated_sanitizer (1.0.3)
187192
activesupport (>= 4.2.0.alpha)
188193
rails-dom-testing (1.0.7)
@@ -196,9 +201,10 @@ GEM
196201
rails_stdout_logging
197202
rails_serve_static_assets (0.0.5)
198203
rails_stdout_logging (0.0.5)
199-
railties (4.2.6)
200-
actionpack (= 4.2.6)
201-
activesupport (= 4.2.6)
204+
railties (5.0.0.beta3)
205+
actionpack (= 5.0.0.beta3)
206+
activesupport (= 5.0.0.beta3)
207+
method_source
202208
rake (>= 0.8.7)
203209
thor (>= 0.18.1, < 2.0)
204210
rainbow (2.1.0)
@@ -212,25 +218,25 @@ GEM
212218
rails (>= 3.2)
213219
rainbow (~> 2.1)
214220
ref (2.0.0)
215-
rspec-core (3.4.4)
216-
rspec-support (~> 3.4.0)
217-
rspec-expectations (3.4.0)
221+
rspec-core (3.5.0.beta3)
222+
rspec-support (= 3.5.0.beta3)
223+
rspec-expectations (3.5.0.beta3)
218224
diff-lcs (>= 1.2.0, < 2.0)
219-
rspec-support (~> 3.4.0)
220-
rspec-mocks (3.4.1)
225+
rspec-support (= 3.5.0.beta3)
226+
rspec-mocks (3.5.0.beta3)
221227
diff-lcs (>= 1.2.0, < 2.0)
222-
rspec-support (~> 3.4.0)
223-
rspec-rails (3.4.2)
224-
actionpack (>= 3.0, < 4.3)
225-
activesupport (>= 3.0, < 4.3)
226-
railties (>= 3.0, < 4.3)
227-
rspec-core (~> 3.4.0)
228-
rspec-expectations (~> 3.4.0)
229-
rspec-mocks (~> 3.4.0)
230-
rspec-support (~> 3.4.0)
228+
rspec-support (= 3.5.0.beta3)
229+
rspec-rails (3.5.0.beta3)
230+
actionpack (>= 3.0)
231+
activesupport (>= 3.0)
232+
railties (>= 3.0)
233+
rspec-core (= 3.5.0.beta3)
234+
rspec-expectations (= 3.5.0.beta3)
235+
rspec-mocks (= 3.5.0.beta3)
236+
rspec-support (= 3.5.0.beta3)
231237
rspec-retry (0.4.5)
232238
rspec-core
233-
rspec-support (3.4.1)
239+
rspec-support (3.5.0.beta3)
234240
rubocop (0.39.0)
235241
parser (>= 2.3.0.7, < 3.0)
236242
powerpack (~> 0.1)
@@ -343,12 +349,12 @@ DEPENDENCIES
343349
pry-rescue
344350
pry-stack_explorer
345351
puma
346-
rails (~> 4.2)
352+
rails (= 5.0.0.beta3)
347353
rails-html-sanitizer
348354
rails_12factor
349355
rainbow
350356
react_on_rails (~> 5.1.1)
351-
rspec-rails
357+
rspec-rails (= 3.5.0.beta3)
352358
rspec-retry
353359
rubocop
354360
ruby-lint

bin/rails

-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
#!/usr/bin/env ruby
2-
begin
3-
load File.expand_path('../spring', __FILE__)
4-
rescue LoadError => e
5-
raise unless e.message.include?('spring')
6-
end
72
APP_PATH = File.expand_path('../../config/application', __FILE__)
83
require_relative '../config/boot'
94
require 'rails/commands'

bin/rake

-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
#!/usr/bin/env ruby
2-
begin
3-
load File.expand_path('../spring', __FILE__)
4-
rescue LoadError => e
5-
raise unless e.message.include?('spring')
6-
end
72
require_relative '../config/boot'
83
require 'rake'
94
Rake.application.run

bin/setup

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
#!/usr/bin/env ruby
22
require 'pathname'
3+
require 'fileutils'
4+
include FileUtils
35

46
# path to your application root.
5-
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
7+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
68

7-
Dir.chdir APP_ROOT do
9+
def system!(*args)
10+
system(*args) || abort("\n== Command #{args} failed ==")
11+
end
12+
13+
chdir APP_ROOT do
814
# This script is a starting point to setup your application.
9-
# Add necessary setup steps to this file:
15+
# Add necessary setup steps to this file.
1016

11-
puts "== Installing dependencies =="
12-
system "gem install bundler --conservative"
13-
system "bundle check || bundle install"
17+
puts '== Installing dependencies =='
18+
system! 'gem install bundler --conservative'
19+
system('bundle check') or system!('bundle install')
1420

1521
# puts "\n== Copying sample files =="
16-
# unless File.exist?("config/database.yml")
17-
# system "cp config/database.yml.sample config/database.yml"
22+
# unless File.exist?('config/database.yml')
23+
# cp 'config/database.yml.sample', 'config/database.yml'
1824
# end
1925

2026
puts "\n== Preparing database =="
21-
system "bin/rake db:setup"
27+
system! 'bin/rails db:setup'
2228

2329
puts "\n== Removing old logs and tempfiles =="
24-
system "rm -f log/*"
25-
system "rm -rf tmp/cache"
30+
system! 'bin/rails log:clear tmp:clear'
2631

2732
puts "\n== Restarting application server =="
28-
system "touch tmp/restart.txt"
33+
system! 'bin/rails restart'
2934
end

bin/update

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env ruby
2+
require 'pathname'
3+
require 'fileutils'
4+
include FileUtils
5+
6+
# path to your application root.
7+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8+
9+
def system!(*args)
10+
system(*args) || abort("\n== Command #{args} failed ==")
11+
end
12+
13+
chdir APP_ROOT do
14+
# This script is a way to update your development environment automatically.
15+
# Add necessary update steps to this file.
16+
17+
puts '== Installing dependencies =='
18+
system! 'gem install bundler --conservative'
19+
system 'bundle check' or system! 'bundle install'
20+
21+
puts "\n== Updating database =="
22+
system! 'bin/rails db:migrate'
23+
24+
puts "\n== Removing old logs and tempfiles =="
25+
system! 'bin/rails log:clear tmp:clear'
26+
27+
puts "\n== Restarting application server =="
28+
system! 'bin/rails restart'
29+
end

config/application.rb

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
require File.expand_path("../boot", __FILE__)
1+
require File.expand_path('../boot', __FILE__)
22

3-
require "rails/all"
3+
require 'rails/all'
44

55
# Require the gems listed in Gemfile, including any gems
66
# you've limited to :test, :development, or :production.
@@ -11,16 +11,5 @@ class Application < Rails::Application
1111
# Settings in config/environments/* take precedence over those specified here.
1212
# Application configuration should go into files in config/initializers
1313
# -- all .rb files in that directory are automatically loaded.
14-
15-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17-
# config.time_zone = "Central Time (US & Canada)"
18-
19-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20-
# config.i18n.load_path += Dir[Rails.root.join("my", "locales", "*.{rb,yml}").to_s]
21-
# config.i18n.default_locale = :de
22-
23-
# For not swallow errors in after_commit/after_rollback callbacks.
24-
config.active_record.raise_in_transactional_callbacks = true
2514
end
2615
end

config/boot.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
1+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
22

3-
require "bundler/setup" # Set up gems listed in the Gemfile.
3+
require 'bundler/setup' # Set up gems listed in the Gemfile.

config/cable.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Action Cable uses Redis by default to administer connections, channels, and sending/receiving messages over the WebSocket.
2+
production:
3+
adapter: redis
4+
url: redis://localhost:6379/1
5+
6+
development:
7+
adapter: async
8+
9+
test:
10+
adapter: async

config/environment.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Load the Rails application.
2-
require File.expand_path("../application", __FILE__)
2+
require File.expand_path('../application', __FILE__)
33

44
# Initialize the Rails application.
55
Rails.application.initialize!

0 commit comments

Comments
 (0)