coque 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d466a70fd3b8602c88227f47d0b6f2a83a39b33d
4
- data.tar.gz: 1fd3be8b2b553045472734bb4ba5178a212a7936
3
+ metadata.gz: cfcfd929bb5819065fea5e0fc71f132ef3742120
4
+ data.tar.gz: 7d30643242b2f1fa7216de1d00b36bf7bc2400db
5
5
  SHA512:
6
- metadata.gz: d7be37697beb5566f80c2e1b5a81f26528572aeaff2c70a293ede7f2e3f18fd7495d248905d4f9309faf1035f22f9d598f1465d1d5ec3d9dd28499af417cf26f
7
- data.tar.gz: 7e4c0ddd3012752767408c3551312cfc65154fcd8b337fe0d7b80634e66c42659df419ad1736de565fdf77f5b1a67f57e765f625b1215403048b99cc86ce83a6
6
+ metadata.gz: 00b68d8a94a7342fc79208c015e0003c80095c9367c01d499934d3e1d16bbb96f9de0e4ff87c107da809282b1d12f251d10e50f2e322d80e71a8d7a49f5d2e6d
7
+ data.tar.gz: c2c8ac6202947d5d576f9882c91f958e87185f75aeb6afb54a66e55fd95aea35c5a3a9096f1f4422f7c600ccc4d64200dd37dc81df6febb8be388c9a915136df
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coque (0.3.0)
4
+ coque (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -147,3 +147,12 @@ The gem is available as open source under the terms of the [MIT License](https:/
147
147
  ## Code of Conduct
148
148
 
149
149
  Everyone interacting in the Coque project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[worace]/coque/blob/master/CODE_OF_CONDUCT.md).
150
+
151
+ ## Building / Releasing
152
+
153
+ ```
154
+ gem build coque.gemspec
155
+ gem push coque-<VERSION>.gem
156
+ git tag <VERSION>
157
+ git push origin <VERSION>
158
+ ```
@@ -24,6 +24,10 @@ module Coque
24
24
 
25
25
  def getio(io, mode = "r")
26
26
  case io
27
+ when STDERR
28
+ io.dup
29
+ when STDOUT
30
+ io.dup
27
31
  when String
28
32
  File.open(io, mode)
29
33
  when Pathname
data/lib/coque/result.rb CHANGED
@@ -8,8 +8,15 @@ class Coque::Result
8
8
  end
9
9
 
10
10
  def each(&block)
11
- @out.each_line do |line|
12
- block.call(line.chomp)
11
+ begin
12
+ @out.each_line do |line|
13
+ block.call(line.chomp)
14
+ end
15
+ rescue IOError
16
+ # If the command was redirected to an existing standard output stream,
17
+ # i.e. $stdout or $stderr, that output will be streamed as executed, so
18
+ # attempting to read from it here will fail.
19
+ # There may be a better way to handle this case, but for now this is working ok.
13
20
  end
14
21
  unless defined? @exit_code
15
22
  wait
@@ -23,7 +30,7 @@ class Coque::Result
23
30
  end
24
31
 
25
32
  def success?
26
- to_a
33
+ wait
27
34
  exit_code == 0
28
35
  end
29
36
  end
data/lib/coque/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Coque
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coque
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Horace Williams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-04 00:00:00.000000000 Z
11
+ date: 2018-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler