lib/gooddata/bricks/middleware/gooddata_middleware.rb in gooddata-0.6.7 vs lib/gooddata/bricks/middleware/gooddata_middleware.rb in gooddata-0.6.8

- old
+ new

@@ -1,8 +1,9 @@ # encoding: UTF-8 -require 'gooddata' +# TODO: REmove this +# require 'gooddata' require_relative 'base_middleware' module GoodData module Bricks @@ -20,12 +21,12 @@ end fail 'GoodData username is missing. Expected param :GDC_USERNAME' if params['GDC_USERNAME'].nil? fail 'GoodData password is missing. Expected param :GDC_PASSWORD' if params['GDC_PASSWORD'].nil? - GoodData.connect(params['GDC_USERNAME'], params['GDC_PASSWORD'], :server => server) + client = GoodData.connect(params['GDC_USERNAME'], params['GDC_PASSWORD'], :server => server) GoodData.logger = logger - GoodData.with_project(project_id) do |p| + GoodData.with_project(project_id, :client => client) do |p| @app.call(params) end end end end