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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83a2591419c7df269b53c2480a9f51c9b2a4c403
4
- data.tar.gz: 23c48c01263c44c15cd55d3181b123ad882d0404
3
+ metadata.gz: 2f285981435f8592275bc898ccaba46541b67c48
4
+ data.tar.gz: cdb6531ea0b3e13043edc680fe402aeae6cb38b1
5
5
  SHA512:
6
- metadata.gz: e280f9adb51aab211c141877c8947e7d418a930d503610e8c27e19c6721c60f453e9e997da6c335989532e6e264761386a4c89e7a9badf50ebc9029c6ab44d11
7
- data.tar.gz: 372ed81507bd3d2033765e5c4752c0716871369b75b0f03c0d9a638aa5d13b79f2e98b404f97b74475f632955bb52de270bfc6da3068ad6375b44e8aff4991eb
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
 
@@ -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
@@ -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
@@ -1,4 +1,4 @@
1
1
  module Desk
2
2
  # The version of the gem
3
- VERSION = '1.0.3'.freeze unless defined?(::Desk::VERSION)
3
+ VERSION = '1.0.4'.freeze unless defined?(::Desk::VERSION)
4
4
  end
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.3
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-07-31 00:00:00.000000000 Z
11
+ date: 2014-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri