Commit 3bc66471053f96dc9e781326c63aa70a474ed328

Authored by Diego Camarinha
2 parents ad2ad84e e3608848

Merge pull request #173 from mezuro/update_gems

Update gems
.ruby-version
1   -ruby-2.1.5
  1 +ruby-2.2.0
... ...
.travis.yml
1 1 language: ruby
2 2 rvm:
3   - - 2.1.5
  3 + - 2.2.0
4 4  
5 5 before_script:
6 6 - git clone https://gist.github.com/6179925.git -b v2.0 kalibro_install
... ...
Gemfile
1 1 source 'https://rubygems.org'
2 2  
3 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 6 # Use sqlite3 as the database for Active Record
7 7 gem 'sqlite3'
8 8  
9 9 # Use SCSS for stylesheets
10   -gem 'sass-rails', '~> 4.0.1'
  10 +gem 'sass-rails', '~> 5.0.0'
11 11  
12 12 # Use Uglifier as compressor for JavaScript assets
13 13 gem 'uglifier', '>= 1.3.0'
... ... @@ -16,7 +16,7 @@ gem 'uglifier', '>= 1.3.0'
16 16 gem 'coffee-rails', '~> 4.1.0'
17 17  
18 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 21 # Use jquery as the JavaScript library
22 22 gem 'jquery-rails'
... ... @@ -34,7 +34,7 @@ gem 'devise', '~> 3.4.0'
34 34 gem 'kalibro_client'
35 35  
36 36 # PostgreSQL integration
37   -gem "pg", "~> 0.17.0"
  37 +gem "pg", "~> 0.18.1"
38 38  
39 39 # Twitter Bootstrap for layout
40 40 gem 'twitter-bootstrap-rails', :git => 'https://github.com/seyhunak/twitter-bootstrap-rails.git'
... ... @@ -52,10 +52,10 @@ gem 'colorpicker', '~> 0.0.5'
52 52 gem "dalli", "~> 2.7.0"
53 53  
54 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 60 # Sends a email whenever there is a unexpected exception
61 61 gem 'exception_notification', '~> 4.0.1'
... ... @@ -65,7 +65,7 @@ gem 'google-analytics-rails', '~> 0.0.6'
65 65  
66 66 group :test do
67 67 # Easier test writing
68   - gem "shoulda-matchers", '~> 2.7.0'
  68 + gem "shoulda-matchers", '~> 2.8.0'
69 69  
70 70 # Test coverage
71 71 gem 'simplecov', require: false
... ... @@ -75,8 +75,17 @@ group :test do
75 75 end
76 76  
77 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 87 # Test framework
79   - gem 'rspec-rails', '~> 3.1.0'
  88 + gem 'rspec-rails', '~> 3.2.0'
80 89  
81 90 # Fixtures made easy
82 91 gem 'factory_girl_rails', '~> 4.5.0'
... ... @@ -101,15 +110,15 @@ end
101 110 # Acceptance tests
102 111 group :cucumber do
103 112 gem 'cucumber-rails', '~> 1.4.0'
104   - gem 'database_cleaner'
105   - gem 'poltergeist', '~> 1.5.0'
  113 + # cleans the database
  114 + # Version fixed at 1.3. See:
  115 + # https://github.com/DatabaseCleaner/database_cleaner/issues/317
  116 + gem 'database_cleaner', '~> 1.3.0'
  117 + gem 'poltergeist', '~> 1.6.0'
106 118 end
107 119  
108 120 # Use ActiveModel has_secure_password
109   -# gem 'bcrypt-ruby', '~> 3.0.0'
  121 +# gem 'bcrypt', '~> 3.1.7'
