Commit 22eff788cbeaf8066b890fa948f0c00f1c6a0379

Authored by Laust Rud Jacobsen
1 parent 4f9b40cc
Exists in master and in 1 other branch production

Rubocop: fix silently swallowing exceptions, use Kernel.warn for output

Rakefile
... ... @@ -10,5 +10,5 @@ begin
10 10 RSpec::Core::RakeTask.new(:spec)
11 11 task :default => :spec
12 12 rescue LoadError
13   - # no rspec available
  13 + warn "Notice: no rspec tasks available in this environment"
14 14 end
... ...
config/boot.rb
... ... @@ -8,5 +8,5 @@ begin
8 8 # try to use Yajl, the json_gem compatibility layer must be loaded after json
9 9 require 'yajl/json_gem'
10 10 rescue LoadError
11   - # fail silently because json gem is fine
  11 + warn "JSON: unable to load Yajl; just using the json gem"
12 12 end
... ...
config/unicorn.default.rb
... ... @@ -25,7 +25,7 @@ before_fork do |server, _worker|
25 25 begin
26 26 Process.kill("QUIT", File.read(old_pid).to_i)
27 27 rescue Errno::ENOENT, Errno::ESRCH
28   - # someone else did our job for us
  28 + warn "Unicorn: master process already killed, no problem"
29 29 end
30 30 end
31 31 end
... ...