-
Notifications
You must be signed in to change notification settings - Fork 21.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bebugger doesn't work with Ruby 2.2 so we don't need to support it anymore
- Loading branch information
1 parent
cf01d01
commit 93559da
Showing
14 changed files
with
8 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
require 'active_support/core_ext/kernel/agnostics' | ||
require 'active_support/core_ext/kernel/concern' | ||
require 'active_support/core_ext/kernel/debugger' if RUBY_VERSION < '2.0.0' | ||
require 'active_support/core_ext/kernel/reporting' | ||
require 'active_support/core_ext/kernel/singleton_class' |
13 changes: 3 additions & 10 deletions
13
activesupport/lib/active_support/core_ext/kernel/debugger.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
module Kernel | ||
unless respond_to?(:debugger) | ||
# Starts a debugging session if the +debugger+ gem has been loaded (call rails server --debugger to load it). | ||
def debugger | ||
message = "\n***** Debugger requested, but was not available (ensure the debugger gem is listed in Gemfile/installed as gem): Start server with --debugger to enable *****\n" | ||
defined?(Rails.logger) ? Rails.logger.info(message) : $stderr.puts(message) | ||
end | ||
alias breakpoint debugger unless respond_to?(:breakpoint) | ||
end | ||
end | ||
require 'active_support/deprecation' | ||
|
||
ActiveSupport::Deprecation.warn("This file is deprecated and will be removed in Rails 5.1 with no replacement.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
module Rails | ||
module Rack | ||
autoload :Debugger, "rails/rack/debugger" if RUBY_VERSION < '2.0.0' | ||
autoload :Logger, "rails/rack/logger" | ||
autoload :Logger, "rails/rack/logger" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,3 @@ | ||
module Rails | ||
module Rack | ||
class Debugger | ||
def initialize(app) | ||
@app = app | ||
require 'active_support/deprecation' | ||
|
||
ARGV.clear # clear ARGV so that rails server options aren't passed to IRB | ||
|
||
require 'debugger' | ||
|
||
::Debugger.start | ||
::Debugger.settings[:autoeval] = true if ::Debugger.respond_to?(:settings) | ||
puts "=> Debugger enabled" | ||
rescue LoadError | ||
puts "You're missing the 'debugger' gem. Add it to your Gemfile, bundle it and try again." | ||
exit(1) | ||
end | ||
|
||
def call(env) | ||
@app.call(env) | ||
end | ||
end | ||
end | ||
end | ||
ActiveSupport::Deprecation.warn("This file is deprecated and will be removed in Rails 5.1 with no replacement.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93559da
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refs #20612.