110 122  
111 123 # Use unicorn as the app server
112 124 # gem 'unicorn'
113   -
114   -# Use debugger
115   -# gem 'debugger', group: [:development, :test]
... ...
Gemfile.lock
1 1 GIT
2 2 remote: https://github.com/seyhunak/twitter-bootstrap-rails.git
3   - revision: 67f160dd2ff5cc7cd843a17866c3b6bc8e7f2794
  3 + revision: 62854e5129e1a5a24589b3a3849235ca4b794e6f
4 4 specs:
5   - twitter-bootstrap-rails (3.2.0)
  5 + twitter-bootstrap-rails (3.2.1)
6 6 actionpack (>= 3.1)
7   - execjs
  7 + execjs (>= 2.2.2, >= 2.2)
  8 + less-rails (>= 2.5.0)
8 9 rails (>= 3.1)
9 10 railties (>= 3.1)
10 11  
11 12 GEM
12 13 remote: https://rubygems.org/
13 14 specs:
14   - actionmailer (4.1.8)
15   - actionpack (= 4.1.8)
16   - actionview (= 4.1.8)
  15 + actionmailer (4.2.0)
  16 + actionpack (= 4.2.0)
  17 + actionview (= 4.2.0)
  18 + activejob (= 4.2.0)
17 19 mail (~> 2.5, >= 2.5.4)
18   - actionpack (4.1.8)
19   - actionview (= 4.1.8)
20   - activesupport (= 4.1.8)
21   - 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)
22 25 rack-test (~> 0.6.2)
23   - actionview (4.1.8)
24   - 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)
25 30 builder (~> 3.1)
26 31 erubis (~> 2.7.0)
27   - activemodel (4.1.8)
28   - 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)
29 39 builder (~> 3.1)
30   - activerecord (4.1.8)
31   - activemodel (= 4.1.8)
32   - activesupport (= 4.1.8)
33   - arel (~> 5.0.0)
34   - activesupport (4.1.8)
35   - 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)
36 46 json (~> 1.7, >= 1.7.7)
37 47 minitest (~> 5.1)
38   - thread_safe (~> 0.1)
  48 + thread_safe (~> 0.3, >= 0.3.4)
39 49 tzinfo (~> 1.1)
40   - arel (5.0.1.20140414130214)
41   - bcrypt (3.1.9)
42   - better_errors (2.0.0)
  50 + arel (6.0.0)
  51 + bcrypt (3.1.10)
  52 + better_errors (2.1.1)
43 53 coderay (>= 1.0.0)
44 54 erubis (>= 2.6.6)
45 55 rack (>= 0.9.0)
46 56 binding_of_caller (0.7.2)
47 57 debug_inspector (>= 0.0.1)
48 58 builder (3.2.2)
  59 + byebug (3.5.1)
  60 + columnize (~> 0.8)
  61 + debugger-linecache (~> 1.2)
  62 + slop (~> 3.6)
49 63 capistrano (3.3.5)
50 64 capistrano-stats (~> 1.1.0)
51 65 i18n
52 66 rake (>= 10.0.0)
53 67 sshkit (~> 1.3)
54   - capistrano-bundler (1.1.3)
  68 + capistrano-bundler (1.1.4)
55 69 capistrano (~> 3.1)
56 70 sshkit (~> 1.2)
57 71 capistrano-rails (1.1.2)
... ... @@ -67,7 +81,7 @@ GEM
67 81 rack (>= 1.0.0)
68 82 rack-test (>= 0.5.4)
69 83 xpath (~> 2.0)
70   - chart-js-rails (0.0.7)
  84 + chart-js-rails (0.0.8)
71 85 railties (> 3.1)
72 86 cliver (0.3.2)
73 87 coderay (1.1.0)
... ... @@ -77,16 +91,18 @@ GEM
77 91 coffee-script (2.3.0)
78 92 coffee-script-source
79 93 execjs
80   - coffee-script-source (1.8.0)
  94 + coffee-script-source (1.9.0)
