Skip to content

Commit 15927cb

Browse files
committed
Update to Rails v5
1 parent 4e745a5 commit 15927cb

File tree

5 files changed

+121
-86
lines changed

5 files changed

+121
-86
lines changed

Gemfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
source 'https://rubygems.org'
22

3-
gem 'rails', '~> 4.2.0'
3+
gem 'rails', '~> 5.0.0'
4+
gem 'coffee-script'
5+
gem 'jbuilder'
6+
gem 'jquery-rails'
47
gem 'sass-rails'
58
gem 'uglifier'
6-
gem 'coffee-rails'
7-
gem 'jquery-rails'
8-
gem 'jbuilder'
99

1010
gem 'activerecord-sqlserver-adapter'
1111
gem 'tiny_tds'
1212

13+
group :development do
14+
gem 'better_errors'
15+
gem 'web-console', github: 'rails/web-console'
16+
end
17+
1318
group :development, :test do
1419
gem 'byebug'
15-
gem 'web-console', '~> 2.0'
1620
gem 'spring'
1721
end

Gemfile.lock

Lines changed: 74 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,63 @@
1+
GIT
2+
remote: git://github.com/rails/web-console.git
3+
revision: 8753a1056c62da296fb0062d3bdb99f4a83d3631
4+
specs:
5+
web-console (3.4.0)
6+
actionview (>= 5.0)
7+
activemodel (>= 5.0)
8+
debug_inspector
9+
railties (>= 5.0)
10+
111
GEM
212
remote: https://rubygems.org/
313
specs:
4-
actionmailer (4.2.7.1)
5-
actionpack (= 4.2.7.1)
6-
actionview (= 4.2.7.1)
7-
activejob (= 4.2.7.1)
14+
actioncable (5.0.1)
15+
actionpack (= 5.0.1)
16+
nio4r (~> 1.2)
17+
websocket-driver (~> 0.6.1)
18+
actionmailer (5.0.1)
19+
actionpack (= 5.0.1)
20+
actionview (= 5.0.1)
21+
activejob (= 5.0.1)
822
mail (~> 2.5, >= 2.5.4)
9-
rails-dom-testing (~> 1.0, >= 1.0.5)
10-
actionpack (4.2.7.1)
11-
actionview (= 4.2.7.1)
12-
activesupport (= 4.2.7.1)
13-
rack (~> 1.6)
14-
rack-test (~> 0.6.2)
15-
rails-dom-testing (~> 1.0, >= 1.0.5)
23+
rails-dom-testing (~> 2.0)
24+
actionpack (5.0.1)
25+
actionview (= 5.0.1)
26+
activesupport (= 5.0.1)
27+
rack (~> 2.0)
28+
rack-test (~> 0.6.3)
29+
rails-dom-testing (~> 2.0)
1630
rails-html-sanitizer (~> 1.0, >= 1.0.2)
17-
actionview (4.2.7.1)
18-
activesupport (= 4.2.7.1)
31+
actionview (5.0.1)
32+
activesupport (= 5.0.1)
1933
builder (~> 3.1)
2034
erubis (~> 2.7.0)
21-
rails-dom-testing (~> 1.0, >= 1.0.5)
35+
rails-dom-testing (~> 2.0)
2236
rails-html-sanitizer (~> 1.0, >= 1.0.2)
23-
activejob (4.2.7.1)
24-
activesupport (= 4.2.7.1)
25-
globalid (>= 0.3.0)
26-
activemodel (4.2.7.1)
27-
activesupport (= 4.2.7.1)
28-
builder (~> 3.1)
29-
activerecord (4.2.7.1)
30-
activemodel (= 4.2.7.1)
31-
activesupport (= 4.2.7.1)
32-
arel (~> 6.0)
33-
activerecord-sqlserver-adapter (4.2.16)
34-
activerecord (~> 4.2.1)
35-
activesupport (4.2.7.1)
37+
activejob (5.0.1)
38+
activesupport (= 5.0.1)
39+
globalid (>= 0.3.6)
40+
activemodel (5.0.1)
41+
activesupport (= 5.0.1)
42+
activerecord (5.0.1)
43+
activemodel (= 5.0.1)
44+
activesupport (= 5.0.1)
45+
arel (~> 7.0)
46+
activerecord-sqlserver-adapter (5.0.1)
47+
activerecord (~> 5.0.0)
48+
activesupport (5.0.1)
49+
concurrent-ruby (~> 1.0, >= 1.0.2)
3650
i18n (~> 0.7)
37-
json (~> 1.7, >= 1.7.7)
3851
minitest (~> 5.1)
39-
thread_safe (~> 0.3, >= 0.3.4)
4052
tzinfo (~> 1.1)
41-
arel (6.0.4)
42-
binding_of_caller (0.7.2)
43-
debug_inspector (>= 0.0.1)
53+
arel (7.1.4)
54+
better_errors (2.1.1)
55+
coderay (>= 1.0.0)
56+
erubis (>= 2.6.6)
57+
rack (>= 0.9.0)
4458
builder (3.2.3)
4559
byebug (9.0.6)
46-
coffee-rails (4.2.1)
47-
coffee-script (>= 2.2.0)
48-
railties (>= 4.0.0, < 5.2.x)
60+
coderay (1.1.1)
4961
coffee-script (2.4.1)
5062
coffee-script-source
5163
execjs
@@ -64,44 +76,44 @@ GEM
6476
rails-dom-testing (>= 1, < 3)
6577
railties (>= 4.2.0)
6678
thor (>= 0.14, < 2.0)
67-
json (1.8.6)
6879
loofah (2.0.3)
6980
nokogiri (>= 1.5.9)
7081
mail (2.6.4)
7182
mime-types (>= 1.16, < 4)
83+
method_source (0.8.2)
7284
mime-types (3.1)
7385
mime-types-data (~> 3.2015)
7486
mime-types-data (3.2016.0521)
7587
mini_portile2 (2.1.0)
7688
minitest (5.10.1)
7789
multi_json (1.12.1)
90+
nio4r (1.2.1)
7891
nokogiri (1.7.0.1)
7992
mini_portile2 (~> 2.1.0)
80-
rack (1.6.5)
93+
rack (2.0.1)
8194
rack-test (0.6.3)
8295
rack (>= 1.0)
83-
rails (4.2.7.1)
84-
actionmailer (= 4.2.7.1)
85-
actionpack (= 4.2.7.1)
86-
actionview (= 4.2.7.1)
87-
activejob (= 4.2.7.1)
88-
activemodel (= 4.2.7.1)
89-
activerecord (= 4.2.7.1)
90-
activesupport (= 4.2.7.1)
96+
rails (5.0.1)
97+
actioncable (= 5.0.1)
98+
actionmailer (= 5.0.1)
99+
actionpack (= 5.0.1)
100+
actionview (= 5.0.1)
101+
activejob (= 5.0.1)
102+
activemodel (= 5.0.1)
103+
activerecord (= 5.0.1)
104+
activesupport (= 5.0.1)
91105
bundler (>= 1.3.0, < 2.0)
92-
railties (= 4.2.7.1)
93-
sprockets-rails
94-
rails-deprecated_sanitizer (1.0.3)
95-
activesupport (>= 4.2.0.alpha)
96-
rails-dom-testing (1.0.8)
97-
activesupport (>= 4.2.0.beta, < 5.0)
106+
railties (= 5.0.1)
107+
sprockets-rails (>= 2.0.0)
108+
rails-dom-testing (2.0.2)
109+
activesupport (>= 4.2.0, < 6.0)
98110
nokogiri (~> 1.6)
99-
rails-deprecated_sanitizer (>= 1.0.1)
100111
rails-html-sanitizer (1.0.3)
101112
loofah (~> 2.0)
102-
railties (4.2.7.1)
103-
actionpack (= 4.2.7.1)
104-
activesupport (= 4.2.7.1)
113+
railties (5.0.1)
114+
actionpack (= 5.0.1)
115+
activesupport (= 5.0.1)
116+
method_source
105117
rake (>= 0.8.7)
106118
thor (>= 0.18.1, < 2.0)
107119
rake (12.0.0)
@@ -130,27 +142,26 @@ GEM
130142
thread_safe (~> 0.1)
131143
uglifier (3.0.4)
132144
execjs (>= 0.3.0, < 3)
133-
web-console (2.3.0)
134-
activemodel (>= 4.0)
135-
binding_of_caller (>= 0.7.2)
136-
railties (>= 4.0)
137-
sprockets-rails (>= 2.0, < 4.0)
145+
websocket-driver (0.6.5)
146+
websocket-extensions (>= 0.1.0)
147+
websocket-extensions (0.1.2)
138148

