clientele 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/clientele/configuration.rb +5 -4
- data/lib/clientele/request.rb +1 -1
- data/lib/clientele/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cf633bfc9e71336fb1fed5e59a856a27e90e6b9
|
4
|
+
data.tar.gz: ebfd498e47f31f6f292ae6c1f38fa1b10243cf67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dc2ef3cccbbae1407df294e0f4add34e8069b03c6960124e0a4c5ce64b23880c919f3e0efd378096bc40453cca8c61c09f363e482198354463fada89ce4fff1
|
7
|
+
data.tar.gz: abf298c3c16c2bc93a523b837f3490ea3c23b45b718600ec929818e8aef1f37b16be042223b4e1491ca22a2136dacbe4a7731de491187b19c7b9eea7bb3e7ea8
|
@@ -5,12 +5,13 @@ require 'faraday'
|
|
5
5
|
module Clientele
|
6
6
|
class Configuration < BlockParty::Configuration
|
7
7
|
|
8
|
-
attr_accessor :logger, :adapter, :headers, :root_url
|
8
|
+
attr_accessor :logger, :adapter, :headers, :hashify_content_type, :root_url
|
9
9
|
|
10
10
|
def initialize
|
11
|
-
self.logger
|
12
|
-
self.adapter
|
13
|
-
self.headers
|
11
|
+
self.logger = Logger.new($stdout)
|
12
|
+
self.adapter = Faraday.default_adapter
|
13
|
+
self.headers = {}
|
14
|
+
self.hashify_content_type = /\bjson$/
|
14
15
|
end
|
15
16
|
|
16
17
|
end
|
data/lib/clientele/request.rb
CHANGED
@@ -67,7 +67,7 @@ module Clientele
|
|
67
67
|
def faraday_client
|
68
68
|
Faraday.new(options[:root_url]) do |conn|
|
69
69
|
conn.response :rashify
|
70
|
-
conn.response :json, content_type:
|
70
|
+
conn.response :json, content_type: options[:hashify_content_type], preserve_raw: true
|
71
71
|
conn.adapter options[:adapter]
|
72
72
|
end
|
73
73
|
end
|
data/lib/clientele/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clientele
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Keele
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|