lib/gooddata/bricks/middleware/gooddata_middleware.rb in gooddata-0.6.0.pre6 vs lib/gooddata/bricks/middleware/gooddata_middleware.rb in gooddata-0.6.0.pre7
- old
+ new
@@ -9,15 +9,17 @@
protocol_name = :GDC_PROTOCOL
server_name = :GDC_SERVER
project_id = params[:GDC_PROJECT_ID]
fail "SST (SuperSecureToken) not present in params" if params[token_name].nil?
- logger.info "Connecting to GD with SST"
server = if !params[protocol_name].empty? && !params[server_name].empty?
params[protocol_name] + "://" + params[server_name]
end
- GoodData.connect_with_sst(params[token_name], {:server => server})
+ fail "GoodData username is missing. Expected param :GDC_USERANME" 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})
GoodData.logger = logger
GoodData.with_project(project_id) do |p|
@app.call(params)
end
end
\ No newline at end of file