command_utils 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/command_utils.rb +2 -6
  3. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43313ab411781575b5f54cd723d95189d6ef8cfd
4
- data.tar.gz: 9f7aeb3db8f866314c1d0c59efcf9a7a29e6d681
3
+ metadata.gz: 169a1a41d75f6fb75d796b16fd6bb3021d5fb8f2
4
+ data.tar.gz: 946d825a529e5ec8fafe8049d5e4fe5b0e27571a
5
5
  SHA512:
6
- metadata.gz: 0f1175dd3ab6259546955779aefca5375a5e7da16c65d00f1af6265ac8874e5a1ee2b9d8ab2d0993dc0550779856ff702e663f578b810ab2a55ffb388dd2f040
7
- data.tar.gz: 31be009f839f09db332d9012a71a3e9ef6cd82cf701a1474938bb4c5e75794b4691f2cc424f1cf05ecc6214e8465eea4c58d19448ce609aef7fe558bcac9e92b
6
+ metadata.gz: 9b2bba6b1db8f1c0fd2f0ed9c189404bf03c6297c89b31403d331454aacc4e7249def486d5407f2862046cf336c313cc619a09bb85d61982ddf60dc12c67d8b7
7
+ data.tar.gz: d9c15b78aeb9cef2fca41382ebbf6984a94a144760b74bc3765ec90902a266ce95943fee43084890001d6799605f720d43e980f1bdaf30e75bc4ae1546a9b54a
data/lib/command_utils.rb CHANGED
@@ -12,10 +12,7 @@ class CommandUtils
12
12
  # Takes command in same format supported by Process#spawn.
13
13
  def initialize *args
14
14
  first = args.first
15
- if first.kind_of? Hash
16
- @env = args.shift
17
- @command = args
18
- elsif first.respond_to? :to_hash
15
+ if first.respond_to? :to_hash
19
16
  @env = args.shift.to_hash
20
17
  @command = args
21
18
  else
@@ -166,8 +163,7 @@ class CommandUtils
166
163
 
167
164
  # Wait for process termination, then process its status.
168
165
  def process_status
169
- flags = Process::WNOHANG|Process::WUNTRACED
170
- pid, status = Process.wait2(@pid, flags)
166
+ pid, status = Process.wait2(@pid)
171
167
  if status.exited?
172
168
  unless status.exitstatus == 0
173
169
  message = "Command exited with #{status.exitstatus}."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: command_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Pugliese Ornellas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-20 00:00:00.000000000 Z
11
+ date: 2015-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -58,6 +58,20 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '4.6'
61
+ - !ruby/object:Gem::Dependency
62
+ name: simplecov
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '0.10'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '0.10'
61
75
  description: This Gem will help you call external commands, process its stdout and
62
76
  stderr, to your own fit, and at the end, validate its return code.
63
77
  email: fabio.ornellas@gmail.com
@@ -92,3 +106,4 @@ signing_key:
92
106
  specification_version: 4
93
107
  summary: Simple Gem to assist running external commands an processing its outputs.
94
108
  test_files: []
109
+ has_rdoc: