ruby-debug-ide 0.4.17.beta8 → 0.4.17.beta9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. data/Gemfile +15 -0
  2. data/Rakefile +0 -3
  3. data/ext/mkrf_conf.rb +9 -2
  4. data/lib/ruby-debug-ide.rb +5 -11
  5. data/lib/{ruby-debug → ruby-debug-ide}/command.rb +1 -6
  6. data/lib/{ruby-debug → ruby-debug-ide}/commands/breakpoints.rb +1 -1
  7. data/lib/{ruby-debug → ruby-debug-ide}/commands/catchpoint.rb +0 -0
  8. data/lib/{ruby-debug → ruby-debug-ide}/commands/condition.rb +0 -0
  9. data/lib/{ruby-debug → ruby-debug-ide}/commands/control.rb +0 -0
  10. data/lib/{ruby-debug → ruby-debug-ide}/commands/enable.rb +0 -0
  11. data/lib/{ruby-debug → ruby-debug-ide}/commands/eval.rb +0 -0
  12. data/lib/{ruby-debug → ruby-debug-ide}/commands/frame.rb +0 -0
  13. data/lib/{ruby-debug → ruby-debug-ide}/commands/inspect.rb +0 -0
  14. data/lib/{ruby-debug → ruby-debug-ide}/commands/jump.rb +0 -0
  15. data/lib/{ruby-debug → ruby-debug-ide}/commands/load.rb +0 -0
  16. data/lib/{ruby-debug → ruby-debug-ide}/commands/pause.rb +0 -0
  17. data/lib/{ruby-debug → ruby-debug-ide}/commands/set_type.rb +0 -0
  18. data/lib/{ruby-debug → ruby-debug-ide}/commands/stepping.rb +0 -0
  19. data/lib/{ruby-debug → ruby-debug-ide}/commands/threads.rb +0 -0
  20. data/lib/{ruby-debug → ruby-debug-ide}/commands/variables.rb +1 -1
  21. data/lib/{ruby-debug → ruby-debug-ide}/event_processor.rb +2 -5
  22. data/lib/{ruby-debug → ruby-debug-ide}/helper.rb +0 -0
  23. data/lib/{ruby-debug → ruby-debug-ide}/ide_processor.rb +3 -12
  24. data/lib/{ruby-debug → ruby-debug-ide}/interface.rb +3 -1
  25. data/lib/ruby-debug-ide/version.rb +3 -0
  26. data/lib/{ruby-debug → ruby-debug-ide}/xml_printer.rb +0 -3
  27. data/ruby-debug-ide.gemspec +50 -0
  28. metadata +28 -27
  29. data/lib/ruby-debug/printers.rb +0 -2
  30. data/lib/ruby-debug/version.rb +0 -3
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "ruby-debug-base", :platforms => [:jruby, :ruby_18, :mingw_18]
4
+ gem "ruby-debug-base19x", :platforms => [:ruby_19, :mingw_19]
5
+
6
+ gemspec
7
+
8
+ group :development do
9
+ gem "bundler", "~> 1.0.0"
10
+ end
11
+
12
+ group :test do
13
+ gem "test-unit"
14
+ end
15
+
data/Rakefile CHANGED
@@ -1,7 +1,4 @@
1
- require 'rubygems'
2
-
3
1
  require 'bundler/gem_tasks'
4
- require 'rake/rdoctask'
5
2
  require 'rake/testtask'
6
3
 
7
4
  desc 'Default: run unit tests.'
data/ext/mkrf_conf.rb CHANGED
@@ -1,4 +1,10 @@
1
1
  jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
2
+
3
+ def already_installed(dep)
4
+ Gem::DependencyInstaller.new(:domain => :local).find_gems_with_sources(dep) ||
5
+ Gem::DependencyInstaller.new(:domain => :local,:prerelease => true).find_gems_with_sources(dep)
6
+ end
7
+
2
8
  unless jruby
3
9
  require 'rubygems'
4
10
  require 'rubygems/command.rb'
@@ -16,8 +22,9 @@ unless jruby
16
22
  dep = Gem::Dependency.new("ruby-debug-base19x", '>=0.11.24')
17
23
  end
18
24
 
19
- inst = Gem::DependencyInstaller.new
20
25
  begin
26
+ puts "Installing base gem"
27
+ inst = Gem::DependencyInstaller.new
21
28
  inst.install dep
22
29
  rescue
23
30
  inst = Gem::DependencyInstaller.new(:prerelease => true)
@@ -28,7 +35,7 @@ unless jruby
28
35
  puts e.backtrace.join "\n "
29
36
  exit(1)
30
37
  end
31
- end
38
+ end unless already_installed(dep)
32
39
  end
33
40
 
34
41
  # create dummy rakefile to indicate success
@@ -3,17 +3,11 @@ require 'stringio'
3
3
  require "socket"
4
4
  require 'thread'
5
5
  require 'ruby-debug-base'
