From 84d5e17935b45be288ed4274c090b9f11f1348f6 Mon Sep 17 00:00:00 2001 From: Matt Wynne Date: Wed, 10 Nov 2010 00:29:10 +0000 Subject: [PATCH] Fix infinite loop --- lib/relish/commands/base.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/relish/commands/base.rb b/lib/relish/commands/base.rb index 3c9b57a..5bc38e3 100644 --- a/lib/relish/commands/base.rb +++ b/lib/relish/commands/base.rb @@ -47,7 +47,9 @@ def get_api_token end def resource(options = {}) - RestClient::Resource.new(url, {:user => api_token, :password => 'X'}.merge(options)) + options[:user] ||= api_token + options[:password] ||= 'X' + RestClient::Resource.new(url, options) end def clean_args(args)