81 95 colorize (0.7.5)
82 96 colorpicker (0.0.5)
83   - coveralls (0.7.1)
84   - multi_json (~> 1.3)
85   - rest-client
86   - simplecov (>= 0.7)
87   - term-ansicolor
88   - thor
89   - cucumber (1.3.17)
  97 + columnize (0.9.0)
  98 + commonjs (0.2.7)
  99 + coveralls (0.7.9)
  100 + multi_json (~> 1.10)
  101 + rest-client (~> 1.7)
  102 + simplecov (~> 0.9.1)
  103 + term-ansicolor (~> 1.3)
  104 + thor (~> 0.19.1)
  105 + cucumber (1.3.18)
90 106 builder (>= 2.1.2)
91 107 diff-lcs (>= 1.1.3)
92 108 gherkin (~> 2.12)
... ... @@ -101,6 +117,7 @@ GEM
101 117 dalli (2.7.2)
102 118 database_cleaner (1.3.0)
103 119 debug_inspector (0.0.2)
  120 + debugger-linecache (1.2.0)
104 121 devise (3.4.1)
105 122 bcrypt (~> 3.0)
106 123 orm_adapter (~> 0.1)
... ... @@ -114,7 +131,7 @@ GEM
114 131 exception_notification (4.0.1)
115 132 actionmailer (>= 3.0.4)
116 133 activesupport (>= 3.0.4)
117   - execjs (2.2.2)
  134 + execjs (2.3.0)
118 135 factory_girl (4.5.0)
119 136 activesupport (>= 3.0.0)
120 137 factory_girl_rails (4.5.0)
... ... @@ -126,14 +143,17 @@ GEM
126 143 faraday (>= 0.7.4, < 0.10)
127 144 gherkin (2.12.2)
128 145 multi_json (~> 1.3)
  146 + globalid (0.3.2)
  147 + activesupport (>= 4.1.0)
129 148 google-analytics-rails (0.0.6)
130 149 hike (1.2.3)
131 150 i18n (0.7.0)
132   - jbuilder (2.2.5)
  151 + jbuilder (2.2.6)
133 152 activesupport (>= 3.0.0, < 5)
134 153 multi_json (~> 1.2)
135   - jquery-rails (3.1.2)
136   - railties (>= 3.0, < 5.0)
  154 + jquery-rails (4.0.3)
  155 + rails-dom-testing (~> 1.0)
  156 + railties (>= 4.2.0)
137 157 thor (>= 0.14, < 2.0)
138 158 jquery-ui-rails (5.0.3)
139 159 railties (>= 3.2.16)
... ... @@ -147,97 +167,116 @@ GEM
147 167 colorize
148 168 railties (>= 3.1, < 5)
149 169 sprockets
  170 + less (2.6.0)
  171 + commonjs (~> 0.2.7)
  172 + less-rails (2.6.0)
  173 + actionpack (>= 3.1)
  174 + less (~> 2.6.0)
150 175 libv8 (3.16.14.7)
  176 + loofah (2.0.1)
  177 + nokogiri (>= 1.5.9)
151 178 mail (2.6.3)
152 179 mime-types (>= 1.16, < 3)
153 180 metaclass (0.0.4)
154 181 mime-types (2.4.3)
155   - mini_portile (0.6.1)
  182 + mini_portile (0.6.2)
156 183 minitest (5.5.1)
157 184 mocha (1.1.0)
158 185 metaclass (~> 0.0.1)
159 186 multi_json (1.10.1)
160   - multi_test (0.1.1)
  187 + multi_test (0.1.2)
161 188 multipart-post (2.0.0)
162 189 net-scp (1.2.1)
163 190 net-ssh (>= 2.6.5)
164   - net-ssh (2.9.1)
165   - netrc (0.10.1)
166   - nokogiri (1.6.5)
  191 + net-ssh (2.9.2)
  192 + netrc (0.10.2)
  193 + nokogiri (1.6.6.2)
