signaturit-sdk 0.0.2 → 0.0.3
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/signaturit_client.rb +5 -6
- data/signaturit-sdk.gemspec +2 -2
- 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: 45a1596bab672e72a4712300cecc87413849af29
|
4
|
+
data.tar.gz: d5997b95116ba6e29f1cffd3703520c0bdecdf4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccf9ef8d66dfac408fd1ddc3cb1328db0f62763d3cf0441af6f4a85553d42e54b4c21e1e4e4eef59e612b6943b4fe3629f18e21250a44634ebaea612d8bb6d84
|
7
|
+
data.tar.gz: 64e7058aa229cceb23344d6f47b40a5f984c43d639b0ae9abe503b2af8ca4731f1f42ae55e8a95402cb94ed7e0574224b250f7403b2709645028bb4c445f4fe1
|
data/lib/signaturit_client.rb
CHANGED
@@ -9,8 +9,9 @@ class SignaturitClient
|
|
9
9
|
|
10
10
|
# Initialize the object with the token and environment
|
11
11
|
def initialize(token, production = false)
|
12
|
-
|
13
|
-
|
12
|
+
base = production ? 'https://api.signaturit.com' : 'http://api.sandbox.signaturit.com'
|
13
|
+
|
14
|
+
@client = RestClient::Resource.new base, :headers => { :Authorization => "Bearer #{token}" }, :ssl_version => :TLSv1_2
|
14
15
|
end
|
15
16
|
|
16
17
|
# get info from your account
|
@@ -269,17 +270,15 @@ class SignaturitClient
|
|
269
270
|
|
270
271
|
# Common request method
|
271
272
|
def request(method, path, params = {}, to_json = true)
|
272
|
-
base = @production ? 'https://api.signaturit.com' : 'http://api.sandbox.signaturit.com'
|
273
|
-
|
274
273
|
case method
|
275
274
|
when :get, :delete
|
276
275
|
encoded = URI.encode_www_form(params)
|
277
276
|
path = "#{path}?#{encoded}" if encoded.length > 0
|
278
277
|
|
279
|
-
body =
|
278
|
+
body = @client[path].send method
|
280
279
|
|
281
280
|
else
|
282
|
-
body =
|
281
|
+
body = @client[path].send method, params
|
283
282
|
end
|
284
283
|
|
285
284
|
body = JSON.parse body if to_json
|
data/signaturit-sdk.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.platform = Gem::Platform::RUBY
|
3
3
|
s.name = 'signaturit-sdk'
|
4
|
-
s.version = '0.0.
|
5
|
-
s.date = '2014-
|
4
|
+
s.version = '0.0.3'
|
5
|
+
s.date = '2014-10-17'
|
6
6
|
s.summary = 'Signaturit Ruby SDK'
|
7
7
|
s.description = 'Sign Documents Online'
|
8
8
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: signaturit-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Signaturit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest_client
|