geoloqi 0.9.28 → 0.9.30
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/geoloqi.rb +1 -1
- data/lib/geoloqi/session.rb +7 -5
- data/lib/geoloqi/version.rb +1 -1
- metadata +2 -2
data/lib/geoloqi.rb
CHANGED
data/lib/geoloqi/session.rb
CHANGED
@@ -73,21 +73,23 @@ module Geoloqi
|
|
73
73
|
|
74
74
|
def execute(meth, path, query=nil, headers={})
|
75
75
|
query = Rack::Utils.parse_query query if query.is_a?(String)
|
76
|
+
headers = headers.merge! default_headers
|
77
|
+
|
76
78
|
raw = @connection.send(meth) do |req|
|
77
79
|
req.url "/#{Geoloqi.api_version.to_s}/#{path.gsub(/^\//, '')}"
|
78
|
-
req.headers = headers
|
79
|
-
|
80
|
+
req.headers = headers
|
80
81
|
if query
|
81
82
|
meth == :get ? req.params = query : req.body = query.to_json
|
82
83
|
end
|
83
84
|
end
|
84
|
-
|
85
|
+
|
85
86
|
if @config.logger
|
86
87
|
@config.logger.print "### Geoloqi::Session - #{meth.to_s.upcase} #{path}"
|
87
88
|
@config.logger.print "?#{Rack::Utils.build_query query}" unless query.nil?
|
88
|
-
@config.logger.puts "\n###
|
89
|
+
@config.logger.puts "\n### Request Headers: #{headers.inspect}"
|
90
|
+
@config.logger.puts "### Status: #{raw.status}\n### Headers: #{raw.headers.inspect}\n### Body: #{raw.body}"
|
89
91
|
end
|
90
|
-
|
92
|
+
|
91
93
|
Response.new raw.status, raw.headers, raw.body
|
92
94
|
end
|
93
95
|
|
data/lib/geoloqi/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: geoloqi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.9.
|
5
|
+
version: 0.9.30
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kyle Drake
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-10-
|
14
|
+
date: 2011-10-10 00:00:00 -07:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|