Skip to content

Commit

Permalink
Mpayer_ruby v 0.0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
kgathi2 committed Oct 23, 2015
1 parent cff8a0a commit cb7cf86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/mpayer_ruby/fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Mpayer
class Fetch
include HTTParty

base_uri Mpayer.configuration.base_url
# base_uri 'https://app.mpayer.co.ke/api/'
parser proc {|data| Hashie::Mash.new(response: (JSON.parse(data) rescue {data:data}.to_json) ).response}
format :json
headers
Expand All @@ -14,7 +14,7 @@ def headers

%w(get put post delete).each do |m|
define_method m do |path, options={}, &block|
options = {body: options.to_json}
options = {body: options.to_json, base_uri: Mpayer.configuration.base_url}
res = perform_request Net::HTTP::Put, path, options, &block if m == 'put'
res = perform_request Net::HTTP::Post, path, options, &block if m == 'post'
res = perform_request Net::HTTP::Get, path, options, &block if m == 'get'
Expand Down
2 changes: 1 addition & 1 deletion lib/mpayer_ruby/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Mpayer
VERSION = "0.0.16"
VERSION = "0.0.17"
end

0 comments on commit cb7cf86

Please sign in to comment.