lib/speedos/performance.rb in speedos-0.0.11 vs lib/speedos/performance.rb in speedos-0.0.12

- old
+ new

@@ -12,11 +12,16 @@ rescue Exception => e Log.error("#{e}") Log.error("#{e.backtrace}") success = false ensure - Record.create(JSON.load(page.get_har.to_json).merge(success: success)) + finialise_record(JSON.load(page.get_har.to_json)['log'], success) page.server_proxy.close page.server.stop + end + + def finialise_record(log, success) + record = Record.create(log: log, success: success) + record.refresh_information end end end