darkhelmet-darkext 0.7.1 → 0.7.2
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.
- 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
|