167 194 mini_portile (~> 0.6.0)
168 195 orm_adapter (0.5.0)
169   - pg (0.17.1)
170   - poltergeist (1.5.1)
  196 + pg (0.18.1)
  197 + poltergeist (1.6.0)
171 198 capybara (~> 2.1)
172 199 cliver (~> 0.3.1)
173 200 multi_json (~> 1.0)
174 201 websocket-driver (>= 0.2.0)
175   - rack (1.5.2)
176   - rack-test (0.6.2)
  202 + rack (1.6.0)
  203 + rack-test (0.6.3)
177 204 rack (>= 1.0)
178   - rails (4.1.8)
179   - actionmailer (= 4.1.8)
180   - actionpack (= 4.1.8)
181   - actionview (= 4.1.8)
182   - activemodel (= 4.1.8)
183   - activerecord (= 4.1.8)
184   - 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)
185 213 bundler (>= 1.3.0, < 2.0)
186   - railties (= 4.1.8)
187   - sprockets-rails (~> 2.0)
188   - railties (4.1.8)
189   - actionpack (= 4.1.8)
190   - 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)
191 227 rake (>= 0.8.7)
192 228 thor (>= 0.18.1, < 2.0)
193 229 rake (10.4.2)
194 230 rdoc (4.2.0)
195 231 json (~> 1.4)
196 232 ref (1.0.5)
197   - responders (1.1.2)
198   - railties (>= 3.2, < 4.2)
  233 + responders (2.1.0)
  234 + railties (>= 4.2.0, < 5)
199 235 rest-client (1.7.2)
200 236 mime-types (>= 1.16, < 3.0)
201 237 netrc (~> 0.7)
202   - rspec-core (3.1.7)
203   - rspec-support (~> 3.1.0)
204   - rspec-expectations (3.1.2)
  238 + rspec-core (3.2.0)
  239 + rspec-support (~> 3.2.0)
  240 + rspec-expectations (3.2.0)
205 241 diff-lcs (>= 1.2.0, < 2.0)
206   - rspec-support (~> 3.1.0)
207   - rspec-mocks (3.1.3)
208   - rspec-support (~> 3.1.0)
209   - rspec-rails (3.1.0)
210   - actionpack (>= 3.0)
211   - activesupport (>= 3.0)
212   - railties (>= 3.0)
213   - rspec-core (~> 3.1.0)
214   - rspec-expectations (~> 3.1.0)
215   - rspec-mocks (~> 3.1.0)
216   - rspec-support (~> 3.1.0)
217   - rspec-support (3.1.2)
218   - sass (3.2.19)
219   - sass-rails (4.0.5)
  242 + rspec-support (~> 3.2.0)
  243 + rspec-mocks (3.2.0)
  244 + diff-lcs (>= 1.2.0, < 2.0)
  245 + rspec-support (~> 3.2.0)
  246 + rspec-rails (3.2.0)
  247 + actionpack (>= 3.0, <= 4.2)
  248 + activesupport (>= 3.0, <= 4.2)
  249 + railties (>= 3.0, <= 4.2)
  250 + rspec-core (~> 3.2.0)
  251 + rspec-expectations (~> 3.2.0)
  252 + rspec-mocks (~> 3.2.0)
  253 + rspec-support (~> 3.2.0)
  254 + rspec-support (3.2.1)
  255 + sass (3.4.11)
  256 + sass-rails (5.0.1)
220 257 railties (>= 4.0.0, < 5.0)
221   - sass (~> 3.2.2)
222   - sprockets (~> 2.8, < 3.0)
223   - 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)
224 262 sdoc (0.4.1)
225 263 json (~> 1.7, >= 1.7.7)
226 264 rdoc (~> 4.0)
227   - shoulda-matchers (2.7.0)
  265 + shoulda-matchers (2.8.0)
