Commit 795c9d3da98c056bf8b187cd9d47480bc1adb023
1 parent
c57227ce
Exists in
colab
and in
4 other branches
updated to Rails 4.2.0
Showing
12 changed files
with
182 additions
and
93 deletions
Show diff stats
Gemfile
1 | source 'https://rubygems.org' | 1 | source 'https://rubygems.org' |
2 | 2 | ||
3 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | 3 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' |
4 | -gem 'rails', '4.1.8' | 4 | +gem 'rails', '4.2.0' |
5 | 5 | ||
6 | # Use sqlite3 as the database for Active Record | 6 | # Use sqlite3 as the database for Active Record |
7 | gem 'sqlite3' | 7 | gem 'sqlite3' |
8 | 8 | ||
9 | # Use SCSS for stylesheets | 9 | # Use SCSS for stylesheets |
10 | -gem 'sass-rails', '~> 4.0.1' | 10 | +gem 'sass-rails', '~> 5.0.0' |
11 | 11 | ||
12 | # Use Uglifier as compressor for JavaScript assets | 12 | # Use Uglifier as compressor for JavaScript assets |
13 | gem 'uglifier', '>= 1.3.0' | 13 | gem 'uglifier', '>= 1.3.0' |
@@ -16,7 +16,7 @@ gem 'uglifier', '>= 1.3.0' | @@ -16,7 +16,7 @@ gem 'uglifier', '>= 1.3.0' | ||
16 | gem 'coffee-rails', '~> 4.1.0' | 16 | gem 'coffee-rails', '~> 4.1.0' |
17 | 17 | ||
18 | # See https://github.com/sstephenson/execjs#readme for more supported runtimes | 18 | # See https://github.com/sstephenson/execjs#readme for more supported runtimes |
19 | -gem 'therubyracer', :platforms => :ruby | 19 | +gem 'therubyracer', platforms: :ruby |
20 | 20 | ||
21 | # Use jquery as the JavaScript library | 21 | # Use jquery as the JavaScript library |
22 | gem 'jquery-rails' | 22 | gem 'jquery-rails' |
@@ -52,10 +52,10 @@ gem 'colorpicker', '~> 0.0.5' | @@ -52,10 +52,10 @@ gem 'colorpicker', '~> 0.0.5' | ||
52 | gem "dalli", "~> 2.7.0" | 52 | gem "dalli", "~> 2.7.0" |
53 | 53 | ||
54 | # bundle exec rake doc:rails generates the API under doc/api. | 54 | # bundle exec rake doc:rails generates the API under doc/api. |
55 | -gem 'sdoc', require: false | 55 | +gem 'sdoc', '~> 0.4.0', group: :doc |
56 | 56 | ||
57 | -# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring | ||
58 | -gem 'spring', group: :development | 57 | +# Use Rails Html Sanitizer for HTML sanitization |
58 | +gem 'rails-html-sanitizer', '~> 1.0' | ||
59 | 59 | ||
60 | # Sends a email whenever there is a unexpected exception | 60 | # Sends a email whenever there is a unexpected exception |
61 | gem 'exception_notification', '~> 4.0.1' | 61 | gem 'exception_notification', '~> 4.0.1' |
@@ -75,6 +75,15 @@ group :test do | @@ -75,6 +75,15 @@ group :test do | ||
75 | end | 75 | end |
76 | 76 | ||
77 | group :development, :test do | 77 | group :development, :test do |
78 | + # Call 'debugger' anywhere in the code to stop execution and get a debugger console | ||
79 | + gem 'byebug' | ||
80 | + | ||
81 | + # Access an IRB console on exceptions page and /console in development | ||
82 | + gem 'web-console', '~> 2.0.0' | ||
83 | + | ||
84 | + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring | ||
85 | + gem 'spring' | ||
86 | + | ||
78 | # Test framework | 87 | # Test framework |
79 | gem 'rspec-rails', '~> 3.2.0' | 88 | gem 'rspec-rails', '~> 3.2.0' |
80 | 89 | ||
@@ -109,10 +118,7 @@ group :cucumber do | @@ -109,10 +118,7 @@ group :cucumber do | ||
109 | end | 118 | end |
110 | 119 | ||
111 | # Use ActiveModel has_secure_password | 120 | # Use ActiveModel has_secure_password |
112 | -# gem 'bcrypt-ruby', '~> 3.0.0' | 121 | +# gem 'bcrypt', '~> 3.1.7' |
113 | 122 | ||
114 | # Use unicorn as the app server | 123 | # Use unicorn as the app server |
115 | # gem 'unicorn' | 124 | # gem 'unicorn' |
116 | - | ||
117 | -# Use debugger | ||
118 | -# gem 'debugger', group: [:development, :test] |
Gemfile.lock
@@ -12,33 +12,42 @@ GIT | @@ -12,33 +12,42 @@ GIT | ||
12 | GEM | 12 | GEM |
13 | remote: https://rubygems.org/ | 13 | remote: https://rubygems.org/ |
14 | specs: | 14 | specs: |
15 | - actionmailer (4.1.8) | ||
16 | - actionpack (= 4.1.8) | ||
17 | - actionview (= 4.1.8) | 15 | + actionmailer (4.2.0) |
16 | + actionpack (= 4.2.0) | ||
17 | + actionview (= 4.2.0) | ||
18 | + activejob (= 4.2.0) | ||
18 | mail (~> 2.5, >= 2.5.4) | 19 | mail (~> 2.5, >= 2.5.4) |
19 | - actionpack (4.1.8) | ||
20 | - actionview (= 4.1.8) | ||
21 | - activesupport (= 4.1.8) | ||
22 | - rack (~> 1.5.2) | 20 | + rails-dom-testing (~> 1.0, >= 1.0.5) |
21 | + actionpack (4.2.0) | ||
22 | + actionview (= 4.2.0) | ||
23 | + activesupport (= 4.2.0) | ||
24 | + rack (~> 1.6.0) | ||
23 | rack-test (~> 0.6.2) | 25 | rack-test (~> 0.6.2) |
24 | - actionview (4.1.8) | ||
25 | - activesupport (= 4.1.8) | 26 | + rails-dom-testing (~> 1.0, >= 1.0.5) |
27 | + rails-html-sanitizer (~> 1.0, >= 1.0.1) | ||
28 | + actionview (4.2.0) | ||
29 | + activesupport (= 4.2.0) | ||
26 | builder (~> 3.1) | 30 | builder (~> 3.1) |
27 | erubis (~> 2.7.0) | 31 | erubis (~> 2.7.0) |
28 | - activemodel (4.1.8) | ||
29 | - activesupport (= 4.1.8) | 32 | + rails-dom-testing (~> 1.0, >= 1.0.5) |
33 | + rails-html-sanitizer (~> 1.0, >= 1.0.1) | ||
34 | + activejob (4.2.0) | ||
35 | + activesupport (= 4.2.0) | ||
36 | + globalid (>= 0.3.0) | ||
37 | + activemodel (4.2.0) | ||
38 | + activesupport (= 4.2.0) | ||
30 | builder (~> 3.1) | 39 | builder (~> 3.1) |
31 | - activerecord (4.1.8) | ||
32 | - activemodel (= 4.1.8) | ||
33 | - activesupport (= 4.1.8) | ||
34 | - arel (~> 5.0.0) | ||
35 | - activesupport (4.1.8) | ||
36 | - i18n (~> 0.6, >= 0.6.9) | 40 | + activerecord (4.2.0) |
41 | + activemodel (= 4.2.0) | ||
42 | + activesupport (= 4.2.0) | ||
43 | + arel (~> 6.0) | ||
44 | + activesupport (4.2.0) | ||
45 | + i18n (~> 0.7) | ||
37 | json (~> 1.7, >= 1.7.7) | 46 | json (~> 1.7, >= 1.7.7) |
38 | minitest (~> 5.1) | 47 | minitest (~> 5.1) |
39 | - thread_safe (~> 0.1) | 48 | + thread_safe (~> 0.3, >= 0.3.4) |
40 | tzinfo (~> 1.1) | 49 | tzinfo (~> 1.1) |
41 | - arel (5.0.1.20140414130214) | 50 | + arel (6.0.0) |
42 | bcrypt (3.1.10) | 51 | bcrypt (3.1.10) |
43 | better_errors (2.1.1) | 52 | better_errors (2.1.1) |
44 | coderay (>= 1.0.0) | 53 | coderay (>= 1.0.0) |
@@ -47,6 +56,10 @@ GEM | @@ -47,6 +56,10 @@ GEM | ||
47 | binding_of_caller (0.7.2) | 56 | binding_of_caller (0.7.2) |
48 | debug_inspector (>= 0.0.1) | 57 | debug_inspector (>= 0.0.1) |
49 | builder (3.2.2) | 58 | builder (3.2.2) |
59 | + byebug (3.5.1) | ||
60 | + columnize (~> 0.8) | ||
61 | + debugger-linecache (~> 1.2) | ||
62 | + slop (~> 3.6) | ||
50 | capistrano (3.3.5) | 63 | capistrano (3.3.5) |
51 | capistrano-stats (~> 1.1.0) | 64 | capistrano-stats (~> 1.1.0) |
52 | i18n | 65 | i18n |
@@ -81,6 +94,7 @@ GEM | @@ -81,6 +94,7 @@ GEM | ||
81 | coffee-script-source (1.9.0) | 94 | coffee-script-source (1.9.0) |
82 | colorize (0.7.5) | 95 | colorize (0.7.5) |
83 | colorpicker (0.0.5) | 96 | colorpicker (0.0.5) |
97 | + columnize (0.9.0) | ||
84 | commonjs (0.2.7) | 98 | commonjs (0.2.7) |
85 | coveralls (0.7.9) | 99 | coveralls (0.7.9) |
86 | multi_json (~> 1.10) | 100 | multi_json (~> 1.10) |
@@ -103,6 +117,7 @@ GEM | @@ -103,6 +117,7 @@ GEM | ||
103 | dalli (2.7.2) | 117 | dalli (2.7.2) |
104 | database_cleaner (1.3.0) | 118 | database_cleaner (1.3.0) |
105 | debug_inspector (0.0.2) | 119 | debug_inspector (0.0.2) |
120 | + debugger-linecache (1.2.0) | ||
106 | devise (3.4.1) | 121 | devise (3.4.1) |
107 | bcrypt (~> 3.0) | 122 | bcrypt (~> 3.0) |
108 | orm_adapter (~> 0.1) | 123 | orm_adapter (~> 0.1) |
@@ -128,14 +143,17 @@ GEM | @@ -128,14 +143,17 @@ GEM | ||
128 | faraday (>= 0.7.4, < 0.10) | 143 | faraday (>= 0.7.4, < 0.10) |
129 | gherkin (2.12.2) | 144 | gherkin (2.12.2) |
130 | multi_json (~> 1.3) | 145 | multi_json (~> 1.3) |
146 | + globalid (0.3.2) | ||
147 | + activesupport (>= 4.1.0) | ||
131 | google-analytics-rails (0.0.6) | 148 | google-analytics-rails (0.0.6) |
132 | hike (1.2.3) | 149 | hike (1.2.3) |
133 | i18n (0.7.0) | 150 | i18n (0.7.0) |
134 | jbuilder (2.2.6) | 151 | jbuilder (2.2.6) |
135 | activesupport (>= 3.0.0, < 5) | 152 | activesupport (>= 3.0.0, < 5) |
136 | multi_json (~> 1.2) | 153 | multi_json (~> 1.2) |
137 | - jquery-rails (3.1.2) | ||
138 | - railties (>= 3.0, < 5.0) | 154 | + jquery-rails (4.0.3) |
155 | + rails-dom-testing (~> 1.0) | ||
156 | + railties (>= 4.2.0) | ||
139 | thor (>= 0.14, < 2.0) | 157 | thor (>= 0.14, < 2.0) |
140 | jquery-ui-rails (5.0.3) | 158 | jquery-ui-rails (5.0.3) |
141 | railties (>= 3.2.16) | 159 | railties (>= 3.2.16) |
@@ -155,6 +173,8 @@ GEM | @@ -155,6 +173,8 @@ GEM | ||
155 | actionpack (>= 3.1) | 173 | actionpack (>= 3.1) |
156 | less (~> 2.6.0) | 174 | less (~> 2.6.0) |
157 | libv8 (3.16.14.7) | 175 | libv8 (3.16.14.7) |
176 | + loofah (2.0.1) | ||
177 | + nokogiri (>= 1.5.9) | ||
158 | mail (2.6.3) | 178 | mail (2.6.3) |
159 | mime-types (>= 1.16, < 3) | 179 | mime-types (>= 1.16, < 3) |
160 | metaclass (0.0.4) | 180 | metaclass (0.0.4) |
@@ -179,30 +199,39 @@ GEM | @@ -179,30 +199,39 @@ GEM | ||
179 | cliver (~> 0.3.1) | 199 | cliver (~> 0.3.1) |
180 | multi_json (~> 1.0) | 200 | multi_json (~> 1.0) |
181 | websocket-driver (>= 0.2.0) | 201 | websocket-driver (>= 0.2.0) |
182 | - rack (1.5.2) | 202 | + rack (1.6.0) |
183 | rack-test (0.6.3) | 203 | rack-test (0.6.3) |
184 | rack (>= 1.0) | 204 | rack (>= 1.0) |
185 | - rails (4.1.8) | ||
186 | - actionmailer (= 4.1.8) | ||
187 | - actionpack (= 4.1.8) | ||
188 | - actionview (= 4.1.8) | ||
189 | - activemodel (= 4.1.8) | ||
190 | - activerecord (= 4.1.8) | ||
191 | - activesupport (= 4.1.8) | 205 | + rails (4.2.0) |
206 | + actionmailer (= 4.2.0) | ||
207 | + actionpack (= 4.2.0) | ||
208 | + actionview (= 4.2.0) | ||
209 | + activejob (= 4.2.0) | ||
210 | + activemodel (= 4.2.0) | ||
211 | + activerecord (= 4.2.0) | ||
212 | + activesupport (= 4.2.0) | ||
192 | bundler (>= 1.3.0, < 2.0) | 213 | bundler (>= 1.3.0, < 2.0) |
193 | - railties (= 4.1.8) | ||
194 | - sprockets-rails (~> 2.0) | ||
195 | - railties (4.1.8) | ||
196 | - actionpack (= 4.1.8) | ||
197 | - activesupport (= 4.1.8) | 214 | + railties (= 4.2.0) |
215 | + sprockets-rails | ||
216 | + rails-deprecated_sanitizer (1.0.3) | ||
217 | + activesupport (>= 4.2.0.alpha) | ||
218 | + rails-dom-testing (1.0.5) | ||
219 | + activesupport (>= 4.2.0.beta, < 5.0) | ||
220 | + nokogiri (~> 1.6.0) | ||
221 | + rails-deprecated_sanitizer (>= 1.0.1) | ||
222 | + rails-html-sanitizer (1.0.1) | ||
223 | + loofah (~> 2.0) | ||
224 | + railties (4.2.0) | ||
225 | + actionpack (= 4.2.0) | ||
226 | + activesupport (= 4.2.0) | ||
198 | rake (>= 0.8.7) | 227 | rake (>= 0.8.7) |
199 | thor (>= 0.18.1, < 2.0) | 228 | thor (>= 0.18.1, < 2.0) |
200 | rake (10.4.2) | 229 | rake (10.4.2) |
201 | rdoc (4.2.0) | 230 | rdoc (4.2.0) |
202 | json (~> 1.4) | 231 | json (~> 1.4) |
203 | ref (1.0.5) | 232 | ref (1.0.5) |
204 | - responders (1.1.2) | ||
205 | - railties (>= 3.2, < 4.2) | 233 | + responders (2.1.0) |
234 | + railties (>= 4.2.0, < 5) | ||
206 | rest-client (1.7.2) | 235 | rest-client (1.7.2) |
207 | mime-types (>= 1.16, < 3.0) | 236 | mime-types (>= 1.16, < 3.0) |
208 | netrc (~> 0.7) | 237 | netrc (~> 0.7) |
@@ -223,12 +252,13 @@ GEM | @@ -223,12 +252,13 @@ GEM | ||
223 | rspec-mocks (~> 3.2.0) | 252 | rspec-mocks (~> 3.2.0) |
224 | rspec-support (~> 3.2.0) | 253 | rspec-support (~> 3.2.0) |
225 | rspec-support (3.2.1) | 254 | rspec-support (3.2.1) |
226 | - sass (3.2.19) | ||
227 | - sass-rails (4.0.5) | 255 | + sass (3.4.11) |
256 | + sass-rails (5.0.1) | ||
228 | railties (>= 4.0.0, < 5.0) | 257 | railties (>= 4.0.0, < 5.0) |
229 | - sass (~> 3.2.2) | ||
230 | - sprockets (~> 2.8, < 3.0) | ||
231 | - sprockets-rails (~> 2.0) | 258 | + sass (~> 3.1) |
259 | + sprockets (>= 2.8, < 4.0) | ||
260 | + sprockets-rails (>= 2.0, < 4.0) | ||
261 | + tilt (~> 1.1) | ||
232 | sdoc (0.4.1) | 262 | sdoc (0.4.1) |
233 | json (~> 1.7, >= 1.7.7) | 263 | json (~> 1.7, >= 1.7.7) |
234 | rdoc (~> 4.0) | 264 | rdoc (~> 4.0) |
@@ -239,6 +269,7 @@ GEM | @@ -239,6 +269,7 @@ GEM | ||
239 | multi_json (~> 1.0) | 269 | multi_json (~> 1.0) |
240 | simplecov-html (~> 0.8.0) | 270 | simplecov-html (~> 0.8.0) |
241 | simplecov-html (0.8.0) | 271 | simplecov-html (0.8.0) |
272 | + slop (3.6.0) | ||
242 | spring (1.3.1) | 273 | spring (1.3.1) |
243 | sprockets (2.12.3) | 274 | sprockets (2.12.3) |
244 | hike (~> 1.2) | 275 | hike (~> 1.2) |
@@ -272,6 +303,11 @@ GEM | @@ -272,6 +303,11 @@ GEM | ||
272 | json (>= 1.8.0) | 303 | json (>= 1.8.0) |
273 | warden (1.2.3) | 304 | warden (1.2.3) |
274 | rack (>= 1.0) | 305 | rack (>= 1.0) |
306 | + web-console (2.0.0) | ||
307 | + activemodel (~> 4.0) | ||
308 | + binding_of_caller (>= 0.7.2) | ||
309 | + railties (~> 4.0) | ||
310 | + sprockets-rails (>= 2.0, < 4.0) | ||
275 | websocket-driver (0.5.1) | 311 | websocket-driver (0.5.1) |
276 | websocket-extensions (>= 0.1.0) | 312 | websocket-extensions (>= 0.1.0) |
277 | websocket-extensions (0.1.1) | 313 | websocket-extensions (0.1.1) |
@@ -284,6 +320,7 @@ PLATFORMS | @@ -284,6 +320,7 @@ PLATFORMS | ||
284 | DEPENDENCIES | 320 | DEPENDENCIES |
285 | better_errors | 321 | better_errors |
286 | binding_of_caller | 322 | binding_of_caller |
323 | + byebug | ||
287 | capistrano (~> 3.3.3) | 324 | capistrano (~> 3.3.3) |
288 | capistrano-bundler | 325 | capistrano-bundler |
289 | capistrano-rails | 326 | capistrano-rails |
@@ -307,10 +344,11 @@ DEPENDENCIES | @@ -307,10 +344,11 @@ DEPENDENCIES | ||
307 | mocha | 344 | mocha |
308 | pg (~> 0.18.1) | 345 | pg (~> 0.18.1) |
309 | poltergeist (~> 1.6.0) | 346 | poltergeist (~> 1.6.0) |
310 | - rails (= 4.1.8) | 347 | + rails (= 4.2.0) |
348 | + rails-html-sanitizer (~> 1.0) | ||
311 | rspec-rails (~> 3.2.0) | 349 | rspec-rails (~> 3.2.0) |
312 | - sass-rails (~> 4.0.1) | ||
313 | - sdoc | 350 | + sass-rails (~> 5.0.0) |
351 | + sdoc (~> 0.4.0) | ||
314 | shoulda-matchers (~> 2.8.0) | 352 | shoulda-matchers (~> 2.8.0) |
315 | simplecov | 353 | simplecov |
316 | spring | 354 | spring |
@@ -319,3 +357,4 @@ DEPENDENCIES | @@ -319,3 +357,4 @@ DEPENDENCIES | ||
319 | turbolinks | 357 | turbolinks |
320 | twitter-bootstrap-rails! | 358 | twitter-bootstrap-rails! |
321 | uglifier (>= 1.3.0) | 359 | uglifier (>= 1.3.0) |
360 | + web-console (~> 2.0.0) |
@@ -0,0 +1,29 @@ | @@ -0,0 +1,29 @@ | ||
1 | +#!/usr/bin/env ruby | ||
2 | +require 'pathname' | ||
3 | + | ||
4 | +# path to your application root. | ||
5 | +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) | ||
6 | + | ||
7 | +Dir.chdir APP_ROOT do | ||
8 | + # This script is a starting point to setup your application. | ||
9 | + # Add necessary setup steps to this file: | ||
10 | + | ||
11 | + puts "== Installing dependencies ==" | ||
12 | + system "gem install bundler --conservative" | ||
13 | + system "bundle check || bundle install" | ||
14 | + | ||
15 | + # puts "\n== Copying sample files ==" | ||
16 | + # unless File.exist?("config/database.yml") | ||
17 | + # system "cp config/database.yml.sample config/database.yml" | ||
18 | + # end | ||
19 | + | ||
20 | + puts "\n== Preparing database ==" | ||
21 | + system "bin/rake db:setup" | ||
22 | + | ||
23 | + puts "\n== Removing old logs and tempfiles ==" | ||
24 | + system "rm -f log/*" | ||
25 | + system "rm -rf tmp/cache" | ||
26 | + | ||
27 | + puts "\n== Restarting application server ==" | ||
28 | + system "touch tmp/restart.txt" | ||
29 | +end | ||
0 | \ No newline at end of file | 30 | \ No newline at end of file |
config/application.rb
@@ -20,5 +20,8 @@ module Mezuro | @@ -20,5 +20,8 @@ module Mezuro | ||
20 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] | 20 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] |
21 | # config.i18n.default_locale = :de | 21 | # config.i18n.default_locale = :de |
22 | config.i18n.enforce_available_locales = true | 22 | config.i18n.enforce_available_locales = true |
23 | + | ||
24 | + # For not swallow errors in after_commit/after_rollback callbacks. | ||
25 | + config.active_record.raise_in_transactional_callbacks = true | ||
23 | end | 26 | end |
24 | end | 27 | end |
config/boot.rb
1 | # Set up gems listed in the Gemfile. | 1 | # Set up gems listed in the Gemfile. |
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) | 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) |
3 | 3 | ||
4 | -require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) | 4 | +require 'bundler/setup' # Set up gems listed in the Gemfile |
config/database.yml.sample
1 | -development: | 1 | +# |
2 | +# Ensure the SQLite 3 gem is defined in your Gemfile | ||
3 | +# gem 'sqlite3' | ||
4 | +# | ||
5 | +default: &default | ||
2 | adapter: sqlite3 | 6 | adapter: sqlite3 |
3 | - database: db/development.sqlite3 | ||
4 | pool: 5 | 7 | pool: 5 |
5 | timeout: 5000 | 8 | timeout: 5000 |
9 | +development: | ||
10 | + <<: *default | ||
11 | + database: db/development.sqlite3 | ||
6 | 12 | ||
7 | test: &test | 13 | test: &test |
8 | - adapter: sqlite3 | 14 | + <<: *default |
9 | database: db/test.sqlite3 | 15 | database: db/test.sqlite3 |
10 | - pool: 5 | ||
11 | - timeout: 5000 | ||
12 | 16 | ||
13 | production: | 17 | production: |
14 | - adapter: sqlite3 | 18 | + <<: *default |
15 | database: db/production.sqlite3 | 19 | database: db/production.sqlite3 |
16 | - pool: 5 | ||
17 | - timeout: 5000 | ||
18 | 20 | ||
19 | cucumber: | 21 | cucumber: |
20 | <<: *test | 22 | <<: *test |
config/environment.rb
1 | -# Load the Rails application | 1 | +# Load the Rails application. |
2 | require File.expand_path('../application', __FILE__) | 2 | require File.expand_path('../application', __FILE__) |
3 | 3 | ||
4 | -# Initialize the Rails application | 4 | +# Initialize the Rails application. |
5 | Rails.application.initialize! | 5 | Rails.application.initialize! |
config/environments/development.rb
1 | Rails.application.configure do | 1 | Rails.application.configure do |
2 | - # Settings specified here will take precedence over those in config/application.rb | 2 | + # Settings specified here will take precedence over those in config/application.rb. |
3 | 3 | ||
4 | # In the development environment your application's code is reloaded on | 4 | # In the development environment your application's code is reloaded on |
5 | # every request. This slows down response time but is perfect for development | 5 | # every request. This slows down response time but is perfect for development |
@@ -9,17 +9,17 @@ Rails.application.configure do | @@ -9,17 +9,17 @@ Rails.application.configure do | ||
9 | # Do not eager load code on boot. | 9 | # Do not eager load code on boot. |
10 | config.eager_load = false | 10 | config.eager_load = false |
11 | 11 | ||
12 | - # Show full error reports and disable caching | 12 | + # Show full error reports and disable caching. |
13 | config.consider_all_requests_local = true | 13 | config.consider_all_requests_local = true |
14 | config.action_controller.perform_caching = false | 14 | config.action_controller.perform_caching = false |
15 | 15 | ||
16 | - # Don't care if the mailer can't send | 16 | + # Don't care if the mailer can't send. |
17 | config.action_mailer.raise_delivery_errors = false | 17 | config.action_mailer.raise_delivery_errors = false |
18 | 18 | ||
19 | - # Print deprecation notices to the Rails logger | 19 | + # Print deprecation notices to the Rails logger. |
20 | config.active_support.deprecation = :log | 20 | config.active_support.deprecation = :log |
21 | 21 | ||
22 | - # Raise an error on page load if there are pending migrations | 22 | + # Raise an error on page load if there are pending migrations. |
23 | config.active_record.migration_error = :page_load | 23 | config.active_record.migration_error = :page_load |
24 | 24 | ||
25 | # Debug mode disables concatenation and preprocessing of assets. | 25 | # Debug mode disables concatenation and preprocessing of assets. |
@@ -27,6 +27,10 @@ Rails.application.configure do | @@ -27,6 +27,10 @@ Rails.application.configure do | ||
27 | # number of complex assets. | 27 | # number of complex assets. |
28 | config.assets.debug = true | 28 | config.assets.debug = true |
29 | 29 | ||
30 | + # Asset digests allow you to set far-future HTTP expiration dates on all assets, | ||
31 | + # yet still be able to expire them through the digest params. | ||
32 | + config.assets.digest = true | ||
33 | + | ||
30 | #Root URL for ActionMailer | 34 | #Root URL for ActionMailer |
31 | config.action_mailer.default_url_options = { :host => 'localhost:3000' } | 35 | config.action_mailer.default_url_options = { :host => 'localhost:3000' } |
32 | 36 |
config/environments/production.rb
@@ -5,7 +5,7 @@ Rails.application.configure do | @@ -5,7 +5,7 @@ Rails.application.configure do | ||
5 | config.cache_classes = true | 5 | config.cache_classes = true |
6 | 6 | ||
7 | # Eager load code on boot. This eager loads most of Rails and | 7 | # Eager load code on boot. This eager loads most of Rails and |
8 | - # your application in memory, allowing both thread web servers | 8 | + # your application in memory, allowing both threaded web servers |
9 | # and those relying on copy on write to perform better. | 9 | # and those relying on copy on write to perform better. |
10 | # Rake tasks automatically ignore this option for performance. | 10 | # Rake tasks automatically ignore this option for performance. |
11 | config.eager_load = true | 11 | config.eager_load = true |
@@ -16,11 +16,11 @@ Rails.application.configure do | @@ -16,11 +16,11 @@ Rails.application.configure do | ||
16 | 16 | ||
17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application | 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. | 18 | # Add `rack-cache` to your Gemfile before enabling this. |
19 | - # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. | 19 | + # For large-scale production use, consider using a caching reverse proxy like NGINX, varnish or squid. |
20 | # config.action_dispatch.rack_cache = true | 20 | # config.action_dispatch.rack_cache = true |
21 | 21 | ||
22 | - # Disable Rails's static asset server (Apache or nginx will already do this). | ||
23 | - config.serve_static_assets = false | 22 | + # Disable Rails's static asset server (Apache or NGINX will already do this). |
23 | + config.serve_static_files = false | ||
24 | 24 | ||
25 | # Compress JavaScripts and CSS. | 25 | # Compress JavaScripts and CSS. |
26 | config.assets.js_compressor = :uglifier | 26 | config.assets.js_compressor = :uglifier |
@@ -36,14 +36,14 @@ Rails.application.configure do | @@ -36,14 +36,14 @@ Rails.application.configure do | ||
36 | config.assets.version = '1.0' | 36 | config.assets.version = '1.0' |
37 | 37 | ||
38 | # Specifies the header that your server uses for sending files. | 38 | # Specifies the header that your server uses for sending files. |
39 | - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache | ||
40 | - config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx | 39 | + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache |
40 | + config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX | ||
41 | 41 | ||
42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. | 42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
43 | # config.force_ssl = true | 43 | # config.force_ssl = true |
44 | 44 | ||
45 | - # Set to :debug to see everything in the log. | ||
46 | - config.log_level = :info | 45 | + # Decrease the log volume. |
46 | + # config.log_level = :info | ||
47 | 47 | ||
48 | # Prepend all log lines with the following tags. | 48 | # Prepend all log lines with the following tags. |
49 | # config.log_tags = [ :subdomain, :uuid ] | 49 | # config.log_tags = [ :subdomain, :uuid ] |
@@ -57,10 +57,6 @@ Rails.application.configure do | @@ -57,10 +57,6 @@ Rails.application.configure do | ||
57 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. | 57 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
58 | # config.action_controller.asset_host = "http://assets.example.com" | 58 | # config.action_controller.asset_host = "http://assets.example.com" |
59 | 59 | ||
60 | - # Precompile additional assets. | ||
61 | - # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. | ||
62 | - # config.assets.precompile += %w( search.js ) | ||
63 | - | ||
64 | # Ignore bad email addresses and do not raise email delivery errors. | 60 | # Ignore bad email addresses and do not raise email delivery errors. |
65 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. | 61 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. |
66 | # config.action_mailer.raise_delivery_errors = false | 62 | # config.action_mailer.raise_delivery_errors = false |
@@ -72,9 +68,6 @@ Rails.application.configure do | @@ -72,9 +68,6 @@ Rails.application.configure do | ||
72 | # Send deprecation notices to registered listeners. | 68 | # Send deprecation notices to registered listeners. |
73 | config.active_support.deprecation = :notify | 69 | config.active_support.deprecation = :notify |
74 | 70 | ||
75 | - # Disable automatic flushing of the log to improve performance. | ||
76 | - # config.autoflush_log = false | ||
77 | - | ||
78 | # Use default logging formatter so that PID and timestamp are not suppressed. | 71 | # Use default logging formatter so that PID and timestamp are not suppressed. |
79 | config.log_formatter = ::Logger::Formatter.new | 72 | config.log_formatter = ::Logger::Formatter.new |
80 | 73 |
config/environments/test.rb
1 | Rails.application.configure do | 1 | Rails.application.configure do |
2 | - # Settings specified here will take precedence over those in config/application.rb | 2 | + # Settings specified here will take precedence over those in config/application.rb. |
3 | 3 | ||
4 | # The test environment is used exclusively to run your application's | 4 | # The test environment is used exclusively to run your application's |
5 | # test suite. You never need to work with it otherwise. Remember that | 5 | # test suite. You never need to work with it otherwise. Remember that |
@@ -13,17 +13,17 @@ Rails.application.configure do | @@ -13,17 +13,17 @@ Rails.application.configure do | ||
13 | config.eager_load = false | 13 | config.eager_load = false |
14 | 14 | ||
15 | # Configure static asset server for tests with Cache-Control for performance. | 15 | # Configure static asset server for tests with Cache-Control for performance. |
16 | - config.serve_static_assets = true | ||
17 | - config.static_cache_control = "public, max-age=3600" | 16 | + config.serve_static_files = true |
17 | + config.static_cache_control = 'public, max-age=3600' | ||
18 | 18 | ||
19 | - # Show full error reports and disable caching | 19 | + # Show full error reports and disable caching. |
20 | config.consider_all_requests_local = true | 20 | config.consider_all_requests_local = true |
21 | config.action_controller.perform_caching = false | 21 | config.action_controller.perform_caching = false |
22 | 22 | ||
23 | - # Raise exceptions instead of rendering exception templates | 23 | + # Raise exceptions instead of rendering exception templates. |
24 | config.action_dispatch.show_exceptions = false | 24 | config.action_dispatch.show_exceptions = false |
25 | 25 | ||
26 | - # Disable request forgery protection in test environment | 26 | + # Disable request forgery protection in test environment. |
27 | config.action_controller.allow_forgery_protection = false | 27 | config.action_controller.allow_forgery_protection = false |
28 | 28 | ||
29 | # Tell Action Mailer not to deliver emails to the real world. | 29 | # Tell Action Mailer not to deliver emails to the real world. |
@@ -31,7 +31,10 @@ Rails.application.configure do | @@ -31,7 +31,10 @@ Rails.application.configure do | ||
31 | # ActionMailer::Base.deliveries array. | 31 | # ActionMailer::Base.deliveries array. |
32 | config.action_mailer.delivery_method = :test | 32 | config.action_mailer.delivery_method = :test |
33 | 33 | ||
34 | - # Print deprecation notices to the stderr | 34 | + # Randomize the order test cases are executed |
35 | + config.active_support.test_order = :random | ||
36 | + | ||
37 | + # Print deprecation notices to the stderr. | ||
35 | config.active_support.deprecation = :stderr | 38 | config.active_support.deprecation = :stderr |
36 | 39 | ||
37 | #Root URL for ActionMailer | 40 | #Root URL for ActionMailer |
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +# Be sure to restart your server when you modify this file. | ||
2 | + | ||
3 | +# Version of your assets, change this if you want to expire all your assets. | ||
4 | +Rails.application.config.assets.version = '1.0' | ||
5 | + | ||
6 | +# Add additional assets to the asset load path | ||
7 | +# Rails.application.config.assets.paths << Emoji.images_path | ||
8 | + | ||
9 | +# Precompile additional assets. | ||
10 | +# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. | ||
11 | +# Rails.application.config.assets.precompile += %w( search.js ) | ||
0 | \ No newline at end of file | 12 | \ No newline at end of file |
config/initializers/mime_types.rb