ruby-debug-ide19 0.4.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/CHANGES +75 -0
  2. data/ChangeLog +465 -0
  3. data/ChangeLog.archive +1073 -0
  4. data/MIT-LICENSE +24 -0
  5. data/Rakefile +110 -0
  6. data/bin/rdebug-ide +88 -0
  7. data/ext/mkrf_conf.rb +28 -0
  8. data/lib/ruby-debug-ide.rb +172 -0
  9. data/lib/ruby-debug/command.rb +169 -0
  10. data/lib/ruby-debug/commands/breakpoints.rb +129 -0
  11. data/lib/ruby-debug/commands/catchpoint.rb +52 -0
  12. data/lib/ruby-debug/commands/condition.rb +51 -0
  13. data/lib/ruby-debug/commands/control.rb +129 -0
  14. data/lib/ruby-debug/commands/enable.rb +203 -0
  15. data/lib/ruby-debug/commands/eval.rb +64 -0
  16. data/lib/ruby-debug/commands/frame.rb +155 -0
  17. data/lib/ruby-debug/commands/inspect.rb +24 -0
  18. data/lib/ruby-debug/commands/jump.rb +73 -0
  19. data/lib/ruby-debug/commands/load.rb +18 -0
  20. data/lib/ruby-debug/commands/stepping.rb +108 -0
  21. data/lib/ruby-debug/commands/threads.rb +153 -0
  22. data/lib/ruby-debug/commands/variables.rb +136 -0
  23. data/lib/ruby-debug/event_processor.rb +74 -0
  24. data/lib/ruby-debug/helper.rb +33 -0
  25. data/lib/ruby-debug/interface.rb +39 -0
  26. data/lib/ruby-debug/printers.rb +2 -0
  27. data/lib/ruby-debug/processor.rb +152 -0
  28. data/lib/ruby-debug/xml_printer.rb +268 -0
  29. data/test/rd_basic_test.rb +10 -0
  30. data/test/rd_catchpoint_test.rb +20 -0
  31. data/test/rd_condition_test.rb +11 -0
  32. data/test/rd_enable_disable_test.rb +43 -0
  33. data/test/rd_inspect_test.rb +11 -0
  34. data/test/rd_stepping_breakpoints_test.rb +36 -0
  35. data/test/rd_test_base.rb +44 -0
  36. data/test/rd_threads_and_frames_test.rb +11 -0
  37. data/test/rd_variables_test.rb +11 -0
  38. data/test/ruby-debug/xml_printer_test.rb +105 -0
  39. metadata +103 -0
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rd_test_base'
4
+ require 'threads_and_frames_test'
5
+
6
+ class RDThreadsAndFrames < RDTestBase
7
+
8
+ include ThreadsAndFrames
9
+
10
+ end
11
+
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rd_test_base'
4
+ require 'variables_test'
5
+
6
+ class RDVariablesTest < RDTestBase
7
+
8
+ include VariablesTest
9
+
10
+ end
11
+
@@ -0,0 +1,105 @@
1
+ $:.unshift File.join(File.dirname(__FILE__),'..','lib')
2
+
3
+ require 'test/unit'
4
+ require 'ruby-debug'
5
+
6
+ class XmlPrinterTest < Test::Unit::TestCase
7
+
8
+ def teardown
9
+ Debugger.xml_debug = false
10
+ end
11
+
12
+ def test_print_msg
13
+ interface = MockInterface.new
14
+ printer = Debugger::XmlPrinter.new(interface)
15
+ printer.print_msg('%s test', 'message')
16
+ assert_equal(['<message>message test</message>'], interface.data)
17
+ end
18
+
19
+ def test_print_msg_with_debug
20
+ Debugger.xml_debug = true
21
+ interface = MockInterface.new
22
+ printer = Debugger::XmlPrinter.new(interface)
23
+ printer.print_msg('%s test', 'message')
24
+ expected = ["<message>message test</message>"]
25
+ assert_equal(expected, interface.data)
26
+ end
27
+
28
+ def test_print_debug
29
+ Debugger.xml_debug = true
30
+ interface = MockInterface.new
31
+ printer = Debugger::XmlPrinter.new(interface)
32
+ printer.print_debug('%s test', 'debug message 1')
33
+ printer.print_debug('%s test', 'debug message 2')
34
+ expected = [
35
+ "<message debug='true'>debug message 1 test</message>",
36
+ "<message debug='true'>debug message 2 test</message>"]
37
+ assert_equal(expected, interface.data)
38
+ end
39
+
40
+ def test_print_frames
41
+ interface = MockInterface.new
42
+ printer = Debugger::XmlPrinter.new(interface)
43
+ Debugger.start
44
+ begin
45
+ context = MockContext.new(2)
46
+ printer.print_frames(context, 0)
47
+ ensure
48
+ Debugger.stop
49
+ end
50
+ test_path = File.join(Dir.pwd, 'test.rb')
51
+ expected = [
52
+ "<frames>",
53
+ "<frame no='1' file='#{test_path}' line='0' current='true' />",
54
+ "<frame no='2' file='#{test_path}' line='10' />",
55
+ "</frames>"]
56
+ assert_equal(expected, interface.data)
57
+ end
58
+
59
+ def test_print_at_line
60
+ interface = MockInterface.new
61
+ printer = Debugger::XmlPrinter.new(interface)
62
+ Debugger.start
63
+ begin
64
+ printer.print_at_line(Debugger.current_context, 'test.rb', 1)
65
+ ensure
66
+ Debugger.stop
67
+ end
68
+ test_path = File.join(Dir.pwd, 'test.rb')
69
+ expected = ["<suspended file='#{test_path}' line='1' threadId='1' frames='2'/>"]
70
+ assert_equal(expected, interface.data)
71
+ end
72
+
73
+ class MockContext < Debugger::Context
74
+
75
+ attr_accessor :stack_size
76
+
77
+ def initialize(stack_size)
78
+ @stack_size = stack_size
79
+ end
80
+
81
+ def frame_file(id)
82
+ "test.rb"
83
+ end
84
+
85
+ def frame_line(id)
86
+ id * 10
87
+ end
88
+
89
+ end
90
+
91
+ class MockInterface
92
+
93
+ attr_accessor :data
94
+
95
+ def initialize
96
+ @data = []
97
+ end
98
+
99
+ def print(*args)
100
+ @data << format(*args)
101
+ end
102
+
103
+ end
104
+
105
+ end
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-debug-ide19
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.10
5
+ platform: ruby
6
+ authors:
7
+ - Markus Barchfeld, Martin Krauskopf
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-09-16 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rake
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.8.1
24
+ version:
25
+ description: |
26
+ An interface which glues ruby-debug to IDEs like Eclipse (RDT) and NetBeans.
27
+
28
+ email: rubyeclipse-dev-list@sourceforge.net
29
+ executables:
30
+ - rdebug-ide
31
+ extensions:
32
+ - ext/mkrf_conf.rb
33
+ extra_rdoc_files: []
34
+
35
+ files:
36
+ - CHANGES
37
+ - ChangeLog
38
+ - ChangeLog.archive
39
+ - MIT-LICENSE
40
+ - Rakefile
41
+ - bin/rdebug-ide
42
+ - lib/ruby-debug/commands/load.rb
43
+ - lib/ruby-debug/commands/control.rb
44
+ - lib/ruby-debug/commands/breakpoints.rb
45
+ - lib/ruby-debug/commands/inspect.rb
46
+ - lib/ruby-debug/commands/condition.rb
47
+ - lib/ruby-debug/commands/enable.rb
48
+ - lib/ruby-debug/commands/eval.rb
49
+ - lib/ruby-debug/commands/variables.rb
50
+ - lib/ruby-debug/commands/stepping.rb
51
+ - lib/ruby-debug/commands/frame.rb
52
+ - lib/ruby-debug/commands/threads.rb
53
+ - lib/ruby-debug/commands/catchpoint.rb
54
+ - lib/ruby-debug/commands/jump.rb
55
+ - lib/ruby-debug/command.rb
56
+ - lib/ruby-debug/helper.rb
57
+ - lib/ruby-debug/processor.rb
58
+ - lib/ruby-debug/event_processor.rb
59
+ - lib/ruby-debug/interface.rb
60
+ - lib/ruby-debug/xml_printer.rb
61
+ - lib/ruby-debug/printers.rb
62
+ - lib/ruby-debug-ide.rb
63
+ - test/ruby-debug/xml_printer_test.rb
64
+ - test/rd_enable_disable_test.rb
65
+ - test/rd_threads_and_frames_test.rb
66
+ - test/rd_stepping_breakpoints_test.rb
67
+ - test/rd_test_base.rb
68
+ - test/rd_catchpoint_test.rb
69
+ - test/rd_basic_test.rb
70
+ - test/rd_inspect_test.rb
71
+ - test/rd_condition_test.rb
72
+ - test/rd_variables_test.rb
73
+ - ext/mkrf_conf.rb
74
+ has_rdoc: true
75
+ homepage: http://rubyforge.org/projects/debug-commons/
76
+ licenses: []
77
+
78
+ post_install_message:
79
+ rdoc_options: []
80
+
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: 1.8.2
88
+ version:
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: "0"
94
+ version:
95
+ requirements: []
96
+
97
+ rubyforge_project: debug-commons
98
+ rubygems_version: 1.3.4
99
+ signing_key:
100
+ specification_version: 3
101
+ summary: IDE interface for ruby-debug.
102
+ test_files: []
103
+