clicksign-api 1.1.1 → 1.1.5.alpha
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/CHANGELOG.md +15 -5
- data/Gemfile.lock +3 -3
- data/clicksign-api.gemspec +1 -1
- data/lib/clicksign/api/document.rb +4 -0
- data/lib/clicksign/api/requests.rb +8 -0
- data/lib/clicksign/api/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bdd7d48a08c3225aae10eede4031c554eb0d0c8b5f3b3616957c8f502dc993a
|
4
|
+
data.tar.gz: cff82c8513c5632ebd1fa558046e380705dea1af3ca0b240630a4dd531506f94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fadaa99e33620656ddb50c71043b29a56c1c9e12b6278f4ee7fbf52d641e00742b9c6263cabc50555d069efb93c5e5bad5d177617f29be1ebbb7fff36f48bc85
|
7
|
+
data.tar.gz: a4f4ffbce2a7b44de28cdab8dccdb5fae54a4abcb12746860270333f72f50acc9df8205d6fbb49a4d26a5f846559a5625cb2d92d14433a5c1db08d34456d9666
|
data/CHANGELOG.md
CHANGED
@@ -1,15 +1,25 @@
|
|
1
1
|
# Clicksign::API 1.1.0 (Octuber 29, 2021)
|
2
2
|
|
3
3
|
Add support to multiple credentials.
|
4
|
-
This is useful to work with different
|
4
|
+
This is useful to work with different environments, providing flexibility.
|
5
5
|
For example, applications have different tokens for each environment.
|
6
6
|
Other useful case, occurs working with multiple companies.
|
7
7
|
|
8
|
-
The credentials should be a hash.
|
8
|
+
The credentials should be a hash.
|
9
|
+
It is possible use a `.yml` file to configure the authentication tokens.
|
10
|
+
The `.yml` file can get the tokens using environment variables.
|
11
|
+
Now all requests receive token parameter, that represents the key associated with the token.
|
12
|
+
|
13
|
+
## Examples:
|
14
|
+
|
15
|
+
YML file
|
16
|
+
```yml
|
17
|
+
key.production: 'CLICKSIGN_ACCESS_TOKEN_PRODUCTION'
|
18
|
+
key.sandbox: 'CLICKSIGN_ACCESS_TOKEN_SANDBOX'
|
19
|
+
```
|
9
20
|
|
10
21
|
Request:
|
11
22
|
```ruby
|
12
23
|
file = File.open('/path/to/file/local/file.pdf', 'r')
|
13
|
-
response = Clicksign::API::Document.create(params: { path: '/path/to/file/on/clicksign.pdf', file: file }, token: 'key.production')
|
14
|
-
|
15
|
-
```
|
24
|
+
response = Clicksign::API::Document.create( params: { path: '/path/to/file/on/clicksign.pdf', file: file }, token: 'key.production')
|
25
|
+
```
|
data/Gemfile.lock
CHANGED
data/clicksign-api.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 2.2'
|
25
25
|
spec.add_development_dependency 'rake', '~> 13.0'
|
26
26
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
|
-
spec.add_dependency 'faraday'
|
27
|
+
spec.add_dependency 'faraday', '1.8.0'
|
28
28
|
|
29
29
|
spec.add_development_dependency 'simplecov', '~> 0.16'
|
30
30
|
spec.add_development_dependency 'vcr', '~> 4.0'
|
@@ -16,6 +16,14 @@ module Clicksign
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
def patch(request_path, body, token)
|
20
|
+
conn.patch do |req|
|
21
|
+
req.url request_path, { access_token: Clicksign::API.credentials[token] }
|
22
|
+
req.headers['Content-Type'] = 'application/json'
|
23
|
+
req.body = body.to_json
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
19
27
|
def conn
|
20
28
|
@conn ||= Faraday.new(url: Clicksign::API.url)
|
21
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clicksign-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5.alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francisco Martins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: faraday
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.8.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 1.8.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: simplecov
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,11 +194,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
194
194
|
version: '0'
|
195
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
196
|
requirements:
|
197
|
-
- - "
|
197
|
+
- - ">"
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version:
|
199
|
+
version: 1.3.1
|
200
200
|
requirements: []
|
201
|
-
rubygems_version: 3.
|
201
|
+
rubygems_version: 3.0.8
|
202
202
|
signing_key:
|
203
203
|
specification_version: 4
|
204
204
|
summary: Clicksign API ruby interface
|