lib/gooddata/client.rb in gooddata-0.5.5 vs lib/gooddata/client.rb in gooddata-0.5.6
- old
+ new
@@ -1,8 +1,16 @@
require 'gooddata/version'
require 'gooddata/connection'
+# fastercsv is built in Ruby 1.9
+if RUBY_VERSION < "1.9"
+ require 'fastercsv'
+else
+ require 'csv'
+ FasterCSV = CSV
+end
+
# Metadata packages, such as report.rb, require this to be loaded first
require File.dirname(__FILE__) + '/models/metadata.rb'
Dir[File.dirname(__FILE__) + '/models/*.rb'].each { |file| require file }
Dir[File.dirname(__FILE__) + '/collections/*.rb'].each { |file| require file }
@@ -84,10 +92,10 @@
# GoodData.connect call
#
# @see GoodData.connect
#
def connection
- threaded[:connection]
+ threaded[:connection] || raise("Please authenticate with GoodData.connect first")
end
# Sets the active project
#
# === Parameters