litmus_paper 0.7.0 → 0.7.1
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.
@@ -8,9 +8,15 @@ module LitmusPaper
|
|
8
8
|
|
9
9
|
def available?
|
10
10
|
Timeout.timeout(@timeout) do
|
11
|
-
|
11
|
+
output = %x[#{@command}]
|
12
|
+
unless $CHILD_STATUS.success?
|
13
|
+
LitmusPaper.logger.info("Available check to #{@command} failed with status #{$CHILD_STATUS.exitstatus}")
|
14
|
+
LitmusPaper.logger.info("Failed output #{output}")
|
15
|
+
end
|
16
|
+
$CHILD_STATUS.success?
|
12
17
|
end
|
13
18
|
rescue Timeout::Error
|
19
|
+
LitmusPaper.logger.info("Available check to '#{@command}' timed out")
|
14
20
|
false
|
15
21
|
end
|
16
22
|
|
data/lib/litmus_paper/version.rb
CHANGED
data/lib/litmus_paper.rb
CHANGED
@@ -16,6 +16,14 @@ describe LitmusPaper::Dependency::Script do
|
|
16
16
|
check = LitmusPaper::Dependency::Script.new("sleep 10", :timeout => 1)
|
17
17
|
check.should_not be_available
|
18
18
|
end
|
19
|
+
|
20
|
+
it "can handle pipes" do
|
21
|
+
check = LitmusPaper::Dependency::Script.new("ls | grep lib")
|
22
|
+
check.should be_available
|
23
|
+
|
24
|
+
check = LitmusPaper::Dependency::Script.new("ls | grep missing")
|
25
|
+
check.should_not be_available
|
26
|
+
end
|
19
27
|
end
|
20
28
|
|
21
29
|
describe "to_s" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: litmus_paper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 1
|
10
|
+
version: 0.7.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Braintreeps
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-11-
|
18
|
+
date: 2012-11-20 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|