darkhelmet-darkext 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/darkext/beagle.rb +11 -0
- metadata +1 -1
data/lib/darkext/beagle.rb
CHANGED
@@ -37,6 +37,17 @@ module Beagle
|
|
37
37
|
parser.call(output)
|
38
38
|
end
|
39
39
|
|
40
|
+
def self.running?
|
41
|
+
raise BeagleError, "Beagle.home (BEAGLE_HOME) not set!" if home.nil?
|
42
|
+
return false if status.include?("Could not connect")
|
43
|
+
return true
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.status
|
47
|
+
raise BeagleError, "Beagle.home (BEAGLE_HOME) not set!" if home.nil?
|
48
|
+
DarkIO.capture_output(:stderr => false) { system('beagle-info','--status') }.strip
|
49
|
+
end
|
50
|
+
|
40
51
|
private
|
41
52
|
|
42
53
|
def self.verbose_parser
|