Skip to content
This repository has been archived by the owner on Dec 29, 2021. It is now read-only.

Commit

Permalink
fix bug causing exceptions when no parameters present
Browse files Browse the repository at this point in the history
  • Loading branch information
jcantara committed Aug 14, 2015
1 parent 35a86b5 commit dbb37d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/wot_api/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module WotApi
VERSION = "1.2.0"
VERSION = "1.2.1"
end
4 changes: 3 additions & 1 deletion lib/wot_api/wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class << self
attr_accessor :configuration, :default_region

def wot_api_post(method_sym, params)
params ||= {}
endpoint = method_to_endpoint(method_sym)
region = params.delete(:region).to_sym rescue get_default_region
set_base_uri(region)
Expand All @@ -37,7 +38,8 @@ def wot_api_post(method_sym, params)
return format_response(response)
end

def wot_web_get(endpoint, params={})
def wot_web_get(endpoint, params)
params ||= {}
region = params.delete(:region).to_sym rescue get_default_region
set_base_uri(region, true)
begin
Expand Down

0 comments on commit dbb37d6

Please sign in to comment.