summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/oxidized/core.rb3
-rw-r--r--oxidized.gemspec2
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/oxidized/core.rb b/lib/oxidized/core.rb
index b70443c..6e7a352 100644
--- a/lib/oxidized/core.rb
+++ b/lib/oxidized/core.rb
@@ -14,10 +14,13 @@ module Oxidized
end
class Core
+ class NoNodesFound < OxidizedError; end
+
def initialize args
Oxidized.mgr = Manager.new
Oxidized.Hooks = HookManager.from_config CFG
nodes = Nodes.new
+ raise NoNodesFound, 'source returns no usable nodes' if nodes.size == 0
@worker = Worker.new nodes
trap('HUP') { nodes.load }
if CFG.rest?
diff --git a/oxidized.gemspec b/oxidized.gemspec
index 4ad6e92..bc626e2 100644
--- a/oxidized.gemspec
+++ b/oxidized.gemspec
@@ -18,5 +18,5 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'slop', '~> 3.5'
s.add_runtime_dependency 'net-ssh', '~> 2.8'
s.add_runtime_dependency 'rugged', '~> 0.21', '>= 0.21.4'
- s.add_development_dependency 'pry'
+ s.add_development_dependency 'pry', '~> 0'
end