228 266 activesupport (>= 3.0.0)
229 267 simplecov (0.9.1)
230 268 docile (~> 1.1.0)
231 269 multi_json (~> 1.0)
232 270 simplecov-html (~> 0.8.0)
233 271 simplecov-html (0.8.0)
234   - spring (1.2.0)
  272 + slop (3.6.0)
  273 + spring (1.3.1)
235 274 sprockets (2.12.3)
236 275 hike (~> 1.2)
237 276 multi_json (~> 1.0)
238 277 rack (~> 1.0)
239 278 tilt (~> 1.1, != 1.3.0)
240   - sprockets-rails (2.2.2)
  279 + sprockets-rails (2.2.4)
241 280 actionpack (>= 3.0)
242 281 activesupport (>= 3.0)
243 282 sprockets (>= 2.8, < 4.0)
... ... @@ -254,17 +293,22 @@ GEM
254 293 thor (0.19.1)
255 294 thread_safe (0.3.4)
256 295 tilt (1.4.1)
257   - tins (1.3.3)
  296 + tins (1.3.4)
258 297 turbolinks (2.5.3)
259 298 coffee-rails
260 299 tzinfo (1.2.2)
261 300 thread_safe (~> 0.1)
262   - uglifier (2.6.0)
  301 + uglifier (2.7.0)
263 302 execjs (>= 0.3.0)
264 303 json (>= 1.8.0)
265 304 warden (1.2.3)
266 305 rack (>= 1.0)
267   - websocket-driver (0.5.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)
  311 + websocket-driver (0.5.1)
268 312 websocket-extensions (>= 0.1.0)
269 313 websocket-extensions (0.1.1)
270 314 xpath (2.0.0)
... ... @@ -276,6 +320,7 @@ PLATFORMS
276 320 DEPENDENCIES
277 321 better_errors
278 322 binding_of_caller
  323 + byebug
279 324 capistrano (~> 3.3.3)
280 325 capistrano-bundler
281 326 capistrano-rails
... ... @@ -286,7 +331,7 @@ DEPENDENCIES
286 331 coveralls
287 332 cucumber-rails (~> 1.4.0)
288 333 dalli (~> 2.7.0)
289   - database_cleaner
  334 + database_cleaner (~> 1.3.0)
290 335 devise (~> 3.4.0)
291 336 exception_notification (~> 4.0.1)
292 337 factory_girl_rails (~> 4.5.0)
... ... @@ -297,13 +342,14 @@ DEPENDENCIES
297 342 kalibro_client
298 343 konacha (~> 3.3.0)
299 344 mocha
300   - pg (~> 0.17.0)
301   - poltergeist (~> 1.5.0)
302   - rails (= 4.1.8)
303   - rspec-rails (~> 3.1.0)
304   - sass-rails (~> 4.0.1)
305   - sdoc
306   - shoulda-matchers (~> 2.7.0)
  345 + pg (~> 0.18.1)
  346 + poltergeist (~> 1.6.0)
  347 + rails (= 4.2.0)
  348 + rails-html-sanitizer (~> 1.0)
  349 + rspec-rails (~> 3.2.0)
  350 + sass-rails (~> 5.0.0)
  351 + sdoc (~> 0.4.0)
  352 + shoulda-matchers (~> 2.8.0)
307 353 simplecov
308 354 spring
309 355 sqlite3
... ... @@ -311,3 +357,4 @@ DEPENDENCIES
311 357 turbolinks
312 358 twitter-bootstrap-rails!
313 359 uglifier (>= 1.3.0)
  360 + web-console (~> 2.0.0)
... ...
bin/setup 0 → 100644
... ... @@ -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 30 \ No newline at end of file
... ...
config/application.rb
... ... @@ -20,5 +20,8 @@ module Mezuro
20 20 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21 21 # config.i18n.default_locale = :de
22 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 26 end
24 27 end
... ...
config/boot.rb
1 1 # Set up gems listed in the Gemfile.
2 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 6 adapter: sqlite3
3   - database: db/development.sqlite3
4 7 pool: 5
5 8 timeout: 5000
  9 +development:
  10 + <<: *default
  11 + database: db/development.sqlite3
