Allow the ruby-debug related gems to be conditionally excluded for IDE development.

Fixes #CNVS-3710

Testing Notes:
===========
* Using an editor like RubyMine, add an environment setting for development
   called DISABLE_RUBY_DEBUGGING with a value of something like "1". Specific
   value is unimportant.
* Start a 'debug' session and set breakpoints and verify they fire.
* Using console based debugging, verify that the execution pauses
   when a DEBUG statement is reached.

Change-Id: Iec59efeb291827ee600b7184bce3990145189b47
Reviewed-on: https://gerrit.instructure.com/17540
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
This commit is contained in:
Mark Ericksen 2013-02-07 13:57:04 -07:00
parent 526cf977e2
commit 73c27a24ab
2 changed files with 20 additions and 9 deletions

13
Gemfile
View File

@ -109,10 +109,15 @@ group :development do
gem 'rb-fsevent', :require => false
gem 'rb-fchange', :require => false
if ONE_NINE
gem 'debugger', '1.1.3'
else
gem 'ruby-debug', '0.10.4'
# Option to DISABLE_RUBY_DEBUGGING is helpful IDE-based debugging.
# The ruby debug gems conflict with the IDE-based debugger gem.
# Set this option in your dev environment to disable.
unless ENV['DISABLE_RUBY_DEBUGGING']
if ONE_NINE
gem 'debugger', '1.1.3'
else
gem 'ruby-debug', '0.10.4'
end
end
end

View File

@ -40,8 +40,14 @@ Dir[File.dirname(__FILE__) + "/" + File.basename(__FILE__, ".rb") + "-*.rb"].eac
# allow debugging only in development environment by default
# ruby-debug is currently broken in 1.9.3
if RUBY_VERSION < "1.9."
require "ruby-debug"
else
require "debugger"
end
#
# Option to DISABLE_RUBY_DEBUGGING is helpful IDE-based debugging.
# The ruby debug gems conflict with the IDE-based debugger gem.
# Set this option in your dev environment to disable.
unless ENV['DISABLE_RUBY_DEBUGGING']
if RUBY_VERSION < "1.9."
require "ruby-debug"
else
require "debugger"
end
end