6
- if RUBY_VERSION < "1.9"
7
- require 'ruby-debug/version'
8
- require 'ruby-debug/xml_printer'
9
- require 'ruby-debug/ide_processor'
10
- require 'ruby-debug/event_processor'
11
- else
12
- require_relative 'ruby-debug/version'
13
- require_relative 'ruby-debug/xml_printer'
14
- require_relative 'ruby-debug/ide_processor'
15
- require_relative 'ruby-debug/event_processor'
16
- end
6
+
7
+ require 'ruby-debug-ide/version'
8
+ require 'ruby-debug-ide/xml_printer'
9
+ require 'ruby-debug-ide/ide_processor'
10
+ require 'ruby-debug-ide/event_processor'
17
11
 
18
12
  module Debugger
19
13
 
@@ -1,9 +1,4 @@
1
- if RUBY_VERSION < "1.9"
2
- require 'ruby-debug/helper'
3
- else
4
- require_relative 'helper'
5
- end
6
-
1
+ require 'ruby-debug-ide/helper'
7
2
 
8
3
  module Debugger
9
4
 
@@ -69,7 +69,7 @@ module Debugger
69
69
  self.control = true
70
70
 
71
71
  def regexp
72
- /^\s*b(?:reak)?$/
72
+ /^\s*info\s*break$/
73
73
  end
74
74
 
75
75
  def execute
File without changes
File without changes
File without changes
@@ -38,7 +38,7 @@ module Debugger
38
38
  if RUBY_VERSION < "1.9"
39
39
  globals = global_variables - ['$=', '$IGNORECASE']
40
40
  else
41
- globals = global_variables - [:$KCODE, :$-K, :$=, :$FILENAME]
41
+ globals = global_variables - [:$KCODE, :$-K, :$=, :$IGNORECASE, :$FILENAME]
42
42
  end
43
43
  print_variables(globals, 'global') do |var|
44
44
  debug_eval(var)
@@ -1,8 +1,5 @@
1
- if RUBY_VERSION < "1.9"
2
- require 'ruby-debug/xml_printer'
3
- else
4
- require_relative 'xml_printer'
5
- end
1
+ require 'ruby-debug-ide/xml_printer'
2
+
6
3
  module Debugger
7
4
 
8
5
  class EventProcessor
File without changes
@@ -1,10 +1,5 @@
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
1
+ require 'ruby-debug-ide/interface'
2
+ require 'ruby-debug-ide/command'
8
3
 
9
4
  module Debugger
10
5
  class IdeCommandProcessor
@@ -34,11 +29,7 @@ module Debugger
34
29
  end
35
30
  event_cmds = Command.commands.map{|cmd| cmd.new(state, @printer) }
36
31
  while !state.proceed? do
37
- input = @interface.command_queue.empty? ? nil : @interface.command_queue.shift
38
- unless input
39
- sleep 0.1
40
- next
41
- end
32
+ input = @interface.command_queue.pop
42
33
  catch(:debug_error) do
43
34
  splitter[input].each do |input|
44
35
  # escape % since print_debug might use printf
@@ -1,3 +1,5 @@
1
+ require 'thread'
2
+
1
3
  class TCPSocket
2
4
 
3
5
  # Workaround for JRuby issue http://jira.codehaus.org/browse/JRUBY-2063
@@ -24,7 +26,7 @@ module Debugger
24
26
 
25
27
  def initialize(socket)
26
28
  @socket = socket
27
- @command_queue = []
29
+ @command_queue = Queue.new
28
30
  end
29
31
 
30
32
  def read_command
@@ -0,0 +1,3 @@
1
+ module Debugger
2
+ IDE_VERSION='0.4.17.beta9'
3
+ end
@@ -147,9 +147,6 @@ module Debugger
147
147
  unless value_str.is_a?(String)
148
148
  value_str = "ERROR: #{value.class}.to_s method returns #{value_str.class}. Should return String."
149
149
  end
150
- if value_str =~ /^\"(.*)"$/
151
- value_str = $1
152
- end
153
150
  end
154
151
  value_str = "[Binary Data]" if (value_str.respond_to?('is_binary_data?') && value_str.is_binary_data?)
