ruby-debug-ide 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,42 @@
1
+ 2009-08-26 19:06 Martin Krauskopf
2
+
3
+ * ChangeLog, Rakefile, bin/rdebug-ide, ext, ext/extconf.rb,
4
+ lib/ruby-debug.rb, lib/ruby-debug/command.rb,
5
+ lib/ruby-debug/event_processor.rb, lib/ruby-debug/processor.rb,
6
+ lib/ruby-debug/xml_printer.rb: Patch by Mark Moseley supporting
7
+ ruby-debug-base19.
8
+
9
+ Dynamically installs right ruby-debug-base dependency depending
10
+ on the version
11
+ of a Ruby platform being used. ruby-debug-base19 is the only
12
+ solution these
13
+ days for 1.9 debugging, so might be temporary solution until
14
+ ruby-debug
15
+ projects brings official version.
16
+
17
+ 2009-08-26 17:36 Martin Krauskopf
18
+
19
+ * lib/ruby-debug.rb: One more try for the right value for default
20
+ 'host' value.
21
+
22
+ 127.0.0.1 seemingly works with all systems and with IPv6 as well.
23
+ "localhost" and nil on have problems on some systems.
24
+
25
+ 2009-08-21 08:43 Martin Krauskopf
26
+
27
+ * lib/ruby-debug.rb: Ruby 1.9.x vs Java vs 'localhost' seems to be
28
+ problematic as well
29
+
30
+ 2009-06-04 16:02 Martin Krauskopf
31
+
32
+ * Rakefile, lib/ruby-debug.rb, test/rd_test_base.rb: Increasing
33
+ trung version
34
+
35
+ 2009-06-04 15:59 Martin Krauskopf
36
+
37
+ * ChangeLog, bin/rdebug-ide: Mentioning RubyMine among
38
+ ruby-debug-ide clients.
39
+
1
40
  2009-05-21 18:16 Martin Krauskopf
2
41
 
3
42
  * ChangeLog: Changelog update
data/Rakefile CHANGED
@@ -9,8 +9,7 @@ desc 'Default: run unit tests.'
9
9
  task :default => [:test]
10
10
 
11
11
  # ------- Default Package ----------
12
- RUBY_DEBUG_BASE_VERSION = "0.10.3"
13
- RUBY_DEBUG_IDE_VERSION = "0.4.6"
12
+ RUBY_DEBUG_IDE_VERSION = "0.4.7"
14
13
 
