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 +4 -4
- data/lib/hello_sign/client.rb +9 -2
- data/lib/hello_sign/configuration.rb +4 -1
- data/lib/hello_sign/version.rb +1 -1
- data/spec/hello_sign/client_spec.rb +4 -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: 6fb1e4a754d22e283c4a7fa5d1d924493537ff19
|
|
4
|
+
data.tar.gz: 31751034182f44c481af59a979d6bffaea02c673
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be2cb12f1c52af4e041afb39d5e1e9cfcf6a538a9d6ce3e672802843fc1fc1b5a23a95c697fb27c286b2a8cd78da44864c0fc8fbc89b0f9450f1b5c6f328ad9b
|
|
7
|
+
data.tar.gz: d1875d63b1f29c066fd701c7ea6f92e3be379f501144eba3f32aab62b6dd200b9217220cb29562e825d6d459e65cff75d038744a87fc8c2ff36cccb2b4031ef0
|
data/lib/hello_sign/client.rb
CHANGED
|
@@ -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
|
data/lib/hello_sign/version.rb
CHANGED
|
@@ -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.
|
|
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-
|
|
11
|
+
date: 2015-09-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|