155
152
  print("<variable name=\"%s\" kind=\"%s\" value=\"%s\" type=\"%s\" hasChildren=\"%s\" objectId=\"%#+x\"/>",
@@ -0,0 +1,50 @@
1
+ require File.dirname(__FILE__) + '/lib/ruby-debug-ide/version'
2
+ require "date"
3
+
4
+ # ------- Default Package ----------
5
+ RUBY_DEBUG_IDE_VERSION = Debugger::IDE_VERSION unless defined? RUBY_DEBUG_IDE_VERSION
6
+
7
+ unless defined? FILES
8
+ FILES = ['CHANGES',
9
+ 'ChangeLog',
10
+ 'ChangeLog.archive',
11
+ 'MIT-LICENSE',
12
+ 'Rakefile',
13
+ 'ext/mkrf_conf.rb',
14
+ 'Gemfile',
15
+ 'ruby-debug-ide.gemspec'
16
+ ]
17
+ FILES.push(*Dir['bin/*'])
18
+ FILES.push(*Dir['lib/**/*'])
19
+ # 'test/**/*',
20
+ end
21
+
22
+ Gem::Specification.new do |spec|
23
+ spec.name = "ruby-debug-ide"
24
+
25
+ spec.homepage = "https://github.com/JetBrains/ruby-debug-ide"
26
+ spec.summary = "IDE interface for ruby-debug."
27
+ spec.description = <<-EOF
28
+ An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
29
+ EOF
30
+
31
+ spec.version = RUBY_DEBUG_IDE_VERSION
32
+
33
+ spec.author = "Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains RubyMine Team"
34
+ spec.email = "rubymine-feedback@jetbrains.com"
35
+ spec.platform = Gem::Platform::RUBY
36
+ spec.require_path = "lib"
37
+ spec.bindir = "bin"
38
+ spec.executables = ["rdebug-ide"]
39
+ spec.files = FILES
40
+
41
+ spec.extensions << "ext/mkrf_conf.rb" unless ENV['NO_EXT']
42
+ spec.add_dependency("rake", ">= 0.8.1")
43
+
44
+ spec.required_ruby_version = '>= 1.8.2'
45
+ spec.date = DateTime.now
46
+ spec.rubyforge_project = 'debug-commons'
47
+
48
+ # rdoc
49
+ spec.has_rdoc = false
50
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-ide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.17.beta8
4
+ version: 0.4.17.beta9
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-15 00:00:00.000000000Z
12
+ date: 2012-03-11 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70349904728880 !ruby/object:Gem::Requirement
16
+ requirement: &70355403341520 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 0.8.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70349904728880
24
+ version_requirements: *70355403341520
25
25
  description: ! 'An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans
26
26
  and RubyMine.
27
27
 
@@ -39,30 +39,31 @@ files:
39
39
  - MIT-LICENSE
40
40
  - Rakefile
41
41
  - ext/mkrf_conf.rb
42
+ - Gemfile
43
+ - ruby-debug-ide.gemspec
42
44
  - bin/rdebug-ide
43
- - lib/ruby-debug/command.rb
44
- - lib/ruby-debug/commands/breakpoints.rb
45
- - lib/ruby-debug/commands/catchpoint.rb
46
- - lib/ruby-debug/commands/condition.rb
47
- - lib/ruby-debug/commands/control.rb
48
- - lib/ruby-debug/commands/enable.rb
49
- - lib/ruby-debug/commands/eval.rb
50
- - lib/ruby-debug/commands/frame.rb
51
- - lib/ruby-debug/commands/inspect.rb
52
- - lib/ruby-debug/commands/jump.rb
53
- - lib/ruby-debug/commands/load.rb
54
- - lib/ruby-debug/commands/pause.rb
55
- - lib/ruby-debug/commands/set_type.rb
56
- - lib/ruby-debug/commands/stepping.rb
57
- - lib/ruby-debug/commands/threads.rb
58
- - lib/ruby-debug/commands/variables.rb
59
- - lib/ruby-debug/event_processor.rb
60
- - lib/ruby-debug/helper.rb
61
- - lib/ruby-debug/ide_processor.rb
62
- - lib/ruby-debug/interface.rb
63
- - lib/ruby-debug/printers.rb
64
- - lib/ruby-debug/version.rb
65
- - lib/ruby-debug/xml_printer.rb
45
+ - lib/ruby-debug-ide/command.rb
46
+ - lib/ruby-debug-ide/commands/breakpoints.rb
47
+ - lib/ruby-debug-ide/commands/catchpoint.rb
48
+ - lib/ruby-debug-ide/commands/condition.rb
49
+ - lib/ruby-debug-ide/commands/control.rb
50
+ - lib/ruby-debug-ide/commands/enable.rb
51
+ - lib/ruby-debug-ide/commands/eval.rb
52
+ - lib/ruby-debug-ide/commands/frame.rb
53
+ - lib/ruby-debug-ide/commands/inspect.rb
54
+ - lib/ruby-debug-ide/commands/jump.rb
55
+ - lib/ruby-debug-ide/commands/load.rb
56
+ - lib/ruby-debug-ide/commands/pause.rb
57
+ - lib/ruby-debug-ide/commands/set_type.rb
58
+ - lib/ruby-debug-ide/commands/stepping.rb
59
+ - lib/ruby-debug-ide/commands/threads.rb
60
+ - lib/ruby-debug-ide/commands/variables.rb
61
+ - lib/ruby-debug-ide/event_processor.rb
62
+ - lib/ruby-debug-ide/helper.rb
63
+ - lib/ruby-debug-ide/ide_processor.rb
64
+ - lib/ruby-debug-ide/interface.rb
65
+ - lib/ruby-debug-ide/version.rb
66
+ - lib/ruby-debug-ide/xml_printer.rb
66
67
  - lib/ruby-debug-ide.rb
67
68
  homepage: https://github.com/JetBrains/ruby-debug-ide
68
69
  licenses: []
@@ -1,2 +0,0 @@
1
- require 'ruby-debug/printers/plain_printer'
2
- require 'ruby-debug/printers/xml_printer'
@@ -1,3 +0,0 @@
1
- module Debugger
2
- IDE_VERSION='0.4.17.beta8'
3
- end