desk 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.mkd +2 -2
- data/lib/desk/configuration.rb +8 -1
- data/lib/desk/connection.rb +2 -1
- data/lib/desk/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: 2f285981435f8592275bc898ccaba46541b67c48
|
4
|
+
data.tar.gz: cdb6531ea0b3e13043edc680fe402aeae6cb38b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faaf01bebe7143e7effe28243b6bd2092352ff5eaa1bbc8691f3ae2144787ce0cc6dfc7f593a96990a7167c585669c8fe1aaaa9429736bedee7aafd76f8ac465
|
7
|
+
data.tar.gz: ce78038d51a3201d5b295ffda912b624c1863e49491727b71fe7683773ee31eb360bbcbddc255d5ae77427ca708e1849fce97ebcf39d9cd076c9292088921756
|
data/README.mkd
CHANGED
@@ -262,10 +262,10 @@ Usage Examples
|
|
262
262
|
# Update a customer
|
263
263
|
Desk.update_customer(123,
|
264
264
|
:first_name => "Johnny",
|
265
|
-
:emails =>
|
265
|
+
:emails => [
|
266
266
|
{ :type => "work", :value => "johnny@acme.com" },
|
267
267
|
{ :type => "other", :value => "johnny@other.com" }
|
268
|
-
|
268
|
+
],
|
269
269
|
:custom_fields => { :level => "super" }
|
270
270
|
)
|
271
271
|
|
data/lib/desk/configuration.rb
CHANGED
@@ -10,6 +10,7 @@ module Desk
|
|
10
10
|
:consumer_key,
|
11
11
|
:consumer_secret,
|
12
12
|
:format,
|
13
|
+
:logger,
|
13
14
|
:max_requests,
|
14
15
|
:oauth_token,
|
15
16
|
:oauth_token_secret,
|
@@ -41,7 +42,12 @@ module Desk
|
|
41
42
|
#
|
42
43
|
# @note JSON is preferred over XML because it is more concise and faster to parse.
|
43
44
|
DEFAULT_FORMAT = :json
|
44
|
-
|
45
|
+
|
46
|
+
# The logger that will be used to log all HTTP requests
|
47
|
+
#
|
48
|
+
# @note By default, don't set any logger
|
49
|
+
DEFAULT_LOGGER = nil
|
50
|
+
|
45
51
|
# By default, set the max requests to 60 per minute
|
46
52
|
DEFAULT_MAX_REQUESTS = 60
|
47
53
|
|
@@ -93,6 +99,7 @@ module Desk
|
|
93
99
|
self.consumer_key = DEFAULT_CONSUMER_KEY
|
94
100
|
self.consumer_secret = DEFAULT_CONSUMER_SECRET
|
95
101
|
self.format = DEFAULT_FORMAT
|
102
|
+
self.logger = DEFAULT_LOGGER
|
96
103
|
self.max_requests = DEFAULT_MAX_REQUESTS
|
97
104
|
self.oauth_token = DEFAULT_OAUTH_TOKEN
|
98
105
|
self.oauth_token_secret = DEFAULT_OAUTH_TOKEN_SECRET
|
data/lib/desk/connection.rb
CHANGED
@@ -13,7 +13,7 @@ module Desk
|
|
13
13
|
options = {
|
14
14
|
:headers => {'Accept' => "application/#{format}", 'User-Agent' => user_agent},
|
15
15
|
:proxy => proxy,
|
16
|
-
:ssl => {:verify => false},
|
16
|
+
:ssl => {:verify => false, :version => 'SSLv23'},
|
17
17
|
:url => api_endpoint,
|
18
18
|
}
|
19
19
|
|
@@ -34,6 +34,7 @@ module Desk
|
|
34
34
|
end
|
35
35
|
builder.use Faraday::Response::RaiseHttp5xx
|
36
36
|
builder.adapter(adapter)
|
37
|
+
builder.response :logger, logger unless logger.nil?
|
37
38
|
end
|
38
39
|
end
|
39
40
|
end
|
data/lib/desk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: desk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Warren
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|