realityforge-braid 0.9.5 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,11 @@
1
1
  require 'singleton'
2
2
  require 'rubygems'
3
- if defined?(JRUBY_VERSION) || Gem.win_platform?
4
- require'open3'
5
- else
6
- require 'open4'
7
- end
8
- require defined?(JRUBY_VERSION) ? 'open3' : 'open4'
9
3
  require 'tempfile'
10
4
 
11
5
  module Braid
6
+ USE_OPEN3 = defined?(JRUBY_VERSION) || Gem.win_platform?
7
+ require USE_OPEN3 ? 'open3' : 'open4'
8
+
12
9
  module Operations
13
10
  class ShellExecutionError < BraidError
14
11
  def initialize(err = nil)
@@ -112,11 +109,11 @@ module Braid
112
109
  log(cmd)
113
110
 
114
111
  if defined?(JRUBY_VERSION) || Gem.win_platform?
115
- Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
112
+ Open3.popen3(cmd) do |stdin, stdout, stderr|
116
113
  out = stdout.read
117
114
  err = stderr.read
118
- status = wait_thr.value # Process::Status object returned.
119
115
  end
116
+ status = $?.exitstatus
120
117
  else
121
118
  status = Open4.popen4(cmd) do |pid, stdin, stdout, stderr|
122
119
  out = stdout.read
@@ -295,12 +292,12 @@ module Braid
295
292
  command = "git apply --index --whitespace=nowarn #{args.join(' ')} -"
296
293
 
297
294
  if defined?(JRUBY_VERSION) || Gem.win_platform?
298
- Open3.popen3(command) do |stdin, stdout, stderr, wait_thr|
295
+ Open3.popen3(command) do |stdin, stdout, stderr|
299
296
  stdin.puts(diff)
300
297
  stdin.close
301
298
  err = stderr.read
302
- status = wait_thr.value # Process::Status object returned.
303
299
  end
300
+ status = $?.exitstatus
304
301
  else
305
302
  status = Open4.popen4(command) do |pid, stdin, stdout, stderr|
306
303
  stdin.puts(diff)
data/lib/braid/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Braid
2
- VERSION = '0.9.5'
2
+ VERSION = '0.9.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: realityforge-braid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-04-24 00:00:00.000000000 Z
13
+ date: 2014-05-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: main