Permalink
Browse files

Patch for JRuby, version bump to v0.2.2

  • Loading branch information...
1 parent 0b0ef3e commit 78bf60fca9c0cf0b94ed961b6075f7ffcbe46c57 Peter Kieltyka committed Apr 20, 2012
Showing with 30 additions and 19 deletions.
  1. +2 −2 Gemfile
  2. +19 −11 Gemfile.lock
  3. +5 −3 README.md
  4. +2 −2 lib/subexec.rb
  5. +2 −1 spec/spec_helper.rb
View
4 Gemfile
@@ -3,6 +3,6 @@ source :rubygems
gemspec
group :development, :test do
- gem 'ruby-debug', :platforms => :mri_18
- gem 'ruby-debug19', :platforms => :mri_19 if RUBY_VERSION < '1.9.3'
+ gem 'pry'
+ gem 'pry-nav'
end
View
30 Gemfile.lock
@@ -1,17 +1,26 @@
PATH
remote: .
specs:
- subexec (0.2.0)
+ subexec (0.2.2)
GEM
remote: http://rubygems.org/
specs:
- columnize (0.3.4)
+ coderay (1.0.6)
diff-lcs (1.1.3)
- linecache (0.46)
- rbx-require-relative (> 0.0.4)
+ method_source (0.7.1)
+ pry (0.9.8.4)
+ coderay (~> 1.0.5)
+ method_source (~> 0.7.1)
+ slop (>= 2.4.4, < 3)
+ pry (0.9.8.4-java)
+ coderay (~> 1.0.5)
+ method_source (~> 0.7.1)
+ slop (>= 2.4.4, < 3)
+ spoon (~> 0.0)
+ pry-nav (0.2.0)
+ pry (~> 0.9.8.1)
rake (0.9.2.2)
- rbx-require-relative (0.0.5)
rspec (2.7.0)
rspec-core (~> 2.7.0)
rspec-expectations (~> 2.7.0)
@@ -20,17 +29,16 @@ GEM
rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.7.0)
- ruby-debug (0.10.4)
- columnize (>= 0.1)
- ruby-debug-base (~> 0.10.4.0)
- ruby-debug-base (0.10.4)
- linecache (>= 0.3)
+ slop (2.4.4)
+ spoon (0.0.1)
PLATFORMS
+ java
ruby
DEPENDENCIES
+ pry
+ pry-nav
rake
rspec (~> 2.7.0)
- ruby-debug
subexec!
View
8 README.md
@@ -14,6 +14,9 @@ and never returns control back to the original process. Enter Subexec.
Tested with MRI 1.9.3, 1.9.2, 1.8.7
+Note: Process.spawn seems to be broken with JRuby 1.7.0.dev (as of
+April 20th, 2012), and so it uses Process.exec instead.
+
## Usage
```ruby
@@ -33,8 +36,7 @@ So Ruby 1.8 support is sheerly for backwards compatibility.
## Windows Support
-Limited Windows support is available. If someone would like to sponsor
-windows compatibility, we are more than happy to accept patches. However,
-our tests are run on Unix-like operating systems. Primarily, the intended
+Limited Windows support is available. We are more than happy to accept patches.
+However, our tests are run on Unix-like operating systems. Primarily, the intended
effect should be that Subexec *works* on Windows, though it may not give
many advantages.
View
4 lib/subexec.rb
@@ -26,7 +26,7 @@
# puts sub.exitstatus # returns:
class Subexec
- VERSION = '0.2.1'
+ VERSION = '0.2.2'
attr_accessor :pid,
:command,
@@ -51,7 +51,7 @@ def initialize(command, options={})
end
def run!
- if RUBY_VERSION >= '1.9'
+ if RUBY_VERSION >= '1.9' && RUBY_ENGINE != 'jruby'
spawn
else
exec
View
3 spec/spec_helper.rb
@@ -12,7 +12,8 @@
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
begin
- require 'ruby-debug'
+ require 'pry'
+ require 'pry-nav'
rescue LoadError
end

0 comments on commit 78bf60f

Please sign in to comment.