ruby_universign 1.5.1 → 1.6.0
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 +4 -0
- data/README.md +41 -26
- data/lib/universign/document.rb +13 -0
- data/lib/universign/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b9f405760f5eb18d3bad2c05134f42af4d4dc9defe30639b2f1e60e93c7a223
|
4
|
+
data.tar.gz: a109b5e69cbcab3e2314f98976054543269047ee04e984ddb2847e238189c8e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cdb8b72105f47ad3bf4280687c37b20e8c54f3ee8b04e6a35ec799c6db2872231000ec1f3976927b313c12b795ec5387552b74470ef250ae8b69385bd230d5d
|
7
|
+
data.tar.gz: b9fac92d473ac23ddd78431ee05b29a1f4b9df8c0aa2515c5b57718caf3175b6af8aee2bbff6dee0bceb5de3e242eae8ebb430526162fc1e50575ef935b92574
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -85,32 +85,47 @@ transaction = Universign::Transaction.new('9696179e-a43d-4803-beeb-9e5c02fd159b'
|
|
85
85
|
transaction.signed?
|
86
86
|
```
|
87
87
|
|
88
|
-
The gem also supports the updated way of creating multiple
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
88
|
+
The gem also supports the updated way of creating multiple fields per document:
|
89
|
+
|
90
|
+
- Multiple signatures
|
91
|
+
```ruby
|
92
|
+
doc_1 = Universign::Document.new(
|
93
|
+
name: 'one.pdf',
|
94
|
+
content: File.open('spec/fixtures/universign-guide-8.8.pdf').read,
|
95
|
+
signature_fields: [
|
96
|
+
Universign::SignatureField.new(coordinate: [20, 20], page: 1, signer_index: 0),
|
97
|
+
Universign::SignatureField.new(coordinate: [80, 20], page: 1, signer_index: 0)
|
98
|
+
]
|
99
|
+
)
|
100
|
+
|
101
|
+
doc_2 = Universign::Document.new(
|
102
|
+
name: 'two.pdf',
|
103
|
+
content: File.open('spec/fixtures/universign-guide-8.8.pdf').read,
|
104
|
+
signature_fields: [
|
105
|
+
Universign::SignatureField.new(coordinate: [100, 120], page: 4, signer_index: 0),
|
106
|
+
]
|
107
|
+
)
|
108
|
+
|
109
|
+
transaction = Universign::Transaction.create(
|
110
|
+
documents: [doc_1, doc_2],
|
111
|
+
signers: [signer],
|
112
|
+
options: { profile: 'default', final_doc_sent: true }
|
113
|
+
)
|
114
|
+
```
|
115
|
+
|
116
|
+
- Multiple checkboxes
|
117
|
+
```ruby
|
118
|
+
Universign::Document.new(
|
119
|
+
name: "one.pdf",
|
120
|
+
content: File.open("spec/fixtures/universign-guide-8.8.pdf").read,
|
121
|
+
check_box_texts: [
|
122
|
+
"My first checkbox text",
|
123
|
+
"My second checkbox text",
|
124
|
+
""
|
125
|
+
]
|
126
|
+
)
|
127
|
+
```
|
128
|
+
Note that the last checkbox must be an empty string as requested in the official documentation.
|
114
129
|
|
115
130
|
### `Universign::Document`
|
116
131
|
|
data/lib/universign/document.rb
CHANGED
@@ -88,6 +88,19 @@ module Universign
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
+
def check_box_texts
|
92
|
+
@check_box_texts ||= params["checkBoxTexts"]
|
93
|
+
end
|
94
|
+
|
95
|
+
def check_box_texts=(data)
|
96
|
+
if !data.is_a?(Array)
|
97
|
+
raise "CheckBoxTextsMustBeAnArray"
|
98
|
+
end
|
99
|
+
|
100
|
+
@check_box_texts = data
|
101
|
+
params["checkBoxTexts"] = data
|
102
|
+
end
|
103
|
+
|
91
104
|
# The meta data of the PDF document
|
92
105
|
#
|
93
106
|
# @return [Hash]
|
data/lib/universign/version.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_universign
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Besnard
|
8
8
|
- Yassine Zenati
|
9
9
|
- Antoine Becquet
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-05-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -167,7 +167,7 @@ homepage: https://github.com/CapSens/universign
|
|
167
167
|
licenses:
|
168
168
|
- MIT
|
169
169
|
metadata: {}
|
170
|
-
post_install_message:
|
170
|
+
post_install_message:
|
171
171
|
rdoc_options: []
|
172
172
|
require_paths:
|
173
173
|
- lib
|
@@ -182,8 +182,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
182
|
- !ruby/object:Gem::Version
|
183
183
|
version: '0'
|
184
184
|
requirements: []
|
185
|
-
rubygems_version: 3.
|
186
|
-
signing_key:
|
185
|
+
rubygems_version: 3.3.7
|
186
|
+
signing_key:
|
187
187
|
specification_version: 4
|
188
188
|
summary: Universign's API Wrapper
|
189
189
|
test_files: []
|