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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d1fa1af558c66f055f6fe0199c1733e6397f963c
4
- data.tar.gz: c5b5525f439229fa8b4633bb804971324ba07481
2
+ SHA256:
3
+ metadata.gz: a826c0040b24885ccbde5486f9fcc16a582ced8fd0e37b2c363836d69bff16d2
4
+ data.tar.gz: 2fe254d5364b8b085082cf1bd2b57b3c51a6d19ffbd6947af4d7e8a067abdcbd
5
5
  SHA512:
6
- metadata.gz: 5f81314ec97a5383cbc63eee709122508ec6c6af177c08f4359419f50499df4389f6b405576982aba02c6f9b5ee1553e28a8c756e5e401e039764ba39116afb3
7
- data.tar.gz: 9cd5a8bf9c16232d8593304fed7e6ba098baf057646f02837bee5a78c61bbddfbd3fe175e0baae66f3158e9b2ea4f18e447832119a6da257960d34345554714d
6
+ metadata.gz: 6ef9c2d6c3df55be722c2cc113a04dfa6d5114ffba6d6814ac2c054d982666ea9838807eea9918c46937228768e83b95b025339364a1c2c8637da2e044485826
7
+ data.tar.gz: 7c7655992acb0e7983b09cd1931ab184b6c9d1a1979b30513005a18f6f6bb731af14f0f9623e8fe38aa98530255ad9900d4c20bd4621c0728da01384d2bac7e9
@@ -1,7 +1,24 @@
1
- v???
1
+ v1.2.0
2
2
  -------------------------
3
3
 
4
- - rename gem to `ruby_universign` and `ESign` module to `Universign`
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
  -------------------------
@@ -1,13 +1,73 @@
1
- # Contributor Code of Conduct
1
+ # Contributor Covenant Code of Conduct
2
2
 
3
- As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
3
+ ## Our Pledge
4
4
 
5
- We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
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
- Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
12
+ ## Our Standards
8
13
 
9
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
10
16
 
11
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
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
- This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
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 for [CapSens](https://capsens.eu/) internal usage.
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 run `bundle`
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
- # get back universign transaction:
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 [https://help.universign.com/hc/fr/sections/360000148149-Guides-Universign]().
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
- (# TODO) 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).
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
@@ -1,3 +1,3 @@
1
1
  module Universign
2
- VERSION = "0.2.0"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -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 [Universign](https://www.universign.com/) electronic signature API.
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 **not** officialy made by Universign, but was originally created for [CapSens](https://capsens.eu/) internal usage.
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: 0.2.0
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: 2018-09-26 00:00:00.000000000 Z
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 [Universign](https://www.universign.com/) electronic signature API.
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 **not** officialy made by Universign, but was originally created for [CapSens](https://capsens.eu/) internal usage.
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
- rubyforge_project:
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