buff-shell_out 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- 1.9.3-p429
1
+ 1.9.3-p448
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  Copyright 2012-2013 Riot Games
2
2
 
3
- Jamie Winsor (<reset@riotgames.com>)
3
+ Jamie Winsor (<jamie@vialstudios.com>)
4
4
 
5
5
  Licensed under the Apache License, Version 2.0 (the "License");
6
6
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -39,6 +39,6 @@ Using it as a module
39
39
 
40
40
  # Authors and Contributors
41
41
 
42
- * Jamie Winsor (<reset@riotgames.com>)
42
+ * Jamie Winsor (<jamie@vialstudios.com>)
43
43
 
44
44
  Thank you to all of our [Contributors](https://github.com/RiotGames/buff-shell_out/graphs/contributors), testers, and users.
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "buff-shell_out"
8
8
  spec.version = Buff::ShellOut::VERSION
9
9
  spec.authors = ["Jamie Winsor"]
10
- spec.email = ["reset@riotgames.com"]
10
+ spec.email = ["jamie@vialstudios.com"]
11
11
  spec.description = %q{A mixin for issuing shell commands and collecting the output}
12
12
  spec.summary = %q{Buff up your code with a mixin for issuing shell commands and collecting the output}
13
13
  spec.homepage = "https://github.com/RiotGames/buff-shell_out"
@@ -31,7 +31,9 @@ module Buff
31
31
  begin
32
32
  pid = Process.spawn(command, out: out.to_i, err: err.to_i)
33
33
  pid, status = Process.waitpid2(pid)
34
- exitstatus = status.exitstatus
34
+ # Check if we're getting back a process status because win32-process 6.x was a fucking MURDERER.
35
+ # https://github.com/djberg96/win32-process/blob/master/lib/win32/process.rb#L494-L519
36
+ exitstatus = status.is_a?(Process::Status) ? status.exitstatus : status
35
37
  rescue Errno::ENOENT => ex
36
38
  exitstatus = 127
37
39
  out.write("")
@@ -1,5 +1,5 @@
1
1
  module Buff
2
2
  module ShellOut
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -23,6 +23,14 @@ describe Buff::ShellOut do
23
23
  described_class.should_receive(:mri_out).with(command)
24
24
  result
25
25
  end
26
+
27
+ context "when Process.waitpid2 returns an Integer instead of a Process::Status" do
28
+ before { Process.stub(:waitpid2).and_return([12345, 0]) }
29
+
30
+ it "sets the exitstatus to the returned integer" do
31
+ expect(result.exitstatus).to eql(0)
32
+ end
33
+ end
26
34
  end
27
35
 
28
36
  context "when on JRuby" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buff-shell_out
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-11 00:00:00.000000000 Z
12
+ date: 2013-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: buff-ruby_engine
@@ -173,7 +173,7 @@ dependencies:
173
173
  version: '0'
174
174
  description: A mixin for issuing shell commands and collecting the output
175
175
  email:
176
- - reset@riotgames.com
176
+ - jamie@vialstudios.com
177
177
  executables: []
178
178
  extensions: []
179
179
  extra_rdoc_files: []
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  version: '0'
217
217
  segments:
218
218
  - 0
219
- hash: 3711137622216531874
219
+ hash: -3294574992538716380
220
220
  requirements: []
221
221
  rubyforge_project:
222
222
  rubygems_version: 1.8.23