documenso_rails 1.0.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 +7 -0
- data/README.md +31 -0
- data/Rakefile +5 -0
- data/app/controllers/documenso_rails/webhooks_controller.rb +28 -0
- data/app/jobs/documenso_rails/process_webhook_job.rb +58 -0
- data/config/routes.rb +3 -0
- data/lib/documenso_rails/client.rb +143 -0
- data/lib/documenso_rails/configuration.rb +25 -0
- data/lib/documenso_rails/engine.rb +5 -0
- data/lib/documenso_rails/model.rb +65 -0
- data/lib/documenso_rails/version.rb +3 -0
- data/lib/documenso_rails.rb +27 -0
- data/lib/generators/documenso_rails/install_generator.rb +39 -0
- data/lib/generators/documenso_rails/templates/initializer.rb.tt +11 -0
- data/lib/generators/documenso_rails/templates/migration.rb.tt +11 -0
- metadata +105 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: db8c3390cae6ac493da6327ba0f962a86c85cdee4af5548b60e6d831c6f15d5e
|
|
4
|
+
data.tar.gz: 594c617bdae545b684dca60af4c9228370785a3dce624d94cae02b8da4f4731b
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 9af2e33708145691bd69d3bb62a44ddea61405d9cf27f70da4f798cac30bcdb739302560275fc28375983117f3dafe1be87a37c56143c9177dc907ab60869ee1
|
|
7
|
+
data.tar.gz: a10015369aa8d5e9cde12fdd0d2479d3087f33301f68931ec8cb79592ef93107af5260371de7b4db992be501e1ad798ba69c4547078092973f4635259894d2b8
|
data/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# DocumensoRails
|
|
2
|
+
|
|
3
|
+
A mountable Rails Engine and API v2 client for integrating Documenso (Cloud or self-hosted) into a Ruby on Rails application.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
1. Add `documenso_rails` to your `Gemfile` (e.g., placed inside `vendor/gems/documenso_rails`):
|
|
8
|
+
```ruby
|
|
9
|
+
gem "documenso_rails", path: "vendor/gems/documenso_rails"
|
|
10
|
+
```
|
|
11
|
+
2. Run the generator:
|
|
12
|
+
```bash
|
|
13
|
+
bundle install
|
|
14
|
+
rails g documenso_rails:install LegalDocument
|
|
15
|
+
rails db:migrate
|
|
16
|
+
```
|
|
17
|
+
3. Include `DocumensoRails::Model` in your model:
|
|
18
|
+
```ruby
|
|
19
|
+
class LegalDocument < ApplicationRecord
|
|
20
|
+
include DocumensoRails::Model
|
|
21
|
+
has_one_attached :unsigned_pdf
|
|
22
|
+
has_one_attached :signed_pdf
|
|
23
|
+
end
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Running Tests
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
bundle install
|
|
30
|
+
bundle exec rspec
|
|
31
|
+
```
|
data/Rakefile
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module DocumensoRails
|
|
2
|
+
class WebhooksController < ActionController::API
|
|
3
|
+
before_action :verify_secret!
|
|
4
|
+
|
|
5
|
+
def create
|
|
6
|
+
event = params[:event].to_s
|
|
7
|
+
payload = params[:payload]&.to_unsafe_h || {}
|
|
8
|
+
envelope_id = payload["envelopeId"]
|
|
9
|
+
|
|
10
|
+
if event.present? && envelope_id.present?
|
|
11
|
+
ProcessWebhookJob.perform_later(event, envelope_id, payload)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
head :ok
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
def verify_secret!
|
|
20
|
+
expected = DocumensoRails.configuration.webhook_secret.to_s
|
|
21
|
+
provided = request.headers["X-Documenso-Secret"].to_s
|
|
22
|
+
|
|
23
|
+
if expected.blank? || !ActiveSupport::SecurityUtils.secure_compare(expected, provided)
|
|
24
|
+
head :unauthorized
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
module DocumensoRails
|
|
2
|
+
class ProcessWebhookJob < ActiveJob::Base
|
|
3
|
+
queue_as :default
|
|
4
|
+
|
|
5
|
+
STATUS_MAP = {
|
|
6
|
+
"DOCUMENT_SENT" => "sent",
|
|
7
|
+
"DOCUMENT_OPENED" => "opened",
|
|
8
|
+
"DOCUMENT_SIGNED" => "partially_signed",
|
|
9
|
+
"DOCUMENT_COMPLETED" => "completed",
|
|
10
|
+
"DOCUMENT_REJECTED" => "rejected",
|
|
11
|
+
"DOCUMENT_CANCELLED" => "cancelled"
|
|
12
|
+
}.freeze
|
|
13
|
+
|
|
14
|
+
def perform(event, envelope_id, payload = {})
|
|
15
|
+
config = DocumensoRails.configuration
|
|
16
|
+
record = config.model_class.find_by(documenso_envelope_id: envelope_id)
|
|
17
|
+
return unless record
|
|
18
|
+
|
|
19
|
+
new_status = STATUS_MAP[event]
|
|
20
|
+
return unless new_status
|
|
21
|
+
|
|
22
|
+
return if record.signature_status == "completed" && new_status != "completed"
|
|
23
|
+
|
|
24
|
+
if event == "DOCUMENT_COMPLETED"
|
|
25
|
+
attach_completed_pdf!(record, envelope_id, config)
|
|
26
|
+
record.update!(
|
|
27
|
+
signature_status: "completed",
|
|
28
|
+
signature_completed_at: Time.current
|
|
29
|
+
)
|
|
30
|
+
else
|
|
31
|
+
record.update!(signature_status: new_status)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
ActiveSupport::Notifications.instrument(
|
|
35
|
+
"documenso.#{event.downcase}",
|
|
36
|
+
record: record,
|
|
37
|
+
envelope_id: envelope_id,
|
|
38
|
+
payload: payload
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
private
|
|
43
|
+
|
|
44
|
+
def attach_completed_pdf!(record, envelope_id, config)
|
|
45
|
+
signed_attachment = record.public_send(config.signed_attachment_name)
|
|
46
|
+
return if signed_attachment.attached?
|
|
47
|
+
|
|
48
|
+
pdf_binary = DocumensoRails.client.download_signed_pdf(envelope_id)
|
|
49
|
+
title_slug = (record.try(:title) || "document-#{record.id}").parameterize
|
|
50
|
+
|
|
51
|
+
signed_attachment.attach(
|
|
52
|
+
io: StringIO.new(pdf_binary),
|
|
53
|
+
filename: "signed_#{title_slug}.pdf",
|
|
54
|
+
content_type: "application/pdf"
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
data/config/routes.rb
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
require "net/http"
|
|
2
|
+
require "json"
|
|
3
|
+
|
|
4
|
+
module DocumensoRails
|
|
5
|
+
class Client
|
|
6
|
+
def initialize(base_url:, api_key:)
|
|
7
|
+
@base_url = base_url.to_s.chomp("/")
|
|
8
|
+
@api_key = api_key
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def create_and_send(file_io:, filename:, title:, signers:, fields:, redirect_url: nil)
|
|
12
|
+
envelope = create_envelope(
|
|
13
|
+
file_io: file_io,
|
|
14
|
+
filename: filename,
|
|
15
|
+
title: title,
|
|
16
|
+
signers: signers,
|
|
17
|
+
fields: fields,
|
|
18
|
+
redirect_url: redirect_url
|
|
19
|
+
)
|
|
20
|
+
envelope_id = envelope.fetch("id")
|
|
21
|
+
|
|
22
|
+
distribute_envelope(envelope_id)
|
|
23
|
+
envelope_id
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def create_and_send_from_template(template_id:, signers:, prefill_fields: {}, title: nil, redirect_url: nil)
|
|
27
|
+
envelope = use_template(
|
|
28
|
+
template_id: template_id,
|
|
29
|
+
signers: signers,
|
|
30
|
+
prefill_fields: prefill_fields,
|
|
31
|
+
title: title,
|
|
32
|
+
redirect_url: redirect_url
|
|
33
|
+
)
|
|
34
|
+
envelope_id = envelope.fetch("id")
|
|
35
|
+
|
|
36
|
+
distribute_envelope(envelope_id)
|
|
37
|
+
envelope_id
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def create_envelope(file_io:, filename:, title:, signers:, fields:, redirect_url: nil)
|
|
41
|
+
uri = URI("#{@base_url}/envelope/create")
|
|
42
|
+
request = Net::HTTP::Post.new(uri)
|
|
43
|
+
request["Authorization"] = @api_key
|
|
44
|
+
|
|
45
|
+
recipients = signers.each_with_index.map do |signer, idx|
|
|
46
|
+
signer_fields = fields.select { |f| f.fetch(:signer_index, 0) == idx }.map do |field|
|
|
47
|
+
{
|
|
48
|
+
identifier: idx,
|
|
49
|
+
type: field.fetch(:type, "SIGNATURE"),
|
|
50
|
+
page: field.fetch(:page, 1),
|
|
51
|
+
positionX: field.fetch(:x, 15),
|
|
52
|
+
positionY: field.fetch(:y, 80),
|
|
53
|
+
width: field.fetch(:width, 25),
|
|
54
|
+
height: field.fetch(:height, 6)
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
{
|
|
59
|
+
email: signer.fetch(:email),
|
|
60
|
+
name: signer.fetch(:name),
|
|
61
|
+
role: signer.fetch(:role, "SIGNER"),
|
|
62
|
+
fields: signer_fields
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
payload = {
|
|
67
|
+
type: "DOCUMENT",
|
|
68
|
+
title: title,
|
|
69
|
+
recipients: recipients
|
|
70
|
+
}
|
|
71
|
+
payload[:meta] = { redirectUrl: redirect_url } if redirect_url.present?
|
|
72
|
+
|
|
73
|
+
form_data = [
|
|
74
|
+
["payload", payload.to_json],
|
|
75
|
+
["files", file_io, { filename: filename, content_type: "application/pdf" }]
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
request.set_form(form_data, "multipart/form-data")
|
|
79
|
+
JSON.parse(execute(uri, request).body)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def use_template(template_id:, signers:, prefill_fields: {}, title: nil, redirect_url: nil)
|
|
83
|
+
uri = URI("#{@base_url}/envelope/use")
|
|
84
|
+
request = Net::HTTP::Post.new(uri)
|
|
85
|
+
request["Authorization"] = @api_key
|
|
86
|
+
request["Content-Type"] = "application/json"
|
|
87
|
+
|
|
88
|
+
formatted_recipients = signers.each_with_index.map do |signer, idx|
|
|
89
|
+
entry = {
|
|
90
|
+
email: signer.fetch(:email),
|
|
91
|
+
name: signer.fetch(:name),
|
|
92
|
+
role: signer.fetch(:role, "SIGNER")
|
|
93
|
+
}
|
|
94
|
+
entry[:id] = signer[:recipient_id] if signer[:recipient_id].present?
|
|
95
|
+
entry[:signingOrder] = idx + 1 if signer[:signing_order]
|
|
96
|
+
entry
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
payload = {
|
|
100
|
+
templateId: template_id,
|
|
101
|
+
recipients: formatted_recipients
|
|
102
|
+
}
|
|
103
|
+
payload[:title] = title if title.present?
|
|
104
|
+
payload[:prefillFields] = prefill_fields.map { |k, v| { label: k.to_s, value: v.to_s } } if prefill_fields.any?
|
|
105
|
+
payload[:meta] = { redirectUrl: redirect_url } if redirect_url.present?
|
|
106
|
+
|
|
107
|
+
request.body = payload.to_json
|
|
108
|
+
JSON.parse(execute(uri, request).body)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def distribute_envelope(envelope_id)
|
|
112
|
+
uri = URI("#{@base_url}/envelope/distribute")
|
|
113
|
+
request = Net::HTTP::Post.new(uri)
|
|
114
|
+
request["Authorization"] = @api_key
|
|
115
|
+
request["Content-Type"] = "application/json"
|
|
116
|
+
request.body = { envelopeId: envelope_id }.to_json
|
|
117
|
+
|
|
118
|
+
execute(uri, request)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def download_signed_pdf(envelope_id)
|
|
122
|
+
uri = URI("#{@base_url}/envelope/#{envelope_id}/download")
|
|
123
|
+
request = Net::HTTP::Get.new(uri)
|
|
124
|
+
request["Authorization"] = @api_key
|
|
125
|
+
|
|
126
|
+
execute(uri, request).body
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
private
|
|
130
|
+
|
|
131
|
+
def execute(uri, request)
|
|
132
|
+
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
|
|
133
|
+
http.open_timeout = 10
|
|
134
|
+
http.read_timeout = 30
|
|
135
|
+
http.request(request)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
raise ApiError, "Documenso API Error (#{response.code}): #{response.body}" unless response.is_a?(Net::HTTPSuccess)
|
|
139
|
+
|
|
140
|
+
response
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module DocumensoRails
|
|
2
|
+
class Configuration
|
|
3
|
+
attr_accessor :base_url,
|
|
4
|
+
:api_key,
|
|
5
|
+
:webhook_secret,
|
|
6
|
+
:model_class_name,
|
|
7
|
+
:unsigned_attachment_name,
|
|
8
|
+
:signed_attachment_name,
|
|
9
|
+
:redirect_url
|
|
10
|
+
|
|
11
|
+
def initialize
|
|
12
|
+
@base_url = ENV.fetch("DOCUMENSO_API_URL", "https://app.documenso.com/api/v2")
|
|
13
|
+
@api_key = nil
|
|
14
|
+
@webhook_secret = nil
|
|
15
|
+
@model_class_name = "LegalDocument"
|
|
16
|
+
@unsigned_attachment_name = :unsigned_pdf
|
|
17
|
+
@signed_attachment_name = :signed_pdf
|
|
18
|
+
@redirect_url = nil
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def model_class
|
|
22
|
+
@model_class_name.constantize
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
module DocumensoRails
|
|
2
|
+
module Model
|
|
3
|
+
extend ActiveSupport::Concern
|
|
4
|
+
|
|
5
|
+
DEFAULT_FIELDS = [
|
|
6
|
+
{ type: "SIGNATURE", page: 1, x: 15, y: 80, width: 25, height: 6 },
|
|
7
|
+
{ type: "DATE", page: 1, x: 45, y: 82, width: 15, height: 4 }
|
|
8
|
+
].freeze
|
|
9
|
+
|
|
10
|
+
def send_for_signature!(signer_name:, signer_email:, fields: DEFAULT_FIELDS, redirect_url: nil)
|
|
11
|
+
send_for_multiple_signatures!(
|
|
12
|
+
signers: [{ name: signer_name, email: signer_email }],
|
|
13
|
+
fields: fields,
|
|
14
|
+
redirect_url: redirect_url
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def send_for_multiple_signatures!(signers:, fields: DEFAULT_FIELDS, redirect_url: nil)
|
|
19
|
+
unsigned_attachment = public_send(DocumensoRails.configuration.unsigned_attachment_name)
|
|
20
|
+
raise Error, "No unsigned PDF attached to #{self.class.name}##{id}" unless unsigned_attachment.attached?
|
|
21
|
+
|
|
22
|
+
envelope_id = nil
|
|
23
|
+
target_redirect = redirect_url || DocumensoRails.configuration.redirect_url
|
|
24
|
+
|
|
25
|
+
unsigned_attachment.open do |tempfile|
|
|
26
|
+
envelope_id = DocumensoRails.client.create_and_send(
|
|
27
|
+
file_io: tempfile,
|
|
28
|
+
filename: "#{id}.pdf",
|
|
29
|
+
title: try(:title) || "Document ##{id}",
|
|
30
|
+
signers: signers,
|
|
31
|
+
fields: fields,
|
|
32
|
+
redirect_url: target_redirect
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
update!(
|
|
37
|
+
documenso_envelope_id: envelope_id,
|
|
38
|
+
signature_status: "sent",
|
|
39
|
+
signature_sent_at: Time.current
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
envelope_id
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def send_from_template!(template_id:, signers:, prefill_fields: {}, title: nil, redirect_url: nil)
|
|
46
|
+
target_redirect = redirect_url || DocumensoRails.configuration.redirect_url
|
|
47
|
+
|
|
48
|
+
envelope_id = DocumensoRails.client.create_and_send_from_template(
|
|
49
|
+
template_id: template_id,
|
|
50
|
+
signers: signers,
|
|
51
|
+
prefill_fields: prefill_fields,
|
|
52
|
+
title: title || try(:title),
|
|
53
|
+
redirect_url: target_redirect
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
update!(
|
|
57
|
+
documenso_envelope_id: envelope_id,
|
|
58
|
+
signature_status: "sent",
|
|
59
|
+
signature_sent_at: Time.current
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
envelope_id
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require "documenso_rails/version"
|
|
2
|
+
require "documenso_rails/configuration"
|
|
3
|
+
require "documenso_rails/client"
|
|
4
|
+
require "documenso_rails/model"
|
|
5
|
+
require "documenso_rails/engine"
|
|
6
|
+
|
|
7
|
+
module DocumensoRails
|
|
8
|
+
class Error < StandardError; end
|
|
9
|
+
class ApiError < Error; end
|
|
10
|
+
|
|
11
|
+
class << self
|
|
12
|
+
def configuration
|
|
13
|
+
@configuration ||= Configuration.new
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def configure
|
|
17
|
+
yield(configuration)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def client
|
|
21
|
+
Client.new(
|
|
22
|
+
base_url: configuration.base_url,
|
|
23
|
+
api_key: configuration.api_key
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
require "rails/generators/base"
|
|
2
|
+
require "rails/generators/active_record"
|
|
3
|
+
|
|
4
|
+
module DocumensoRails
|
|
5
|
+
module Generators
|
|
6
|
+
class InstallGenerator < Rails::Generators::Base
|
|
7
|
+
include Rails::Generators::Migration
|
|
8
|
+
source_root File.expand_path("templates", __dir__)
|
|
9
|
+
|
|
10
|
+
argument :model_name, type: :string, default: "LegalDocument"
|
|
11
|
+
|
|
12
|
+
def self.next_migration_number(dirname)
|
|
13
|
+
ActiveRecord::Generators::Base.next_migration_number(dirname)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def copy_initializer
|
|
17
|
+
template "initializer.rb.tt", "config/initializers/documenso_rails.rb"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def create_migration
|
|
21
|
+
migration_template "migration.rb.tt", "db/migrate/add_documenso_fields_to_#{table_name}.rb"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def add_route
|
|
25
|
+
route 'mount DocumensoRails::Engine, at: "/documenso"'
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def table_name
|
|
31
|
+
model_name.tableize
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def migration_version
|
|
35
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
DocumensoRails.configure do |config|
|
|
2
|
+
config.base_url = ENV.fetch("DOCUMENSO_API_URL", "https://app.documenso.com/api/v2")
|
|
3
|
+
config.api_key = Rails.application.credentials.dig(:documenso, :api_key)
|
|
4
|
+
config.webhook_secret = Rails.application.credentials.dig(:documenso, :webhook_secret)
|
|
5
|
+
config.model_class_name = "<%= model_name %>"
|
|
6
|
+
config.unsigned_attachment_name = :unsigned_pdf
|
|
7
|
+
config.signed_attachment_name = :signed_pdf
|
|
8
|
+
|
|
9
|
+
# Optional: Automatically redirect clients to your LawPay portal after signing
|
|
10
|
+
# config.redirect_url = "https://secure.lawpay.com/pages/yourfirm/trust"
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
class AddDocumensoFieldsTo<%= table_name.camelize %> < ActiveRecord::Migration<%= migration_version %>
|
|
2
|
+
def change
|
|
3
|
+
add_column :<%= table_name %>, :documenso_envelope_id, :string
|
|
4
|
+
add_column :<%= table_name %>, :signature_status, :string, default: "draft", null: false
|
|
5
|
+
add_column :<%= table_name %>, :signature_sent_at, :datetime
|
|
6
|
+
add_column :<%= table_name %>, :signature_completed_at, :datetime
|
|
7
|
+
|
|
8
|
+
add_index :<%= table_name %>, :documenso_envelope_id, unique: true
|
|
9
|
+
add_index :<%= table_name %>, :signature_status
|
|
10
|
+
end
|
|
11
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: documenso_rails
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Jeremy Weiland
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: rails
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '7.0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '7.0'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: rspec-rails
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '6.1'
|
|
33
|
+
type: :development
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '6.1'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: sqlite3
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '1.4'
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '1.4'
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: webmock
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - "~>"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '3.23'
|
|
61
|
+
type: :development
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '3.23'
|
|
68
|
+
executables: []
|
|
69
|
+
extensions: []
|
|
70
|
+
extra_rdoc_files: []
|
|
71
|
+
files:
|
|
72
|
+
- README.md
|
|
73
|
+
- Rakefile
|
|
74
|
+
- app/controllers/documenso_rails/webhooks_controller.rb
|
|
75
|
+
- app/jobs/documenso_rails/process_webhook_job.rb
|
|
76
|
+
- config/routes.rb
|
|
77
|
+
- lib/documenso_rails.rb
|
|
78
|
+
- lib/documenso_rails/client.rb
|
|
79
|
+
- lib/documenso_rails/configuration.rb
|
|
80
|
+
- lib/documenso_rails/engine.rb
|
|
81
|
+
- lib/documenso_rails/model.rb
|
|
82
|
+
- lib/documenso_rails/version.rb
|
|
83
|
+
- lib/generators/documenso_rails/install_generator.rb
|
|
84
|
+
- lib/generators/documenso_rails/templates/initializer.rb.tt
|
|
85
|
+
- lib/generators/documenso_rails/templates/migration.rb.tt
|
|
86
|
+
licenses: []
|
|
87
|
+
metadata: {}
|
|
88
|
+
rdoc_options: []
|
|
89
|
+
require_paths:
|
|
90
|
+
- lib
|
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: 3.1.0
|
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
|
+
requirements:
|
|
98
|
+
- - ">="
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: '0'
|
|
101
|
+
requirements: []
|
|
102
|
+
rubygems_version: 4.0.13
|
|
103
|
+
specification_version: 4
|
|
104
|
+
summary: Production Rails Engine & API v2 client for Documenso Cloud
|
|
105
|
+
test_files: []
|