Permalink
Browse files

runtime code should be in lib ๐Ÿ˜ข, close #4

  • Loading branch information...
1 parent d64911c commit df78a71ae9071bbd9404f680ed9522e8c5334ca3 @cldwalker committed Apr 6, 2012
Showing with 14 additions and 29 deletions.
  1. +4 โˆ’5 Rakefile
  2. +1 โˆ’1 bin/rdebug
  3. +0 โˆ’2 lib/debugger.rb
  4. 0 {cli โ†’ lib}/ruby-debug.rb
  5. 0 {cli โ†’ lib}/ruby-debug/command.rb
  6. 0 {cli โ†’ lib}/ruby-debug/commands/breakpoints.rb
  7. 0 {cli โ†’ lib}/ruby-debug/commands/catchpoint.rb
  8. 0 {cli โ†’ lib}/ruby-debug/commands/condition.rb
  9. 0 {cli โ†’ lib}/ruby-debug/commands/continue.rb
  10. 0 {cli โ†’ lib}/ruby-debug/commands/control.rb
  11. 0 {cli โ†’ lib}/ruby-debug/commands/display.rb
  12. 0 {cli โ†’ lib}/ruby-debug/commands/edit.rb
  13. 0 {cli โ†’ lib}/ruby-debug/commands/enable.rb
  14. 0 {cli โ†’ lib}/ruby-debug/commands/eval.rb
  15. 0 {cli โ†’ lib}/ruby-debug/commands/finish.rb
  16. 0 {cli โ†’ lib}/ruby-debug/commands/frame.rb
  17. 0 {cli โ†’ lib}/ruby-debug/commands/help.rb
  18. 0 {cli โ†’ lib}/ruby-debug/commands/info.rb
  19. 0 {cli โ†’ lib}/ruby-debug/commands/irb.rb
  20. 0 {cli โ†’ lib}/ruby-debug/commands/jump.rb
  21. 0 {cli โ†’ lib}/ruby-debug/commands/kill.rb
  22. 0 {cli โ†’ lib}/ruby-debug/commands/list.rb
  23. 0 {cli โ†’ lib}/ruby-debug/commands/method.rb
  24. 0 {cli โ†’ lib}/ruby-debug/commands/quit.rb
  25. 0 {cli โ†’ lib}/ruby-debug/commands/reload.rb
  26. 0 {cli โ†’ lib}/ruby-debug/commands/save.rb
  27. 0 {cli โ†’ lib}/ruby-debug/commands/set.rb
  28. 0 {cli โ†’ lib}/ruby-debug/commands/show.rb
  29. 0 {cli โ†’ lib}/ruby-debug/commands/skip.rb
  30. 0 {cli โ†’ lib}/ruby-debug/commands/source.rb
  31. 0 {cli โ†’ lib}/ruby-debug/commands/stepping.rb
  32. 0 {cli โ†’ lib}/ruby-debug/commands/threads.rb
  33. 0 {cli โ†’ lib}/ruby-debug/commands/tmate.rb
  34. 0 {cli โ†’ lib}/ruby-debug/commands/trace.rb
  35. 0 {cli โ†’ lib}/ruby-debug/commands/variables.rb
  36. 0 {cli โ†’ lib}/ruby-debug/debugger.rb
  37. 0 {cli โ†’ lib}/ruby-debug/helper.rb
  38. 0 {cli โ†’ lib}/ruby-debug/interface.rb
  39. 0 {cli โ†’ lib}/ruby-debug/processor.rb
  40. +4 โˆ’12 test/{cli โ†’ lib}/commands/catchpoint_test.rb
  41. +3 โˆ’7 test/{cli โ†’ lib}/commands/unit/regexp.rb
  42. +1 โˆ’1 test/test-ctrl.rb
  43. +1 โˆ’1 test/test-help.rb
View
@@ -15,13 +15,13 @@ COMMON_FILES = FileList[
'Rakefile',
]
-CLI_TEST_FILE_LIST = FileList['test/cli/commands/unit/*.rb',
- 'test/cli/commands/*_test.rb',
- 'test/cli/**/*_test.rb']
+CLI_TEST_FILE_LIST = FileList['test/lib/commands/unit/*.rb',
+ 'test/lib/commands/*_test.rb',
+ 'test/lib/**/*_test.rb']
# disabled until requires fixed and tests pass
# 'test/test-*.rb']
CLI_FILES = COMMON_FILES + FileList[
- "cli/**/*",
+ "lib/**/*",
'ChangeLog',
'bin/*',
'doc/rdebug.1',
@@ -51,7 +51,6 @@ task :test => :test_base do
Rake::TestTask.new(:test) do |t|
t.libs << './ext'
t.libs << './lib'
- t.libs << './cli'
t.test_files = CLI_TEST_FILE_LIST
t.verbose = true
end
View
@@ -104,7 +104,7 @@
require 'optparse'
require 'ostruct'
-require_relative '../cli/ruby-debug'
+require 'ruby-debug'
def debug_program(options)
# Make sure Ruby script syntax checks okay.
View
@@ -1,7 +1,5 @@
module Debugger
end
-# TODO: merge cli/ into lib/
-$:.unshift File.expand_path(File.dirname(__FILE__) + '/../cli')
require 'ruby-debug'
require 'debugger/version'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,27 +1,19 @@
#!/usr/bin/env ruby
require 'test/unit'
+require 'ruby-debug'
class TestCatchCommand < Test::Unit::TestCase
-
- base_dir = File.expand_path(File.join(File.dirname(__FILE__),
- '..', '..', '..'))
-
- %w(ext lib cli).each do |dir|
- $: << File.join(base_dir, dir)
- end
-
- require File.join(base_dir, 'cli', 'ruby-debug')
-
+
class MockState
- attr_accessor :message
+ attr_accessor :message
def context; end
def confirm(msg); true end
def print(*args)
@message = *args
end
end
-
+
# regression test for bug #20156
def test_catch_does_not_blow_up
state = MockState.new
@@ -2,13 +2,10 @@
class TestCommandREs < Test::Unit::TestCase
- base_dir=File.expand_path(File.join(File.dirname(__FILE__),
- '..', '..', '..', '..',
- 'cli', 'ruby-debug'))
- require File.join(base_dir, 'command')
- require File.join(base_dir, 'commands', 'frame')
+ require 'ruby-debug/command'
+ require 'ruby-debug/commands/frame'
include Debugger
-
+
def test_quit
c = QuitCommand.new(nil)
assert c.regexp.match('quit')
@@ -39,4 +36,3 @@ def test_down
assert_equal(nil, c.regexp.match('dow'))
end
end
-
View
@@ -9,7 +9,7 @@
$: << File.join(SRC_DIR, '..', dir)
end
require 'ruby_debug'
-require File.join(SRC_DIR, '..', 'cli', 'ruby-debug')
+require 'ruby-debug'
# Test Local Control Interface
class TestCtrl < Test::Unit::TestCase
View
@@ -9,8 +9,8 @@
$:.unshift File.join(SRC_DIR, '..', dir)
end
require 'ruby_debug'
+require 'ruby-debug'
-require File.join(SRC_DIR, '..', 'cli', 'ruby-debug')
$:.shift; $:.shift; $:.shift
def cheap_diff(got_lines, correct_lines)

0 comments on commit df78a71

Please sign in to comment.