6 12  
7 13 test: &test
8   - adapter: sqlite3
  14 + <<: *default
9 15 database: db/test.sqlite3
10   - pool: 5
11   - timeout: 5000
12 16  
13 17 production:
14   - adapter: sqlite3
  18 + <<: *default
15 19 database: db/production.sqlite3
16   - pool: 5
17   - timeout: 5000
18 20  
19 21 cucumber:
20 22 <<: *test
... ...
config/environment.rb
1   -# Load the Rails application
  1 +# Load the Rails application.
2 2 require File.expand_path('../application', __FILE__)
3 3  
4   -# Initialize the Rails application
  4 +# Initialize the Rails application.
5 5 Rails.application.initialize!
... ...
config/environments/development.rb
1 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 4 # In the development environment your application's code is reloaded on
5 5 # every request. This slows down response time but is perfect for development
... ... @@ -9,17 +9,17 @@ Rails.application.configure do
9 9 # Do not eager load code on boot.
10 10 config.eager_load = false
11 11  
12   - # Show full error reports and disable caching
  12 + # Show full error reports and disable caching.
13 13 config.consider_all_requests_local = true
14 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 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 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 23 config.active_record.migration_error = :page_load
24 24  
25 25 # Debug mode disables concatenation and preprocessing of assets.
... ... @@ -27,6 +27,10 @@ Rails.application.configure do
27 27 # number of complex assets.
28 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 34 #Root URL for ActionMailer
31 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 5 config.cache_classes = true
6 6  
7 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 9 # and those relying on copy on write to perform better.
10 10 # Rake tasks automatically ignore this option for performance.
11 11 config.eager_load = true
... ... @@ -16,11 +16,11 @@ Rails.application.configure do
16 16  
17 17 # Enable Rack::Cache to put a simple HTTP cache in front of your application
18 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 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 25 # Compress JavaScripts and CSS.
26 26 config.assets.js_compressor = :uglifier
... ... @@ -36,14 +36,14 @@ Rails.application.configure do
36 36 config.assets.version = '1.0'
37 37  
38 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 42 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43 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 48 # Prepend all log lines with the following tags.
49 49 # config.log_tags = [ :subdomain, :uuid ]
... ... @@ -57,10 +57,6 @@ Rails.application.configure do
57 57 # Enable serving of images, stylesheets, and JavaScripts from an asset server.
58 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 60 # Ignore bad email addresses and do not raise email delivery errors.
65 61 # Set this to true and configure the email server for immediate delivery to raise delivery errors.
66 62 # config.action_mailer.raise_delivery_errors = false
... ... @@ -72,9 +68,6 @@ Rails.application.configure do
72 68 # Send deprecation notices to registered listeners.
73 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 71 # Use default logging formatter so that PID and timestamp are not suppressed.
79 72 config.log_formatter = ::Logger::Formatter.new
80 73  
... ...
config/environments/test.rb
1 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 4 # The test environment is used exclusively to run your application's
5 5 # test suite. You never need to work with it otherwise. Remember that
... ... @@ -13,17 +13,17 @@ Rails.application.configure do
13 13 config.eager_load = false
14 14  
15 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 20 config.consider_all_requests_local = true
21 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 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 27 config.action_controller.allow_forgery_protection = false
28 28  
29 29 # Tell Action Mailer not to deliver emails to the real world.
... ... @@ -31,7 +31,10 @@ Rails.application.configure do
31 31 # ActionMailer::Base.deliveries array.
32 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 38 config.active_support.deprecation = :stderr
36 39  
37 40 #Root URL for ActionMailer
... ...
config/initializers/assets.rb 0 → 100644
... ... @@ -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 12 \ No newline at end of file
... ...
config/initializers/mime_types.rb
... ... @@ -2,4 +2,3 @@
2 2  
3 3 # Add new mime types for use in respond_to blocks:
4 4 # Mime::Type.register "text/richtext", :rtf
5   -# Mime::Type.register_alias "text/html", :iphone
... ...
spec/controllers/compound_metric_configurations_controller_spec.rb
... ... @@ -111,7 +111,7 @@ describe CompoundMetricConfigurationsController, :type =&gt; :controller do
111 111  
112 112 it { is_expected.to redirect_to(kalibro_configurations_path(kalibro_configuration.id)) }
113 113 it { is_expected.to respond_with(:redirect) }
114   - it { is_expected.to set_the_flash[:notice].to("You're not allowed to do this operation") }
  114 + it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