15
14
  FILES = FileList[
16
15
  'CHANGES',
@@ -20,7 +19,8 @@ FILES = FileList[
20
19
  'Rakefile',
21
20
  'bin/*',
22
21
  'lib/**/*',
23
- 'test/**/*'
22
+ 'test/**/*',
23
+ 'ext/extconf.rb'
24
24
  ]
25
25
 
26
26
  ide_spec = Gem::Specification.new do |spec|
@@ -40,13 +40,12 @@ EOF
40
40
  spec.require_path = "lib"
41
41
  spec.bindir = "bin"
42
42
  spec.executables = ["rdebug-ide"]
43
- spec.autorequire = "ruby-debug-base"
44
43
  spec.files = FILES.to_a
44
+ spec.extensions << "ext/extconf.rb"
45
45
 
46
46
  spec.required_ruby_version = '>= 1.8.2'
47
47
  spec.date = DateTime.now
48
48
  spec.rubyforge_project = 'debug-commons'
49
- spec.add_dependency('ruby-debug-base', "~> #{RUBY_DEBUG_BASE_VERSION}.0")
50
49
 
51
50
  # rdoc
52
51
  spec.has_rdoc = false
@@ -3,7 +3,11 @@
3
3
  require 'rubygems'
4
4
  require 'optparse'
5
5
  require "ostruct"
6
- require 'ruby-debug'
6
+ if RUBY_VERSION < "1.9"
7
+ require 'ruby-debug'
8
+ else
9
+ require_relative '../lib/ruby-debug'
10
+ end
7
11
 
8
12
  $stdout.sync=true
9
13
 
@@ -19,7 +23,8 @@ options = OpenStruct.new(
19
23
  opts = OptionParser.new do |opts|
20
24
  opts.banner = <<EOB
21
25
  Using ruby-debug-base #{Debugger::VERSION}
22
- Usage: rdebug-ide is supposed to be called from RDT or NetBeans. The command line interface to ruby-debug is rdebug.
26
+ Usage: rdebug-ide is supposed to be called from RDT, NetBeans or RubyMine. The
27
+ command line interface to ruby-debug is rdebug.
23
28
  EOB
24
29
  opts.separator ""
25
30
  opts.separator "Options:"
@@ -0,0 +1,24 @@
1
+ require 'rubygems'
2
+ require 'rubygems/command.rb'
3
+ require 'rubygems/dependency_installer.rb'
4
+
5
+ begin
6
+ Gem::Command.build_args = ARGV
7
+ rescue NoMethodError
8
+ end
9
+
10
+ inst = Gem::DependencyInstaller.new
11
+ begin
12
+ if RUBY_VERSION < "1.9"
13
+ inst.install "ruby-debug-base", "~> 0.10.3"
14
+ else
15
+ inst.install "ruby-debug-base19", "~> 0.11.15"
16
+ end
17
+ rescue
18
+ exit(1)
19
+ end
20
+
21
+ # create dummy makefile to indicate success
22
+ f = File.open(File.join(File.dirname(__FILE__), "Makefile"), "w")
23
+ f.write("install:")
24
+ f.close
@@ -3,9 +3,15 @@ require 'stringio'
3
3
  require "socket"
4
4
  require 'thread'
5
5
  require 'ruby-debug-base'
6
- require 'ruby-debug/xml_printer'
7
- require 'ruby-debug/processor'
8
- require 'ruby-debug/event_processor'
6
+ if RUBY_VERSION < "1.9"
7
+ require 'ruby-debug/xml_printer'
8
+ require 'ruby-debug/processor'
9
+ require 'ruby-debug/event_processor'
10
+ else
11
+ require_relative 'ruby-debug/xml_printer'
12
+ require_relative 'ruby-debug/processor'
13
+ require_relative 'ruby-debug/event_processor'
14
+ end
9
15
 
10
16
  module Debugger
11
17
 
@@ -119,10 +125,10 @@ module Debugger
119
125
  return if @control_thread
120
126
  @control_thread = DebugThread.new do
121
127
  begin
122
- unless RUBY_PLATFORM =~ /darwin/i # Mac OS X seems to have problem with 'localhost'
123
- host ||= 'localhost' # nil does not seem to work for IPv6, localhost does
124
- end
125
- $stderr.printf "Fast Debugger (ruby-debug-ide 0.4.6) listens on #{host}:#{port}\n"
128
+ $stderr.printf "Fast Debugger (ruby-debug-ide 0.4.7) listens on #{host}:#{port}\n"
129
+ # 127.0.0.1 seemingly works with all systems and with IPv6 as well.
130
+ # "localhost" and nil on have problems on some systems.
131
+ host ||= '127.0.0.1'
126
132
  server = TCPServer.new(host, port)
127
133
  while (session = server.accept)
128
134
  begin
@@ -1,4 +1,9 @@
1
- require 'ruby-debug/helper'
1
+ if RUBY_VERSION < "1.9"
2
+ require 'ruby-debug/helper'
3
+ else
4
+ require_relative 'helper'
5
+ end
6
+
2
7
 
3
8
  module Debugger
4
9
 
@@ -97,7 +102,9 @@ module Debugger
97
102
  # in ruby-debug.c
98
103
  def timeout(sec)
99
104
  return yield if sec == nil or sec.zero?
100
- raise ThreadError, "timeout within critical session" if Thread.critical
105
+ if RUBY_VERSION < "1.9"
106
+ raise ThreadError, "timeout within critical session" if Thread.critical
107
+ end
101
108
  begin
102
109
  x = Thread.current
103
110
  y = DebugThread.start {
@@ -112,6 +119,7 @@ module Debugger
112
119
 
113
120
  def debug_eval(str, b = get_binding)
114
121
  begin
122
+ str = str.to_s
115
123
  max_time = 10
116
124
  to_inspect = str.gsub(/\\n/, "\n")
117
125
  @printer.print_debug("Evaluating with timeout after %i sec", max_time)
@@ -126,6 +134,7 @@ module Debugger
126
134
 
127
135
  def debug_silent_eval(str)
128
136
  begin
137
+ str = str.to_s
129
138
  eval(str, get_binding)
130
139
  rescue StandardError, ScriptError
131
140
  nil
@@ -1,4 +1,8 @@
1
- require 'ruby-debug/xml_printer'
1
+ if RUBY_VERSION < "1.9"
2
+ require 'ruby-debug/xml_printer'
3
+ else
4
+ require_relative 'xml_printer'
5
+ end
2
6
  module Debugger
3
7
 
4
8
  class EventProcessor
@@ -1,5 +1,10 @@
1
- require 'ruby-debug/interface'
2
- require 'ruby-debug/command'
1
+ if RUBY_VERSION < "1.9"
2
+ require 'ruby-debug/interface'
3
+ require 'ruby-debug/command'
4
+ else
5
+ require_relative 'interface'
6
+ require_relative 'command'
7
+ end
3
8
 
4
9
  module Debugger
5
10
 
@@ -99,6 +99,7 @@ module Debugger
99
99
  end
100
100
 
101
101
  def print_variable(name, value, kind)
102
+ name = name.to_s
102
103
  unless value
103
104
  print("<variable name=\"%s\" kind=\"%s\"/>", CGI.escapeHTML(name), kind)
104
105
  return
@@ -22,7 +22,7 @@ class RDTestBase < TestBase
22
22
  cmd = "#{interpreter}"
23
23
  cmd << " --debug" if jruby?
24
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.4.6_" +
25
+ cmd << " -I '#{File.dirname(script)}' #{@rdebug_ide} _0.4.7_" +
26
26
  (@verbose_server ? " -d" : "") +
27
27
  " -p #{port} -- '#{script}'"
28
28
  end
metadata CHANGED
@@ -1,33 +1,24 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-ide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Barchfeld, Martin Krauskopf
8
- autorequire: ruby-debug-base
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-21 00:00:00 +02:00
12
+ date: 2009-08-26 00:00:00 +02:00
13
13
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: ruby-debug-base
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ~>
22
- - !ruby/object:Gem::Version
23
- version: 0.10.3.0
24
- version:
14
+ dependencies: []
15
+
25
16
  description: An interface which glues ruby-debug to IDEs like Eclipse (RDT) and NetBeans.
26
17
  email: rubyeclipse-dev-list@sourceforge.net
27
18
  executables:
28
19
  - rdebug-ide
29
- extensions: []
30
-
20
+ extensions:
21
+ - ext/extconf.rb
31
22
  extra_rdoc_files: []
32
23
 
33
24
  files:
@@ -70,6 +61,7 @@ files:
70
61
  - test/ruby-debug
71
62
  - test/ruby-debug/xml_printer_test.rb
72
63
  - test/rd_enable_disable_test.rb
64
+ - ext/extconf.rb
73
65
  has_rdoc: false
74
66
  homepage: http://rubyforge.org/projects/debug-commons/
75
67
  licenses: []