139149
PLATFORMS
140150
ruby
141151

142152
DEPENDENCIES
143153
activerecord-sqlserver-adapter
154+
better_errors
144155
byebug
145-
coffee-rails
156+
coffee-script
146157
jbuilder
147158
jquery-rails
148-
rails (~> 4.2.0)
159+
rails (~> 5.0.0)
149160
sass-rails
150161
spring
151162
tiny_tds
152163
uglifier
153-
web-console (~> 2.0)
164+
web-console!
154165

155166
BUNDLED WITH
156167
1.13.6

config/environments/development.rb

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,20 @@
99
# Do not eager load code on boot.
1010
config.eager_load = false
1111

12-
# Show full error reports and disable caching.
13-
config.consider_all_requests_local = true
14-
config.action_controller.perform_caching = false
12+
# Show full error reports.
13+
config.consider_all_requests_local = true
14+
15+
# Enable/disable caching. By default caching is disabled.
16+
if Rails.root.join('tmp/caching-dev.txt').exist?
17+
config.action_controller.perform_caching = true
18+
config.cache_store = :memory_store
19+
config.public_file_server.headers = {
20+
'Cache-Control' => 'public, max-age=172800'
21+
}
22+
else
23+
config.action_controller.perform_caching = false
24+
config.cache_store = :null_store
25+
end
1526

