ruby_universign 0.2.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +19 -2
- data/CODE_OF_CONDUCT.md +67 -7
- data/README.md +23 -13
- data/lib/universign/service/transaction.rb +2 -1
- data/lib/universign/signature_field.rb +7 -2
- data/lib/universign/version.rb +1 -1
- data/ruby_universign.gemspec +2 -2
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a826c0040b24885ccbde5486f9fcc16a582ced8fd0e37b2c363836d69bff16d2
|
4
|
+
data.tar.gz: 2fe254d5364b8b085082cf1bd2b57b3c51a6d19ffbd6947af4d7e8a067abdcbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ef9c2d6c3df55be722c2cc113a04dfa6d5114ffba6d6814ac2c054d982666ea9838807eea9918c46937228768e83b95b025339364a1c2c8637da2e044485826
|
7
|
+
data.tar.gz: 7c7655992acb0e7983b09cd1931ab184b6c9d1a1979b30513005a18f6f6bb731af14f0f9623e8fe38aa98530255ad9900d4c20bd4621c0728da01384d2bac7e9
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,24 @@
|
|
1
|
-
|
1
|
+
v1.2.0
|
2
2
|
-------------------------
|
3
3
|
|
4
|
-
-
|
4
|
+
- Add `chaining_mode` to `Universign::Transaction` options.
|
5
|
+
|
6
|
+
v1.1.1
|
7
|
+
-------------------------
|
8
|
+
|
9
|
+
- bugfix : do not add `name` parameter to SignatureField when it's nil.
|
10
|
+
|
11
|
+
v1.1.0
|
12
|
+
-------------------------
|
13
|
+
|
14
|
+
- SignatureField can be managed with a named field instead of coordinates.
|
15
|
+
|
16
|
+
v1.0.0
|
17
|
+
-------------------------
|
18
|
+
|
19
|
+
- rename gem to `ruby_universign`
|
20
|
+
- rename`ESign` module to `Universign`
|
21
|
+
- release gem on rubygems
|
5
22
|
|
6
23
|
v0.1.6 (26/11/2015)
|
7
24
|
-------------------------
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -1,13 +1,73 @@
|
|
1
|
-
# Contributor Code of Conduct
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
2
|
|
3
|
-
|
3
|
+
## Our Pledge
|
4
4
|
|
5
|
-
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
6
11
|
|
7
|
-
|
12
|
+
## Our Standards
|
8
13
|
|
9
|
-
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
10
16
|
|
11
|
-
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
12
22
|
|
13
|
-
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at development@capsens.eu. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ RubyUniversign is a Ruby gem for interacting with [Universign](https://www.unive
|
|
4
4
|
|
5
5
|
It ease requests to Universign API, documents uploads and following signature state.
|
6
6
|
|
7
|
-
This gem is **not** officialy made by Universign, but was originally created
|
7
|
+
This gem is **not** officialy made by Universign, but was originally created by [CapSens](https://capsens.eu/) for internal usage.
|
8
8
|
|
9
9
|
This gem currently integrate electronic signature service, but not other Universign services (timestamping and server stamp).
|
10
10
|
|
@@ -16,9 +16,20 @@ Add this line to your application's Gemfile:
|
|
16
16
|
gem 'ruby_universign', require: 'universign'
|
17
17
|
```
|
18
18
|
|
19
|
-
And then
|
19
|
+
And then `bundle`
|
20
|
+
|
21
|
+
Or install it with:
|
22
|
+
|
23
|
+
```
|
24
|
+
gem install ruby_universign
|
25
|
+
```
|
26
|
+
|
27
|
+
And load it with:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
require 'universign'
|
31
|
+
```
|
20
32
|
|
21
|
-
Or, #TODO
|
22
33
|
|
23
34
|
## Usage
|
24
35
|
|
@@ -66,10 +77,10 @@ transaction.url
|
|
66
77
|
transaction.transaction_id
|
67
78
|
# => "9696179e-a43d-4803-beeb-9e5c02fd159b"
|
68
79
|
|
69
|
-
#
|
80
|
+
# reload transaction data from universign:
|
70
81
|
transaction = Universign::Transaction.new('9696179e-a43d-4803-beeb-9e5c02fd159b')
|
82
|
+
# was the transaction signed by the user ?
|
71
83
|
transaction.signed?
|
72
|
-
|
73
84
|
```
|
74
85
|
|
75
86
|
### `Universign::Document`
|
@@ -80,6 +91,10 @@ It can be created with either your file's content or your file's url.
|
|
80
91
|
|
81
92
|
Nothing much to say here. It follows Universign's signature field.
|
82
93
|
|
94
|
+
You can pass the coordinates of the signature or the name of the field.
|
95
|
+
|
96
|
+
If the PDF already contains a named signature field, you can use this parameter instead of giving the coordinates (which will be ignored). If the name of this field does not exist in the document, the given coordinates will be used instead.
|
97
|
+
|
83
98
|
### `Universign::TransactionSigner`
|
84
99
|
|
85
100
|
* `success_url` is where your user will be redirected after signing the documents.
|
@@ -103,6 +118,7 @@ handwritten_signature
|
|
103
118
|
profile
|
104
119
|
final_doc_sent
|
105
120
|
final_doc_requester_sent
|
121
|
+
chaining_mode
|
106
122
|
```
|
107
123
|
|
108
124
|
Default options are:
|
@@ -124,7 +140,7 @@ Once your transaction is created:
|
|
124
140
|
|
125
141
|
## Universign documentation
|
126
142
|
|
127
|
-
As of September 25th 2018, all official Universign documentation can be found at
|
143
|
+
As of September 25th 2018, all official Universign documentation can be found at https://help.universign.com/hc/fr/sections/360000148149-Guides-Universign.
|
128
144
|
|
129
145
|
## Development
|
130
146
|
|
@@ -132,7 +148,7 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
132
148
|
|
133
149
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
134
150
|
|
135
|
-
|
151
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
136
152
|
|
137
153
|
## Contributing
|
138
154
|
|
@@ -141,9 +157,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/CapSen
|
|
141
157
|
## License
|
142
158
|
|
143
159
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
## notes
|
148
|
-
|
149
|
-
final_doc_sent: pour que le document soit envoyé par mail au signataire
|
@@ -11,7 +11,8 @@ module Universign
|
|
11
11
|
handwritten_signature: :handwrittenSignature,
|
12
12
|
profile: :profile,
|
13
13
|
final_doc_sent: :finalDocSent,
|
14
|
-
final_doc_requester_sent: :finalDocRequesterSent
|
14
|
+
final_doc_requester_sent: :finalDocRequesterSent,
|
15
|
+
chaining_mode: :chainingMode
|
15
16
|
}
|
16
17
|
|
17
18
|
DEFAULT_OPTIONS = {
|
@@ -2,8 +2,9 @@ module Universign
|
|
2
2
|
class SignatureField
|
3
3
|
attr_reader :params
|
4
4
|
|
5
|
-
def initialize(coordinate:, page:)
|
6
|
-
@coordinate = coordinate
|
5
|
+
def initialize(coordinate:, name: nil, page:)
|
6
|
+
@coordinate = coordinate || [0, 0]
|
7
|
+
@name = name
|
7
8
|
@page = page
|
8
9
|
|
9
10
|
@params = {
|
@@ -11,6 +12,10 @@ module Universign
|
|
11
12
|
x: @coordinate[0],
|
12
13
|
y: @coordinate[1]
|
13
14
|
}
|
15
|
+
|
16
|
+
@params[:name] = @name unless @name.nil?
|
17
|
+
|
18
|
+
@params
|
14
19
|
end
|
15
20
|
end
|
16
21
|
end
|
data/lib/universign/version.rb
CHANGED
data/ruby_universign.gemspec
CHANGED
@@ -11,9 +11,9 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = "Universign's API Wrapper"
|
13
13
|
spec.description = <<~EOF
|
14
|
-
Ruby gem for interacting with
|
14
|
+
Ruby gem for interacting with Universign electronic signature API.
|
15
15
|
It ease requests to Universign API, documents uploads and following signature state.
|
16
|
-
This gem is
|
16
|
+
This gem is *not* officialy made by Universign, but was originally created by CapSens for internal usage.
|
17
17
|
EOF
|
18
18
|
spec.homepage = "https://github.com/CapSens/universign"
|
19
19
|
spec.license = "MIT"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_universign
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Besnard
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-07-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -111,9 +111,9 @@ dependencies:
|
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '4.0'
|
113
113
|
description: |
|
114
|
-
Ruby gem for interacting with
|
114
|
+
Ruby gem for interacting with Universign electronic signature API.
|
115
115
|
It ease requests to Universign API, documents uploads and following signature state.
|
116
|
-
This gem is
|
116
|
+
This gem is *not* officialy made by Universign, but was originally created by CapSens for internal usage.
|
117
117
|
email:
|
118
118
|
- besnard.nicolas@gmail.com
|
119
119
|
- yassine@capsens.eu
|
@@ -168,8 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
|
-
|
172
|
-
rubygems_version: 2.6.8
|
171
|
+
rubygems_version: 3.0.3
|
173
172
|
signing_key:
|
174
173
|
specification_version: 4
|
175
174
|
summary: Universign's API Wrapper
|