lib/onering/plugins/reporter.rb in onering-client-0.0.77 vs lib/onering/plugins/reporter.rb in onering-client-0.0.78
- old
+ new
@@ -29,19 +29,20 @@
def setup(config={})
@options = config
@facter_path = DEFAULT_FACTER_PATH
- @path = [*@options[:plugin_path]]
+ @path = [*Onering::Config.get('reporter.plugin_path',[])]
@path += DEFAULT_PLUGIN_PATH
# add gem paths to the @path
- ([*@options[:plugin_gems]]+DEFAULT_PLUGIN_GEMNAMES).compact.each do |g|
+ ([*Onering::Config.get('reporter.plugin_gems',[])]+DEFAULT_PLUGIN_GEMNAMES).compact.each do |g|
begin
p = File.join(Util.gem_path(g), 'lib')
@path << File.join(p, 'reporter')
@facter_path << File.join(p, 'facter')
- rescue Gem::LoadError
+ rescue Gem::LoadError => e
+ STDERR.puts("Error loading gem: #{e.message}")
next
end
end
begin