ruby-debug-ide 0.3.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,24 +0,0 @@
1
- The file lib/classic-debug.rb is based on the debug.rb file from Ruby
2
- project.
3
-
4
- Copyright (c) 2007-2008, debug-commons team
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining
7
- a copy of this software and associated documentation files (the
8
- "Software"), to deal in the Software without restriction, including
9
- without limitation the rights to use, copy, modify, merge, publish,
10
- distribute, sublicense, and/or sell copies of the Software, and to
11
- permit persons to whom the Software is furnished to do so, subject to
12
- the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be
15
- included in all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
-
data/Rakefile DELETED
@@ -1,110 +0,0 @@
1
- require 'rubygems'
2
-
3
- require 'rake/gempackagetask'
4
- require 'rake/rdoctask'
5
- require 'rake/testtask'
6
- require 'date'
7
-
8
- desc 'Default: run unit tests.'
9
- task :default => [:test]
10
-
11
- # ------- Default Package ----------
12
- RUBY_DEBUG_BASE_VERSION = "0.10.3"
13
- RUBY_DEBUG_IDE_VERSION = "0.3.4"
14
-
15
- FILES = FileList[
16
- 'CHANGES',
17
- 'ChangeLog',
18
- 'ChangeLog.archive',
19
- 'MIT-LICENSE',
20
- 'Rakefile',
21
- 'bin/*',
22
- 'lib/**/*',
23
- 'test/**/*'
24
- ]
25
-
26
- ide_spec = Gem::Specification.new do |spec|
27
- spec.name = "ruby-debug-ide"
28
-
29
- spec.homepage = "http://rubyforge.org/projects/debug-commons/"
30
- spec.summary = "IDE interface for ruby-debug."
31
- spec.description = <<-EOF
32
- An interface which glues ruby-debug to IDEs like Eclipse (RDT) and NetBeans.
33
- EOF
34
-
35
- spec.version = RUBY_DEBUG_IDE_VERSION
36
-
37
- spec.author = "Markus Barchfeld, Martin Krauskopf"
38
- spec.email = "rubyeclipse-dev-list@sourceforge.net"
39
- spec.platform = Gem::Platform::RUBY
40
- spec.require_path = "lib"
41
- spec.bindir = "bin"
42
- spec.executables = ["rdebug-ide"]
43
- spec.autorequire = "ruby-debug-base"
44
- spec.files = FILES.to_a
45
-
46
- spec.required_ruby_version = '>= 1.8.2'
47
- spec.date = DateTime.now
48
- spec.rubyforge_project = 'debug-commons'
49
- spec.add_dependency('ruby-debug-base', "~> #{RUBY_DEBUG_BASE_VERSION}.0")
50
-
51
- # rdoc
52
- spec.has_rdoc = false
53
- end
54
-
55
- # Rake task to build the default package
56
- Rake::GemPackageTask.new(ide_spec) do |pkg|
57
- pkg.need_tar = true
58
- end
59
-
60
- # Unit tests
61
- Rake::TestTask.new do |t|
62
- t.libs << "test"
63
- t.libs << "test-base"
64
- t.pattern = 'test/*_test.rb'
65
- t.verbose = true
66
- t.warning = false
67
- end
68
-
69
-
70
- desc "Create a GNU-style ChangeLog via svn2cl"
71
- task :ChangeLog do
72
- system("svn2cl --authors=svn2cl_usermap svn://rubyforge.org/var/svn/debug-commons/ruby-debug-ide/branches/ruby-debug-ide-0.3.x -o ChangeLog")
73
- end
74
-
75
- #desc "Publish ruby-debug to RubyForge."
76
- #task :publish do
77
- # require 'rake/contrib/sshpublisher'
78
- #
79
- # # Get ruby-debug path
80
- # ruby_debug_path = File.expand_path(File.dirname(__FILE__))
81
- #
82
- # publisher = Rake::SshDirPublisher.new("kent@rubyforge.org",
83
- # "/var/www/gforge-projects/ruby-debug", ruby_debug_path)
84
- #end
85
- #
86
- #desc "Clear temp files"
87
- #task :clean do
88
- # cd "ext" do
89
- # if File.exists?("Makefile")
90
- # sh "make clean"
91
- # rm "Makefile"
92
- # end
93
- # end
94
- #end
95
- #
96
- ## --------- RDoc Documentation ------
97
- #desc "Generate rdoc documentation"
98
- #Rake::RDocTask.new("rdoc") do |rdoc|
99
- # rdoc.rdoc_dir = 'doc'
100
- # rdoc.title = "ruby-debug"
101
- # # Show source inline with line numbers
102
- # rdoc.options << "--inline-source" << "--line-numbers"
103
- # # Make the readme file the start page for the generated html
104
- # rdoc.options << '--main' << 'README'
105
- # rdoc.rdoc_files.include('bin/**/*',
106
- # 'lib/**/*.rb',
107
- # 'ext/**/ruby_debug.c',
108
- # 'README',
109
- # 'LICENSE')
110
- #end
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'basic_test'
4
- require 'rd_test_base'
5
-
6
- class RDSteppingAndBreakpointsTest < RDTestBase
7
-
8
- include BasicTest
9
-
10
- end
@@ -1,20 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'rd_test_base'
4
-
5
- class RDCatchpointTest < RDTestBase
6
-
7
- def test_catchpoint_basics
8
- create_socket ['sleep 0.01', '5/0', 'sleep 0.01']
9
- run_to_line(1)
10
- send_next
11
- assert_suspension(@test_path, 2, 1)
12
- send_ruby('catch ZeroDivisionError')
13
- assert_catchpoint_set('ZeroDivisionError')
14
- send_next
15
- assert_exception(@test_path, 2, 'ZeroDivisionError')
16
- send_next
17
- end
18
-
19
- end
20
-
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'rd_test_base'
4
- require 'condition_test'
5
-
6
- class RDConditionTest < RDTestBase
7
-
8
- include ConditionTest
9
-
10
- end
11
-
@@ -1,43 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'rd_test_base'
4
-
5
- class RDEnableDisableTest < RDTestBase
6
-
7
- def test_enable_disable_basics
8
- create_socket ['1.upto(10) do', 'sleep 0.01', 'sleep 0.01', 'end']
9
-
10
- send_test_breakpoint(2)
11
- assert_breakpoint_added_no(1)
12
- send_test_breakpoint(3)
13
- assert_breakpoint_added_no(2)
14
-
15
- start_debugger
16
- assert_test_breakpoint(2)
17
- send_cont
18
- assert_test_breakpoint(3)
19
- send_cont
20
- assert_test_breakpoint(2)
21
- send_ruby('disable 2')
22
- assert_breakpoint_disabled(2)
23
- send_cont
24
- assert_test_breakpoint(2)
25
- send_cont
26
- assert_test_breakpoint(2)
27
- send_ruby('enable 2')
28
- assert_breakpoint_enabled(2)
29
- send_cont
30
- assert_test_breakpoint(3)
31
- send_cont
32
- assert_test_breakpoint(2)
33
- send_cont
34
- assert_test_breakpoint(3)
35
- send_ruby('disable 1')
36
- assert_breakpoint_disabled(1)
37
- send_ruby('disable 2')
38
- assert_breakpoint_disabled(2)
39
- send_cont
40
- end
41
-
42
- end
43
-
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'rd_test_base'
4
- require 'inspect_test'
5
-
6
- class RDInspectTest < RDTestBase
7
-
8
- include InspectTest
9
-
10
- end
11
-
@@ -1,36 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'rd_test_base'
4
- require 'stepping_breakpoints_test'
5
-
6
- class RDSteppingAndBreakpointsTest < RDTestBase
7
-
8
- include SteppingAndBreakpointsTest
9
-
10
- def test_hit_breakpoint_while_stepping_over
11
- create_test2 ["class Test2", "def print", "puts 'XX'", "puts 'XX'", "end", "end"]
12
- create_socket ["require 'test2.rb'", "Test2.new.print", "puts 'a'"]
13
- send_ruby("b #{@test2_name}:4")
14
- assert_breakpoint_added_no(1)
15
- run_to_line(2)
16
- send_next
17
- assert_breakpoint(@test2_name, 4)
18
- send_cont
19
- end
20
-
21
- def test_breakpoint_and_continue_from_other_file
22
- create_test2 ["class Test2", "def print12", "puts 'one'","puts 'two'", "end", "end"]
23
- create_socket ["require 'test2.rb'", "Test2.new.print12", "puts 'three'"]
24
- send_test_breakpoint(2)
25
- assert_breakpoint_added_no(1)
26
- send_ruby("b #{@test2_name}:4")
27
- assert_breakpoint_added_no(2)
28
- start_debugger
29
- assert_test_breakpoint(2)
30
- send_next # test:1 -> test2:4
31
- assert_breakpoint(@test2_name, 4)
32
- send_cont # test2:4 -> test:3
33
- end
34
-
35
- end
36
-
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $:.unshift File.join(File.dirname(__FILE__), "..", "test-base")
4
- $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
5
-
6
- require 'test_base'
7
-
8
- class RDTestBase < TestBase
9
-
10
- def setup
11
- super
12
- @rdebug_ide = config_load('rdebug_ide', true) || find_rdebug_ide
13
- unless @rdebug_ide and File.exist?(@rdebug_ide)
14
- @fast_fail = true
15
- assert_not_nil(@rdebug_ide, "Cannot find rdebug-ide executable. " +
16
- "Neither set in the config(.private).yaml nor found on the PATH")
17
- assert(false, "#{@rdebug_ide} exist")
18
- end
19
- end
20
-
21
- def debug_command(script, port)
22
- cmd = "#{interpreter}"
23
- cmd << " --debug" if jruby?
24
- cmd << " -J-Xdebug -J-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y" if jruby? and debug_jruby?
25
- cmd << " -I '#{File.dirname(script)}' #{@rdebug_ide} _0.3.4_" +
26
- (@verbose_server ? " -d" : "") +
27
- " -p #{port} -- '#{script}'"
28
- end
29
-
30
- def start_debugger
31
- send_ruby("start")
32
- end
33
-
34
- private
35
-
36
- def find_rdebug_ide
37
- ENV['PATH'].split(File::PATH_SEPARATOR).each do |dir|
38
- rdebug_ide = File.join(dir, 'rdebug-ide')
39
- return rdebug_ide if File.exists?(rdebug_ide)
40
- end
41
- nil
42
- end
43
-
44
- end
@@ -1,11 +0,0 @@
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
-
@@ -1,11 +0,0 @@
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
-