1627
# Don't care if the mailer can't send.
1728
config.action_mailer.raise_delivery_errors = false
@@ -25,7 +36,7 @@
2536
# Debug mode disables concatenation and preprocessing of assets.
2637
# This option may cause significant delays in view rendering with a large
2738
# number of complex assets.
28-
config.assets.debug = true
39+
config.assets.debug = false
2940

3041
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
3142
# yet still be able to expire them through the digest params.
@@ -38,4 +49,8 @@
3849

3950
# Raises error for missing translations
4051
# config.action_view.raise_on_missing_translations = true
52+
53+
# Use an evented file watcher to asynchronously detect changes in source code,
54+
# routes, locales, etc. This feature depends on the listen gem.
55+
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
4156
end

config/environments/production.rb

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,9 @@
1414
config.consider_all_requests_local = false
1515
config.action_controller.perform_caching = true
1616

17-
# Enable Rack::Cache to put a simple HTTP cache in front of your application
18-
# Add `rack-cache` to your Gemfile before enabling this.
19-
# For large-scale production use, consider using a caching reverse proxy like
20-
# NGINX, varnish or squid.
21-
# config.action_dispatch.rack_cache = true
22-
2317
# Disable serving static files from the `/public` folder by default since
2418
# Apache or NGINX already handles this.
25-
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
19+
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
2620

2721
# Compress JavaScripts and CSS.
2822
config.assets.js_compressor = :uglifier
@@ -37,10 +31,17 @@
3731

3832
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
3933

34+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
35+
# config.action_controller.asset_host = 'http://assets.example.com'
36+
4037
# Specifies the header that your server uses for sending files.
4138
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
4239
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
4340

41+
# Action Cable endpoint configuration
42+
# config.action_cable.url = 'wss://example.com/cable'
43+
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
44+
4445
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
4546
# config.force_ssl = true
4647

@@ -49,16 +50,18 @@
4950
config.log_level = :debug
5051

5152
# Prepend all log lines with the following tags.
52-
# config.log_tags = [ :subdomain, :uuid ]
53+
config.log_tags = [:request_id]
5354

5455
# Use a different logger for distributed setups.
55-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56+
# require 'syslog/logger'
57+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
5658

5759
# Use a different cache store in production.
5860
# config.cache_store = :mem_cache_store
5961

60-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
61-
# config.action_controller.asset_host = 'http://assets.example.com'
62+
# Use a real queuing backend for Active Job (and separate queues per environment)
63+
# config.active_job.queue_adapter = :resque
64+
# config.active_job.queue_name_prefix = "cachetest2_#{Rails.env}"
6265

6366
# Ignore bad email addresses and do not raise email delivery errors.
6467
# Set this to true and configure the email server for immediate delivery to raise delivery errors.

config/environments/test.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
# preloads Rails for running tests, you may have to set it to true.
1313
config.eager_load = false
1414

15-
# Configure static file server for tests with Cache-Control for performance.
16-
config.serve_static_files = true
17-
config.static_cache_control = 'public, max-age=3600'
15+
# Configure public file server for tests with Cache-Control for performance.
16+
config.public_file_server.enabled = true
17+
config.public_file_server.headers = {
18+
'Cache-Control' => 'public, max-age=3600'
19+
}
1820

1921
# Show full error reports and disable caching.
2022
config.consider_all_requests_local = true

0 commit comments

Comments
 (0)