hellosign-ruby-sdk 3.2.1 → 3.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b23e0f802aea858ad1046cc71b397b86570bae28
4
- data.tar.gz: 80e87cb8f2d435df382e8f3d2b125685441ef9c3
3
+ metadata.gz: 6fb1e4a754d22e283c4a7fa5d1d924493537ff19
4
+ data.tar.gz: 31751034182f44c481af59a979d6bffaea02c673
5
5
  SHA512:
6
- metadata.gz: 58187b8922d95bd77b1cfed6943bb6571108f127b3320a4cd30d67e78bb36806cff944275e29fa76429ba574dcf5a50deac5bc524896a03f7918e3e83c3dc343
7
- data.tar.gz: 8d0938c9e96ef089ae0fb22d4c9fba44482beabed59ee83c04a65b486e95cced6bcb2f0b0144f2d183be6aa3398374d754b3cee8d1fb2e844d8ada8f8ccdbdeb
6
+ metadata.gz: be2cb12f1c52af4e041afb39d5e1e9cfcf6a538a9d6ce3e672802843fc1fc1b5a23a95c697fb27c286b2a8cd78da44864c0fc8fbc89b0f9450f1b5c6f328ad9b
7
+ data.tar.gz: d1875d63b1f29c066fd701c7ea6f92e3be379f501144eba3f32aab62b6dd200b9217220cb29562e825d6d459e65cff75d038744a87fc8c2ff36cccb2b4031ef0
@@ -51,7 +51,7 @@ module HelloSign
51
51
  include Api::OAuth
52
52
  include Api::ApiApp
53
53
 
54
- attr_accessor :end_point, :oauth_end_point, :api_version, :user_agent, :client_id, :client_secret, :email_address, :password, :api_key, :auth_token, :logging, :log_level
54
+ attr_accessor :end_point, :oauth_end_point, :api_version, :user_agent, :client_id, :client_secret, :email_address, :password, :api_key, :auth_token, :logging, :log_level, :proxy_uri, :proxy_user, :proxy_pass
55
55
 
56
56
  ERRORS = {
57
57
  400 => Error::BadRequest,
@@ -163,6 +163,13 @@ module HelloSign
163
163
  connection.basic_auth email_address, password
164
164
  else
165
165
  end
166
+ if proxy_uri
167
+ connection.options.proxy = {
168
+ :uri => proxy_uri,
169
+ :user => proxy_user,
170
+ :password => proxy_pass
171
+ }
172
+ end
166
173
  connection
167
174
  end
168
175
 
@@ -225,7 +232,7 @@ module HelloSign
225
232
  opts[:"file[#{index}]"] = Faraday::UploadIO.new(file, mime_type)
226
233
  elsif defined? ActionDispatch::Http::UploadedFile
227
234
  if file.is_a? ActionDispatch::Http::UploadedFile
228
- mime_type MIMEfromIO file
235
+ mime_type = MIMEfromIO file
229
236
  opts[:"file[#{index}]"] = UploadIO.new(file.tempfile, mime_type)
230
237
  end
231
238
  else
@@ -33,7 +33,7 @@ module HelloSign
33
33
  DEFAULT_ENDPOINT = 'https://api.hellosign.com'
34
34
  DEFAULT_API_VERSION = '/v3'
35
35
  DEFAULT_OAUTH_ENDPOINT = 'https://www.hellosign.com'
36
- VALID_OPTIONS_KEYS = [:end_point, :oauth_end_point, :api_version, :user_agent, :client_id, :client_secret, :email_address, :password, :api_key, :auth_token, :log_level, :logging]
36
+ VALID_OPTIONS_KEYS = [:end_point, :oauth_end_point, :api_version, :user_agent, :client_id, :client_secret, :email_address, :password, :api_key, :auth_token, :log_level, :logging, :proxy_uri, :proxy_user, :proxy_pass]
37
37
 
38
38
 
39
39
  DEFAULT_USER_AGENT = "hellosign-ruby-sdk/" + HelloSign::VERSION
@@ -74,6 +74,9 @@ module HelloSign
74
74
  self.user_agent = DEFAULT_USER_AGENT
75
75
  self.log_level = 3
76
76
  self.logging = true
77
+ self.proxy_uri = nil
78
+ self.proxy_user = nil
79
+ self.proxy_pass = nil
77
80
  end
78
81
  end
79
82
  end
@@ -23,5 +23,5 @@
23
23
  #
24
24
 
25
25
  module HelloSign
26
- VERSION = '3.2.1'
26
+ VERSION = '3.2.2'
27
27
  end
@@ -25,7 +25,10 @@ describe HelloSign::Client do
25
25
  :client_secret => 'client_secret',
26
26
  :auth_token => 'auth_token',
27
27
  :log_level => 5,
28
- :logging => false
28
+ :logging => false,
29
+ :proxy_uri => 'proxy_uri',
30
+ :proxy_user => 'proxy_user',
31
+ :proxy_pass => 'proxy_pass'
29
32
  }
30
33
  }
31
34
  subject(:client) { HelloSign::Client.new custom_client }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hellosign-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - HelloSign
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-27 00:00:00.000000000 Z
11
+ date: 2015-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler