taric 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/taric/configuration.rb +2 -1
- data/lib/taric/connection.rb +1 -1
- data/lib/taric/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 871444032fb832253f34b2d8c2b4b3ce5fd28282
|
4
|
+
data.tar.gz: db216e720e8ff60ee13fe4f38f2a80cf7cb8d384
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ceb5cca00e5a83af4df3fd4234391cc6bc024cb6b5b0c8677faa6407929ae41b917ecc726893b06326a2777f1bf7186d6bd8e4ed52d4205cb508d8d9a1ea8f4
|
7
|
+
data.tar.gz: c3cf532d5ab3e2b2b56d681c453fbf94bb748e67b8f159c8d1830154957601cd1ba906509d7f7d4ddf6fd86aece12e4ce741c2d9d2e61f8180fbaf84806b2603
|
data/lib/taric/configuration.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Taric
|
2
2
|
class Configuration
|
3
|
-
attr_accessor :api_key, :format, :user_agent, :connection_opts, :adapter, :region, :requestor, :response_handler, :parallel_requestor, :parallel_response_handler
|
3
|
+
attr_accessor :api_key, :format, :user_agent, :connection_opts, :adapter, :region, :requestor, :response_handler, :parallel_requestor, :parallel_response_handler, :raw
|
4
4
|
|
5
5
|
DEFAULT_REQUESTOR = -> connection, url {
|
6
6
|
connection.get url
|
@@ -29,6 +29,7 @@ module Taric
|
|
29
29
|
@response_handler = options.fetch(:response_handler, DEFAULT_RESPONSE_HANDLER)
|
30
30
|
@parallel_requestor = options.fetch(:parallel_requestor, PARALLEL_REQUESTOR)
|
31
31
|
@parallel_response_handler = options.fetch(:parallel_response_handler, PARALLEL_RESPONSE_HANDLER)
|
32
|
+
@raw = options.fetch(:raw, false)
|
32
33
|
end
|
33
34
|
end
|
34
35
|
end
|
data/lib/taric/connection.rb
CHANGED
@@ -10,7 +10,7 @@ module Taric
|
|
10
10
|
|
11
11
|
Faraday::Connection.new(options) do |conn|
|
12
12
|
conn.use Taric::FaradayMiddleware::HttpException
|
13
|
-
conn.response :oj, :content_type => /\bjson$/
|
13
|
+
conn.response :oj, :content_type => /\bjson$/ unless config.raw
|
14
14
|
conn.adapter config.adapter
|
15
15
|
end
|
16
16
|
end
|
data/lib/taric/version.rb
CHANGED