ruby_desk 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ruby_desk/connector.rb +2 -4
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/lib/ruby_desk/connector.rb
CHANGED
@@ -10,7 +10,7 @@ module RubyDesk
|
|
10
10
|
ODESK_GDS_URL = "#{ODESK_URL}gds/"
|
11
11
|
ODESK_AUTH_URL = "#{ODESK_URL}services/api/auth/"
|
12
12
|
DEFAULT_OPTIONS = {:secure=>true, :sign=>true, :format=>'json',
|
13
|
-
:base_url=>ODESK_API_URL, :auth=>true
|
13
|
+
:base_url=>ODESK_API_URL, :auth=>true}
|
14
14
|
|
15
15
|
attr_writer :frob
|
16
16
|
|
@@ -42,7 +42,7 @@ module RubyDesk
|
|
42
42
|
# This forces adding :api_token, :api_key and :api_sig to parameters.
|
43
43
|
def prepare_api_call(path, options = {})
|
44
44
|
options = DEFAULT_OPTIONS.merge(options)
|
45
|
-
params = options[:params]
|
45
|
+
params = options[:params] || {}
|
46
46
|
if options[:auth]
|
47
47
|
params[:api_token] ||= @api_token
|
48
48
|
params[:api_key] ||= @api_key
|
@@ -64,8 +64,6 @@ module RubyDesk
|
|
64
64
|
headers = {
|
65
65
|
'Content-Type' => 'application/x-www-form-urlencoded'
|
66
66
|
}
|
67
|
-
puts "url:"+url.path
|
68
|
-
puts "data:"+data
|
69
67
|
|
70
68
|
case api_call[:method]
|
71
69
|
when :get, 'get' then
|