dillo 0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -1
- data/lib/dillo.rb +3 -3
- metadata +1 -1
data/README.md
CHANGED
@@ -19,4 +19,4 @@ Please use the issue tracker here on github.
|
|
19
19
|
|
20
20
|
##Contributions
|
21
21
|
|
22
|
-
Any contributions are welcome, there
|
22
|
+
Any contributions are welcome, there are not any specific requirements or standards being used at the moment.
|
data/lib/dillo.rb
CHANGED
@@ -38,14 +38,14 @@ module Dillo
|
|
38
38
|
@connection = Faraday.new(:url => self.class.root) do |builder|
|
39
39
|
builder.use SocrataAppTokenMiddleware
|
40
40
|
builder.use Dillo::Response::RaiseClientError
|
41
|
-
builder.
|
41
|
+
builder.response :json, :content_type => /\bjson$/
|
42
42
|
|
43
43
|
# Enable logger output with Dillojamie.phillips@austintexas.gov.debug = true
|
44
44
|
if Dillo.debug
|
45
45
|
builder.response :logger
|
46
46
|
end
|
47
47
|
|
48
|
-
builder.adapter
|
48
|
+
builder.adapter Faraday.default_adapter
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -62,7 +62,7 @@ module Dillo
|
|
62
62
|
def json
|
63
63
|
# For some reason ruby 1.9.x seems to be trying to parse the
|
64
64
|
# API JSON output as ASCII instead of UTF-8
|
65
|
-
body.force_encoding("UTF-8") unless body.nil? || !body.respond_to?(:force_encoding)
|
65
|
+
#body.force_encoding("UTF-8") unless body.nil? || !body.respond_to?(:force_encoding)
|
66
66
|
@json ||= MultiJson.decode(body)
|
67
67
|
end
|
68
68
|
|