From 2c9d493b290d8ef1ef2831940bc940db10149589 Mon Sep 17 00:00:00 2001 From: dblock Date: Thu, 9 Jul 2015 16:00:07 -0400 Subject: [PATCH] Lock version of websocket-driver. --- .rubocop_todo.yml | 31 +++++-------------------------- Gemfile.lock | 5 +++-- config.ru | 8 +++++++- spec/spec_helper.rb | 1 - 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 30050ca..6f0d38a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,33 +1,20 @@ # This configuration was generated by `rubocop --auto-gen-config` -# on 2015-06-19 13:09:29 -0400 using RuboCop version 0.31.0. +# on 2015-07-09 16:07:58 -0400 using RuboCop version 0.31.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. # Offense count: 1 -Lint/HandleExceptions: +Lint/RescueException: Enabled: false -# Offense count: 2 -Metrics/AbcSize: - Max: 21 - -# Offense count: 1 -Metrics/CyclomaticComplexity: - Max: 7 - -# Offense count: 19 +# Offense count: 11 # Configuration parameters: AllowURI, URISchemes. Metrics/LineLength: - Max: 130 + Max: 121 -# Offense count: 1 -# Configuration parameters: CountComments. -Metrics/MethodLength: - Max: 17 - -# Offense count: 16 +# Offense count: 6 Style/Documentation: Enabled: false @@ -35,11 +22,3 @@ Style/Documentation: # Configuration parameters: Exclude. Style/FileName: Enabled: false - -# Offense count: 1 -Style/ModuleFunction: - Enabled: false - -# Offense count: 1 -Style/RescueModifier: - Enabled: false diff --git a/Gemfile.lock b/Gemfile.lock index e836747..f6aa0b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,13 @@ GIT remote: git://github.com/dblock/slack-ruby-bot.git - revision: 8385892c5ff6b7860435ca4b1f46017bb45175db + revision: edef7edd1c0e0f5abe70ab801593f4a2ef66766b specs: slack-ruby-bot (0.2.0) activesupport giphy (~> 2.0.2) hashie slack-api (~> 1.1.6) + websocket-driver (~> 0.5.4) GEM remote: http://rubygems.org/ @@ -104,7 +105,7 @@ GEM webmock (1.21.0) addressable (>= 2.3.6) crack (>= 0.3.2) - websocket-driver (0.6.0) + websocket-driver (0.5.4) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) diff --git a/config.ru b/config.ru index 2c9a2bf..bda0adb 100644 --- a/config.ru +++ b/config.ru @@ -4,7 +4,13 @@ require 'slack-mathbot' require 'web' Thread.new do - SlackMathbot::App.instance.run + begin + SlackMathbot::App.instance.run + rescue Exception => e + STDERR.puts "ERROR: #{e}" + STDERR.puts e.backtrace + raise e + end end run SlackMathbot::Web diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ce9cf4d..a7ae6cf 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,4 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..')) require 'slack-ruby-bot/rspec' -require 'config/environment' require 'slack-mathbot'