lib/gooddata/rest/client.rb in gooddata-0.6.51 vs lib/gooddata/rest/client.rb in gooddata-0.6.52

- old
+ new

@@ -104,16 +104,10 @@ end client = Client.new(new_opts) GoodData.logger.info("Connected to server with webdav path #{client.user_webdav_path}") - if client - at_exit do - puts client.connection.stats_table if client && client.connection && (GoodData.stats_on? || client.stats_on?) - end - end - # HACK: This line assigns class instance # if not done yet @@instance = client # rubocop:disable ClassVars end def connect_sso(sso) @@ -195,9 +189,13 @@ @connection.connect(username, password, @opts) end def disconnect + if stats_on? + puts "API call statistics to server #{@connection.server}" + puts @connection.stats_table + end @connection.disconnect end def warehouses(id = :all) GoodData::DataWarehouse[id, client: self]