onering-client 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/onering.rb CHANGED
@@ -2,7 +2,7 @@ $: << File.expand_path(File.dirname(__FILE__))
2
2
 
3
3
  module Onering
4
4
  module Client
5
- VERSION = "0.1.5"
5
+ VERSION = "0.1.6"
6
6
 
7
7
  class Error < Exception; end
8
8
  class FatalError < Error; end
@@ -177,7 +177,7 @@ module Onering
177
177
  }
178
178
 
179
179
  # loads plugins and populates @_report
180
- load_plugins
180
+ load_plugins()
181
181
 
182
182
  return @_report.stringify_keys()
183
183
  end
@@ -210,8 +210,7 @@ module Onering
210
210
 
211
211
  if options[:cacheregen] == true
212
212
  Onering::Logger.debug("Forcing cache regeneration", "Onering::Reporter")
213
- _update_cache_file(cachefile)
214
- return _generated_report()
213
+ cache = _update_cache_file(cachefile)
215
214
  end
216
215
 
217
216
  # remove cached_at key
@@ -230,6 +229,8 @@ module Onering
230
229
 
231
230
  def _update_cache_file(cachefile=DEFAULT_CACHE_FILE)
232
231
  begin
232
+ report = nil
233
+
233
234
  File.open(cachefile, 'w+') do |file|
234
235
  Onering::Logger.debug("Regenerating cache file at #{cachefile}", "Onering::Reporter")
235
236
  report = _generated_report()
@@ -238,7 +239,7 @@ module Onering
238
239
  file.puts(json)
239
240
  end
240
241
 
241
- return true
242
+ return report
242
243
  rescue Exception => e
243
244
  Onering::Logger.info("Unable to write cache file #{cachefile}: #{e.class.name} - #{e.message}", "Onering::Reporter")
244
245
  return false
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: onering-client
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.5
5
+ version: 0.1.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Gary Hetzel