lib/gooddata/bricks/middleware/twitter_middleware.rb in gooddata-0.6.0.pre3 vs lib/gooddata/bricks/middleware/twitter_middleware.rb in gooddata-0.6.0.pre4

- old
+ new

@@ -1,19 +1,22 @@ require 'twitter' -class TwitterMiddleware < GoodData::Bricks::Middleware +module GoodData::Bricks + + class TwitterMiddleware < GoodData::Bricks::Middleware - def call(params) + def call(params) - client = Twitter::REST::Client.new do |config| - config.consumer_key = params[:twitter_consumer_key] - config.consumer_secret = params[:twitter_consumer_secret] - config.access_token = params[:twitter_access_token] - config.access_token_secret = params[:twitter_access_token_secret] - end + client = Twitter::REST::Client.new do |config| + config.consumer_key = params[:twitter_consumer_key] + config.consumer_secret = params[:twitter_consumer_secret] + config.access_token = params[:twitter_access_token] + config.access_token_secret = params[:twitter_access_token_secret] + end - returning(@app.call(params)) do |result| - client.update(result) + returning(@app.call(params)) do |result| + client.update(result) + end end - end -end + end +end \ No newline at end of file