115 115 end
116 116 end
117 117  
... ...
spec/controllers/kalibro_configurations_controller_spec.rb
... ... @@ -182,7 +182,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do
182 182 end
183 183  
184 184 it { is_expected.to redirect_to(kalibro_configurations_path(@subject.id)) }
185   - it { is_expected.to set_the_flash[:notice].to("You're not allowed to do this operation") }
  185 + it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
186 186 end
187 187 end
188 188  
... ...
spec/controllers/kalibro_ranges_controller_spec.rb
... ... @@ -139,7 +139,7 @@ describe KalibroRangesController, :type =&gt; :controller do
139 139  
140 140 it { is_expected.to redirect_to(kalibro_configurations_url(metric_configuration.kalibro_configuration_id)) }
141 141 it { is_expected.to respond_with(:redirect) }
142   - it { is_expected.to set_the_flash[:notice].to("You're not allowed to do this operation") }
  142 + it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
143 143 end
144 144 end
145 145  
... ...
spec/controllers/metric_configurations_controller_spec.rb
... ... @@ -131,7 +131,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do
131 131  
132 132 it { is_expected.to redirect_to(kalibro_configurations_path(metric_configuration.kalibro_configuration_id)) }
133 133 it { is_expected.to respond_with(:redirect) }
134   - it { is_expected.to set_the_flash[:notice].to("You're not allowed to do this operation") }
  134 + it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
135 135 end
136 136 end
137 137  
... ...
spec/controllers/projects_controller_spec.rb
... ... @@ -190,7 +190,7 @@ describe ProjectsController, :type =&gt; :controller do
190 190 end
191 191  
192 192 it { is_expected.to redirect_to(projects_path) }
193   - it { is_expected.to set_the_flash[:notice].to("You're not allowed to do this operation") }
  193 + it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
194 194 end
195 195 end
196 196  
... ...
spec/controllers/reading_groups_controller_spec.rb
... ... @@ -175,7 +175,7 @@ describe ReadingGroupsController, :type =&gt; :controller do
175 175 end
176 176  
177 177 it { is_expected.to redirect_to(reading_group_path) }
178   - it { is_expected.to set_the_flash[:notice].to("You're not allowed to do this operation") }
  178 + it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
179 179 end
180 180 end
181 181  
... ...
spec/controllers/readings_controller_spec.rb
... ... @@ -88,7 +88,7 @@ describe ReadingsController, :type =&gt; :controller do
88 88  
89 89 it { is_expected.to redirect_to(reading_group_url(reading_group.id)) }
90 90 it { is_expected.to respond_with(:redirect) }
91   - it { is_expected.to set_the_flash[:notice].to("You're not allowed to do this operation") }
  91 + it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
92 92 end
93 93 end
94 94  
... ...
spec/controllers/repositories_controller_spec.rb
... ... @@ -183,7 +183,7 @@ describe RepositoriesController, :type =&gt; :controller do
183 183  
184 184 it { is_expected.to redirect_to(projects_url) }
185 185 it { is_expected.to respond_with(:redirect) }
186   - it { is_expected.to set_the_flash[:notice].to("You're not allowed to do this operation") }
  186 + it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
187 187 end
188 188 end
189 189  
... ...