echosign 1.0.2 → 1.5.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/.gitignore +2 -1
- data/.rubocop.yml +14 -0
- data/.rubocop_todo.yml +241 -0
- data/.simplecov +2 -0
- data/.travis.yml +9 -0
- data/Gemfile +3 -3
- data/Gemfile.lock +74 -48
- data/README.md +43 -8
- data/Rakefile +2 -2
- data/doc/Echosign.html +135 -0
- data/doc/Echosign/Agreement.html +545 -0
- data/doc/Echosign/Client.html +5365 -0
- data/doc/Echosign/CounterSignerInfo.html +267 -0
- data/doc/Echosign/Credentials.html +1053 -0
- data/doc/Echosign/Fileinfo.html +305 -0
- data/doc/Echosign/FormFieldLocation.html +264 -0
- data/doc/Echosign/MegaSign.html +533 -0
- data/doc/Echosign/ParameterError.html +124 -0
- data/doc/Echosign/PhoneInfo.html +281 -0
- data/doc/Echosign/Recipient.html +311 -0
- data/doc/Echosign/RecipientSecurityOption.html +296 -0
- data/doc/Echosign/Refresh.html +288 -0
- data/doc/Echosign/Reminder.html +279 -0
- data/doc/Echosign/Request.html +5289 -0
- data/doc/Echosign/Request/EndpointHash.html +328 -0
- data/doc/Echosign/Request/Failure.html +290 -0
- data/doc/Echosign/RequestFormField.html +244 -0
- data/doc/Echosign/RequiredParameterError.html +124 -0
- data/doc/Echosign/UrlFileInfo.html +297 -0
- data/doc/Echosign/User.html +422 -0
- data/doc/Echosign/Validatable.html +355 -0
- data/doc/Echosign/Widget.html +924 -0
- data/doc/Echosign/WidgetCompletionInfo.html +323 -0
- data/doc/Echosign/WidgetPersonalization.html +330 -0
- data/doc/Echosign/WidgetSecurityOption.html +361 -0
- data/doc/Echosign/WidgetSignerSecurityOption.html +298 -0
- data/doc/Echosign/WidgetStatus.html +316 -0
- data/doc/Echosign/WidgetVaultingInfo.html +267 -0
- data/doc/_index.html +378 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +191 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +191 -0
- data/doc/js/app.js +292 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1035 -0
- data/doc/top-level-namespace.html +110 -0
- data/echosign.gemspec +18 -20
- data/features/support/env.rb +8 -8
- data/fixtures/vcr_cassettes/agreement_combined_pdf.yml +2 -2
- data/fixtures/vcr_cassettes/agreement_document_file.yml +1 -1
- data/fixtures/vcr_cassettes/agreement_documents.yml +2 -2
- data/fixtures/vcr_cassettes/agreement_form_data.yml +1 -1
- data/fixtures/vcr_cassettes/agreement_info.yml +1 -1
- data/fixtures/vcr_cassettes/agreement_signing_urls.yml +1 -1
- data/fixtures/vcr_cassettes/audit_trail_pdf.yml +1 -1
- data/fixtures/vcr_cassettes/cancel_agreement.yml +1 -1
- data/fixtures/vcr_cassettes/create_agreement.yml +1 -1
- data/fixtures/vcr_cassettes/create_reminder.yml +1 -1
- data/fixtures/vcr_cassettes/create_transient_document.yml +1 -1
- data/fixtures/vcr_cassettes/create_user.yml +1 -1
- data/fixtures/vcr_cassettes/create_widget.yml +1 -1
- data/fixtures/vcr_cassettes/get_agreements.yml +1 -1
- data/fixtures/vcr_cassettes/get_library_document.yml +1 -1
- data/fixtures/vcr_cassettes/get_library_document_data.yml +1 -1
- data/fixtures/vcr_cassettes/get_library_document_file.yml +1 -1
- data/fixtures/vcr_cassettes/get_library_documents.yml +1 -1
- data/fixtures/vcr_cassettes/get_token.yml +22 -20
- data/fixtures/vcr_cassettes/get_user.yml +1 -1
- data/fixtures/vcr_cassettes/get_users.yml +2 -2
- data/fixtures/vcr_cassettes/get_widget.yml +1 -1
- data/fixtures/vcr_cassettes/get_widget_document_file.yml +1 -1
- data/fixtures/vcr_cassettes/get_widget_documents.yml +1 -1
- data/fixtures/vcr_cassettes/get_widgets.yml +1 -1
- data/fixtures/vcr_cassettes/library_combined_document.yml +2 -2
- data/fixtures/vcr_cassettes/library_document_audit_trail.yml +1 -1
- data/fixtures/vcr_cassettes/personalize_widget.yml +1 -1
- data/fixtures/vcr_cassettes/refresh_token.yml +46 -0
- data/fixtures/vcr_cassettes/revoke_token.yml +44 -0
- data/fixtures/vcr_cassettes/update_widget_status.yml +1 -1
- data/lib/echosign.rb +11 -11
- data/lib/echosign/agreement.rb +26 -10
- data/lib/echosign/agreement/client.rb +111 -104
- data/lib/echosign/agreement/fileinfo.rb +1 -3
- data/lib/echosign/agreement/form_field_location.rb +2 -3
- data/lib/echosign/agreement/phone_info.rb +5 -5
- data/lib/echosign/agreement/recipient.rb +9 -8
- data/lib/echosign/agreement/recipient_security_option.rb +5 -4
- data/lib/echosign/agreement/request.rb +33 -43
- data/lib/echosign/agreement/request_form_field.rb +2 -3
- data/lib/echosign/agreement/url_file_info.rb +8 -6
- data/lib/echosign/client.rb +33 -24
- data/lib/echosign/credentials.rb +95 -24
- data/lib/echosign/library_documents/client.rb +18 -23
- data/lib/echosign/library_documents/request.rb +19 -20
- data/lib/echosign/mega_sign.rb +20 -10
- data/lib/echosign/mega_sign/client.rb +109 -104
- data/lib/echosign/mega_sign/request.rb +32 -43
- data/lib/echosign/refresh.rb +6 -10
- data/lib/echosign/reminder.rb +2 -2
- data/lib/echosign/request.rb +85 -75
- data/lib/echosign/user.rb +13 -7
- data/lib/echosign/validatable.rb +6 -10
- data/lib/echosign/version.rb +1 -1
- data/lib/echosign/widget.rb +53 -27
- data/lib/echosign/widget/client.rb +33 -36
- data/lib/echosign/widget/counter_signer_info.rb +4 -5
- data/lib/echosign/widget/request.rb +28 -52
- data/lib/echosign/widget/widget_completion_info.rb +22 -12
- data/lib/echosign/widget/widget_personalization.rb +9 -7
- data/lib/echosign/widget/widget_security_option.rb +21 -11
- data/lib/echosign/widget/widget_signer_security_option.rb +8 -6
- data/lib/echosign/widget/widget_status.rb +10 -8
- data/lib/echosign/widget/widget_vaulting_info.rb +4 -5
- data/spec/lib/agreement/client_spec.rb +25 -31
- data/spec/lib/client_spec.rb +15 -18
- data/spec/lib/credentials_spec.rb +48 -0
- data/spec/lib/library_documents/client_spec.rb +11 -15
- data/spec/lib/shared_client.rb +9 -16
- data/spec/lib/user_spec.rb +0 -2
- data/spec/lib/validatable_spec.rb +12 -18
- data/spec/lib/version_spec.rb +1 -1
- data/spec/lib/widget/client_spec.rb +46 -49
- data/spec/spec_helper.rb +12 -5
- metadata +125 -60
- data/spec/lib/request_spec.rb +0 -18
@@ -7,7 +7,7 @@ describe Echosign::Client do
|
|
7
7
|
let(:user_id) { nil }
|
8
8
|
let(:user_email) { 'cthomas@railjumper.com' }
|
9
9
|
it 'returns info about library documents' do
|
10
|
-
VCR.use_cassette('get_library_documents', :
|
10
|
+
VCR.use_cassette('get_library_documents', record: :once) do
|
11
11
|
response = client.get_library_documents(user_id, user_email)
|
12
12
|
expect(response).to be_a Hash
|
13
13
|
end
|
@@ -15,9 +15,9 @@ describe Echosign::Client do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
describe '.get_library_document' do
|
18
|
-
let(:library_document_id) {"2AAABLblqZhCri9FNiCHjwsixnFegzTxO6cP52B-FIhfOXZjjDHggZoYPQB5r0YS66QZg4DLQV-g*"}
|
18
|
+
let(:library_document_id) { "2AAABLblqZhCri9FNiCHjwsixnFegzTxO6cP52B-FIhfOXZjjDHggZoYPQB5r0YS66QZg4DLQV-g*" }
|
19
19
|
it 'returns info about library document' do
|
20
|
-
VCR.use_cassette('get_library_document', :
|
20
|
+
VCR.use_cassette('get_library_document', record: :once) do
|
21
21
|
response = client.get_library_document(library_document_id)
|
22
22
|
expect(response).to be_a Hash
|
23
23
|
end
|
@@ -25,9 +25,9 @@ describe Echosign::Client do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
describe '.get_library_document_files' do
|
28
|
-
let(:library_document_id) {"2AAABLblqZhAlC4t0c3xAJ92RFv44xFGZhbCuHpalUdpcHW9k72imMEG-W1SYCmUoia1ZNgQZ-FE*"}
|
28
|
+
let(:library_document_id) { "2AAABLblqZhAlC4t0c3xAJ92RFv44xFGZhbCuHpalUdpcHW9k72imMEG-W1SYCmUoia1ZNgQZ-FE*" }
|
29
29
|
it 'returns info about library document files' do
|
30
|
-
VCR.use_cassette('get_library_document_file', :
|
30
|
+
VCR.use_cassette('get_library_document_file', record: :once) do
|
31
31
|
response = client.get_library_document_files(library_document_id)
|
32
32
|
expect(response).to be_a Hash
|
33
33
|
end
|
@@ -38,9 +38,9 @@ describe Echosign::Client do
|
|
38
38
|
let(:library_document_id) { "2AAABLblqZhAlC4t0c3xAJ92RFv44xFGZhbCuHpalUdpcHW9k72imMEG-W1SYCmUoia1ZNgQZ-FE*" }
|
39
39
|
let(:file_id) { "2AAABLblqZhD0YJu7EaQ3t2aKYe74spEGcgIXHeloWBdhkceuEbfqs9cw0pdkFB6z3RR4N8OWkZg*" }
|
40
40
|
it 'returns library document file data' do
|
41
|
-
VCR.use_cassette('get_library_document_data', :
|
41
|
+
VCR.use_cassette('get_library_document_data', record: :once) do
|
42
42
|
response = client.get_library_document_file(library_document_id, file_id)
|
43
|
-
expect(response).to_not be_nil
|
43
|
+
expect(response).to_not be_nil
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -48,9 +48,9 @@ describe Echosign::Client do
|
|
48
48
|
describe '.library_document_audit_trail' do
|
49
49
|
let(:library_document_id) { "2AAABLblqZhAlC4t0c3xAJ92RFv44xFGZhbCuHpalUdpcHW9k72imMEG-W1SYCmUoia1ZNgQZ-FE*" }
|
50
50
|
it 'returns library document file data' do
|
51
|
-
VCR.use_cassette('library_document_audit_trail', :
|
51
|
+
VCR.use_cassette('library_document_audit_trail', record: :once) do
|
52
52
|
response = client.library_document_audit_trail(library_document_id)
|
53
|
-
expect(response).to_not be_nil
|
53
|
+
expect(response).to_not be_nil
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
@@ -58,14 +58,10 @@ describe Echosign::Client do
|
|
58
58
|
describe '.library_combined_document' do
|
59
59
|
let(:library_document_id) { "2AAABLblqZhAlC4t0c3xAJ92RFv44xFGZhbCuHpalUdpcHW9k72imMEG-W1SYCmUoia1ZNgQZ-FE*" }
|
60
60
|
it 'returns library combined document file data' do
|
61
|
-
VCR.use_cassette('library_combined_document', :
|
61
|
+
VCR.use_cassette('library_combined_document', record: :once) do
|
62
62
|
response = client.library_combined_document(library_document_id, nil, true)
|
63
|
-
expect(response).to_not be_nil
|
63
|
+
expect(response).to_not be_nil
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
67
|
-
|
68
|
-
|
69
|
-
|
70
67
|
end
|
71
|
-
|
data/spec/lib/shared_client.rb
CHANGED
@@ -1,22 +1,15 @@
|
|
1
1
|
RSpec.shared_context "shared client" do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
let(:api_key) { "XCFDJKSFLNL5Y" }
|
6
|
-
let(:email) { "nobody@nobody.com" }
|
7
|
-
let(:password) { "password" }
|
8
|
-
|
9
|
-
#let(:email) { "cthomas@railjumper.com" }
|
10
|
-
#let(:password) { "badpassword" }
|
11
|
-
|
12
|
-
|
13
|
-
let(:credentials) do
|
14
|
-
Echosign::Credentials.new(app_id, app_secret, api_key, email, password)
|
15
|
-
end
|
2
|
+
let(:access_token) {
|
3
|
+
"3AAABLblqZhAN-cxVlpFIUv3XdlgqlyWF8qVbIWnUmmvkAB4u6yPBE50XAqTqzLNCjbWS8QKAZPdgYOaqZHv6EE5LEJOc5NOK"
|
4
|
+
}
|
16
5
|
|
17
6
|
let(:client) do
|
18
|
-
VCR.use_cassette('get_token', :
|
19
|
-
Echosign::Client.new(
|
7
|
+
VCR.use_cassette('get_token', record: :once) do
|
8
|
+
Echosign::Client.new(access_token)
|
20
9
|
end
|
21
10
|
end
|
11
|
+
|
12
|
+
before :each do
|
13
|
+
allow(Echosign::Request).to receive(:get_base_uris).and_return('api_access_point' => 'https://api.eu1.echosign.com/')
|
14
|
+
end
|
22
15
|
end
|
data/spec/lib/user_spec.rb
CHANGED
@@ -3,7 +3,6 @@ require 'spec_helper'
|
|
3
3
|
require 'echosign/validatable'
|
4
4
|
|
5
5
|
describe Echosign::Validatable do
|
6
|
-
|
7
6
|
let(:first_name) { "John" }
|
8
7
|
let(:last_name) { "Public" }
|
9
8
|
|
@@ -11,24 +10,23 @@ describe Echosign::Validatable do
|
|
11
10
|
{
|
12
11
|
firstName: first_name,
|
13
12
|
lastName: last_name,
|
14
|
-
phone: "885551234"
|
13
|
+
phone: "885551234"
|
15
14
|
}
|
16
15
|
end
|
17
16
|
|
18
17
|
let(:validatable_object) do
|
19
|
-
class Foo
|
20
|
-
include Echosign::Validatable
|
18
|
+
class Foo
|
19
|
+
include Echosign::Validatable
|
21
20
|
end
|
22
21
|
Foo.new
|
23
|
-
end
|
22
|
+
end
|
24
23
|
|
25
24
|
describe ".validate_field" do
|
26
|
-
|
27
25
|
context "when field is nil" do
|
28
26
|
let(:first_name) { nil }
|
29
27
|
|
30
28
|
it "raises an invalid parameter error" do
|
31
|
-
expect do
|
29
|
+
expect do
|
32
30
|
validatable_object.validate_field(first_name, params)
|
33
31
|
end.to raise_error(Echosign::RequiredParameterError)
|
34
32
|
end
|
@@ -38,21 +36,19 @@ describe Echosign::Validatable do
|
|
38
36
|
let(:first_name) { '' }
|
39
37
|
|
40
38
|
it "raises an invalid parameter error" do
|
41
|
-
expect do
|
39
|
+
expect do
|
42
40
|
validatable_object.validate_field(first_name, params)
|
43
41
|
end.to raise_error(Echosign::RequiredParameterError)
|
44
42
|
end
|
45
|
-
|
46
43
|
end
|
47
44
|
|
48
45
|
context "when key is not present" do
|
49
46
|
it "raises an invalid parameter error" do
|
50
|
-
expect do
|
47
|
+
expect do
|
51
48
|
validatable_object.validate_field([:unknown_field], params)
|
52
49
|
end.to raise_error(Echosign::RequiredParameterError)
|
53
50
|
end
|
54
51
|
end
|
55
|
-
|
56
52
|
end
|
57
53
|
|
58
54
|
describe '.require_keys' do
|
@@ -65,7 +61,7 @@ describe Echosign::Validatable do
|
|
65
61
|
|
66
62
|
context 'when all required fields are present' do
|
67
63
|
it 'it does not raise an error' do
|
68
|
-
expect do
|
64
|
+
expect do
|
69
65
|
validatable_object.require_keys(required_fields, params)
|
70
66
|
end.to_not raise_error
|
71
67
|
end
|
@@ -73,7 +69,7 @@ describe Echosign::Validatable do
|
|
73
69
|
|
74
70
|
context 'when a required field is not present' do
|
75
71
|
it 'it raises an error' do
|
76
|
-
expect do
|
72
|
+
expect do
|
77
73
|
validatable_object.require_keys(required_fields.push(:unknown_field), params)
|
78
74
|
end.to raise_error(Echosign::RequiredParameterError)
|
79
75
|
end
|
@@ -83,7 +79,7 @@ describe Echosign::Validatable do
|
|
83
79
|
describe '.require_exactly_one' do
|
84
80
|
context 'when more than one key value is present' do
|
85
81
|
it 'it raises an error' do
|
86
|
-
expect do
|
82
|
+
expect do
|
87
83
|
validatable_object.require_exactly_one([:firstName, :lastName], params)
|
88
84
|
end.to raise_error(Echosign::ParameterError)
|
89
85
|
end
|
@@ -91,7 +87,7 @@ describe Echosign::Validatable do
|
|
91
87
|
|
92
88
|
context 'when none of the key values are present' do
|
93
89
|
it 'it raises an error' do
|
94
|
-
expect do
|
90
|
+
expect do
|
95
91
|
validatable_object.require_exactly_one([:unknown_field], params)
|
96
92
|
end.to raise_error(Echosign::ParameterError)
|
97
93
|
end
|
@@ -99,12 +95,10 @@ describe Echosign::Validatable do
|
|
99
95
|
|
100
96
|
context 'when exactly one of the key values is present' do
|
101
97
|
it 'it does not raise an error' do
|
102
|
-
expect do
|
98
|
+
expect do
|
103
99
|
validatable_object.require_exactly_one([:firstName], params)
|
104
100
|
end.to_not raise_error
|
105
101
|
end
|
106
102
|
end
|
107
|
-
|
108
103
|
end
|
109
|
-
|
110
104
|
end
|
data/spec/lib/version_spec.rb
CHANGED
@@ -4,7 +4,6 @@ describe Echosign::Client do
|
|
4
4
|
include_context "shared client"
|
5
5
|
|
6
6
|
describe '.create_widget' do
|
7
|
-
|
8
7
|
let(:url_file_info_params) do
|
9
8
|
{
|
10
9
|
url: 'http://findgoplayers.com/resume.pdf',
|
@@ -14,23 +13,23 @@ describe Echosign::Client do
|
|
14
13
|
end
|
15
14
|
|
16
15
|
let(:file_info_params) do
|
17
|
-
{
|
18
|
-
documentURL: Echosign::UrlFileInfo.new(url_file_info_params)
|
16
|
+
{
|
17
|
+
documentURL: Echosign::UrlFileInfo.new(url_file_info_params)
|
19
18
|
}
|
20
19
|
end
|
21
20
|
|
22
21
|
let(:widget_params) do
|
23
22
|
{
|
24
23
|
signatureFlow: 'SENDER_SIGNS_LAST',
|
25
|
-
fileInfos: [
|
24
|
+
fileInfos: [Echosign::Fileinfo.new(file_info_params)],
|
26
25
|
name: 'Test widget'
|
27
26
|
}
|
28
|
-
end
|
27
|
+
end
|
29
28
|
|
30
29
|
let(:widget) { Echosign::Widget.new(nil, nil, widget_params) }
|
31
30
|
|
32
31
|
it 'returns widget info' do
|
33
|
-
VCR.use_cassette('create_widget', :
|
32
|
+
VCR.use_cassette('create_widget', record: :once) do
|
34
33
|
widget_response = client.create_widget(widget)
|
35
34
|
expect(widget_response).to be_a Hash
|
36
35
|
end
|
@@ -47,7 +46,7 @@ describe Echosign::Client do
|
|
47
46
|
let(:personalization) { Echosign::WidgetPersonalization.new(personalization_params) }
|
48
47
|
|
49
48
|
it 'returns widget info' do
|
50
|
-
VCR.use_cassette('personalize_widget', :
|
49
|
+
VCR.use_cassette('personalize_widget', record: :once) do
|
51
50
|
widget_response = client.personalize_widget(widget_id, personalization)
|
52
51
|
expect(widget_response).to be_a Hash
|
53
52
|
end
|
@@ -65,7 +64,7 @@ describe Echosign::Client do
|
|
65
64
|
let(:status) { Echosign::WidgetStatus.new(status_params) }
|
66
65
|
|
67
66
|
it 'returns widget info' do
|
68
|
-
VCR.use_cassette('update_widget_status', :
|
67
|
+
VCR.use_cassette('update_widget_status', record: :once) do
|
69
68
|
widget_response = client.update_widget_status(widget_id, status)
|
70
69
|
expect(widget_response).to be_a Hash
|
71
70
|
end
|
@@ -74,7 +73,7 @@ describe Echosign::Client do
|
|
74
73
|
|
75
74
|
describe '.get_widgets' do
|
76
75
|
it 'returns widgets info' do
|
77
|
-
VCR.use_cassette('get_widgets', :
|
76
|
+
VCR.use_cassette('get_widgets', record: :once) do
|
78
77
|
widget_response = client.get_widgets
|
79
78
|
expect(widget_response).to be_a Hash
|
80
79
|
end
|
@@ -84,7 +83,7 @@ describe Echosign::Client do
|
|
84
83
|
describe '.get_widget' do
|
85
84
|
let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
86
85
|
it 'returns widget info' do
|
87
|
-
VCR.use_cassette('get_widget', :
|
86
|
+
VCR.use_cassette('get_widget', record: :once) do
|
88
87
|
widget_response = client.get_widget(widget_id)
|
89
88
|
expect(widget_response).to be_a Hash
|
90
89
|
end
|
@@ -95,7 +94,7 @@ describe Echosign::Client do
|
|
95
94
|
let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
96
95
|
|
97
96
|
it 'returns widget documents info' do
|
98
|
-
VCR.use_cassette('get_widget_documents', :
|
97
|
+
VCR.use_cassette('get_widget_documents', record: :once) do
|
99
98
|
widget_response = client.get_widget_documents(widget_id)
|
100
99
|
expect(widget_response).to be_a Hash
|
101
100
|
end
|
@@ -107,48 +106,46 @@ describe Echosign::Client do
|
|
107
106
|
let(:document_id) { "2AAABLblqZhCGyGn1bpbXp-Kt-QXX8fsBWhjjO-bUKd0NQ184Xxm-mE6gg0DN0e-3k0Lwj6IPw9Q*" }
|
108
107
|
|
109
108
|
it 'returns widget document file' do
|
110
|
-
VCR.use_cassette('get_widget_document_file', :
|
109
|
+
VCR.use_cassette('get_widget_document_file', record: :once) do
|
111
110
|
widget_response = client.get_widget_document_file(widget_id, document_id)
|
112
111
|
expect(widget_response).to_not be_nil
|
113
112
|
end
|
114
113
|
end
|
115
114
|
end
|
116
115
|
|
117
|
-
# describe '.get_widget_audit_trail' do
|
118
|
-
# let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
119
|
-
|
120
|
-
# it 'returns widget document file' do
|
121
|
-
# VCR.use_cassette('get_widget_audit_trail', :record => :once) do
|
122
|
-
# widget_response = client.get_widget_audit_trail(widget_id)
|
123
|
-
# binding.pry
|
124
|
-
# expect(widget_response).to_not be_nil
|
125
|
-
# end
|
126
|
-
# end
|
127
|
-
# end
|
128
|
-
|
129
|
-
# describe '.get_widget_combined_pdf' do
|
130
|
-
# let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
131
|
-
|
132
|
-
# it 'returns widget document file' do
|
133
|
-
# VCR.use_cassette('get_widget_combined_pdf', :record => :once) do
|
134
|
-
# widget_response = client.get_widget_combined_pdf(widget_id)
|
135
|
-
# binding.pry
|
136
|
-
# expect(widget_response).to_not be_nil
|
137
|
-
# end
|
138
|
-
# end
|
139
|
-
# end
|
140
|
-
|
141
|
-
# describe '.get_widget_form_data' do
|
142
|
-
# let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
143
|
-
|
144
|
-
# it 'returns widget document file' do
|
145
|
-
# VCR.use_cassette('get_widget_form_data', :record => :once) do
|
146
|
-
# widget_response = client.get_widget_form_data(widget_id)
|
147
|
-
# binding.pry
|
148
|
-
# expect(widget_response).to_not be_nil
|
149
|
-
# end
|
150
|
-
# end
|
151
|
-
# end
|
152
|
-
|
153
|
-
|
116
|
+
# describe '.get_widget_audit_trail' do
|
117
|
+
# let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
118
|
+
|
119
|
+
# it 'returns widget document file' do
|
120
|
+
# VCR.use_cassette('get_widget_audit_trail', :record => :once) do
|
121
|
+
# widget_response = client.get_widget_audit_trail(widget_id)
|
122
|
+
# binding.pry
|
123
|
+
# expect(widget_response).to_not be_nil
|
124
|
+
# end
|
125
|
+
# end
|
126
|
+
# end
|
127
|
+
|
128
|
+
# describe '.get_widget_combined_pdf' do
|
129
|
+
# let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
130
|
+
|
131
|
+
# it 'returns widget document file' do
|
132
|
+
# VCR.use_cassette('get_widget_combined_pdf', :record => :once) do
|
133
|
+
# widget_response = client.get_widget_combined_pdf(widget_id)
|
134
|
+
# binding.pry
|
135
|
+
# expect(widget_response).to_not be_nil
|
136
|
+
# end
|
137
|
+
# end
|
138
|
+
# end
|
139
|
+
|
140
|
+
# describe '.get_widget_form_data' do
|
141
|
+
# let(:widget_id) { "2AAABLblqZhD_6RpgbZh5ZVlLXz1H1kfVzw4vHB91MtmjNHBDorFqO0H3_cGzBudZxiWNzPXFzOc*" }
|
142
|
+
|
143
|
+
# it 'returns widget document file' do
|
144
|
+
# VCR.use_cassette('get_widget_form_data', :record => :once) do
|
145
|
+
# widget_response = client.get_widget_form_data(widget_id)
|
146
|
+
# binding.pry
|
147
|
+
# expect(widget_response).to_not be_nil
|
148
|
+
# end
|
149
|
+
# end
|
150
|
+
# end
|
154
151
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,22 +1,29 @@
|
|
1
|
-
require '
|
1
|
+
require 'simplecov'
|
2
|
+
|
3
|
+
SimpleCov.start do
|
4
|
+
add_filter '/spec/'
|
5
|
+
add_filter '/config/'
|
6
|
+
end
|
7
|
+
|
2
8
|
require 'bundler/setup'
|
3
9
|
require 'webmock/rspec'
|
4
10
|
require 'vcr'
|
5
11
|
require 'factory_girl'
|
6
12
|
require 'echosign'
|
7
13
|
require 'pry'
|
8
|
-
|
14
|
+
|
9
15
|
Bundler.setup
|
10
16
|
|
11
17
|
VCR.configure do |c|
|
12
18
|
c.cassette_library_dir = 'fixtures/vcr_cassettes'
|
13
19
|
c.hook_into :webmock
|
14
20
|
c.allow_http_connections_when_no_cassette = true
|
21
|
+
c.default_cassette_options = {
|
22
|
+
match_requests_on: [:method, :host, :path]
|
23
|
+
}
|
15
24
|
end
|
16
25
|
|
17
26
|
RSpec.configure do |config|
|
18
|
-
config.include WebMock
|
27
|
+
config.include WebMock::API
|
19
28
|
config.include FactoryGirl::Syntax::Methods
|
20
29
|
end
|
21
|
-
|
22
|
-
|
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: echosign
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
+
- Joel Barker
|
7
8
|
- Bernard Worthy
|
9
|
+
- Chuck Thomas
|
8
10
|
autorequire:
|
9
11
|
bindir: bin
|
10
12
|
cert_chain: []
|
11
|
-
date: 2018-
|
13
|
+
date: 2018-10-29 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: bundler
|
@@ -25,174 +27,235 @@ dependencies:
|
|
25
27
|
- !ruby/object:Gem::Version
|
26
28
|
version: '1.6'
|
27
29
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
30
|
+
name: factory_girl
|
29
31
|
requirement: !ruby/object:Gem::Requirement
|
30
32
|
requirements:
|
31
|
-
- - "
|
33
|
+
- - "~>"
|
32
34
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
35
|
+
version: '4'
|
34
36
|
type: :development
|
35
37
|
prerelease: false
|
36
38
|
version_requirements: !ruby/object:Gem::Requirement
|
37
39
|
requirements:
|
38
|
-
- - "
|
40
|
+
- - "~>"
|
39
41
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
42
|
+
version: '4'
|
41
43
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
44
|
+
name: pry
|
43
45
|
requirement: !ruby/object:Gem::Requirement
|
44
46
|
requirements:
|
45
|
-
- - "
|
47
|
+
- - "~>"
|
46
48
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
49
|
+
version: '0.10'
|
48
50
|
type: :development
|
49
51
|
prerelease: false
|
50
52
|
version_requirements: !ruby/object:Gem::Requirement
|
51
53
|
requirements:
|
52
|
-
- - "
|
54
|
+
- - "~>"
|
53
55
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
56
|
+
version: '0.10'
|
55
57
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
58
|
+
name: rake
|
57
59
|
requirement: !ruby/object:Gem::Requirement
|
58
60
|
requirements:
|
59
|
-
- - "
|
61
|
+
- - "~>"
|
60
62
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
63
|
+
version: '10'
|
62
64
|
type: :development
|
63
65
|
prerelease: false
|
64
66
|
version_requirements: !ruby/object:Gem::Requirement
|
65
67
|
requirements:
|
66
|
-
- - "
|
68
|
+
- - "~>"
|
67
69
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
70
|
+
version: '10'
|
69
71
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
72
|
+
name: rspec
|
71
73
|
requirement: !ruby/object:Gem::Requirement
|
72
74
|
requirements:
|
73
|
-
- - "
|
75
|
+
- - "~>"
|
74
76
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
77
|
+
version: '3'
|
76
78
|
type: :development
|
77
79
|
prerelease: false
|
78
80
|
version_requirements: !ruby/object:Gem::Requirement
|
79
81
|
requirements:
|
80
|
-
- - "
|
82
|
+
- - "~>"
|
81
83
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
84
|
+
version: '3'
|
83
85
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
86
|
+
name: rubocop
|
85
87
|
requirement: !ruby/object:Gem::Requirement
|
86
88
|
requirements:
|
87
|
-
- - "
|
89
|
+
- - "~>"
|
88
90
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
91
|
+
version: '0.59'
|
90
92
|
type: :development
|
91
93
|
prerelease: false
|
92
94
|
version_requirements: !ruby/object:Gem::Requirement
|
93
95
|
requirements:
|
94
|
-
- - "
|
96
|
+
- - "~>"
|
95
97
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
98
|
+
version: '0.59'
|
97
99
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
100
|
+
name: simplecov
|
99
101
|
requirement: !ruby/object:Gem::Requirement
|
100
102
|
requirements:
|
101
|
-
- - "
|
103
|
+
- - "~>"
|
102
104
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
105
|
+
version: '0.16'
|
104
106
|
type: :development
|
105
107
|
prerelease: false
|
106
108
|
version_requirements: !ruby/object:Gem::Requirement
|
107
109
|
requirements:
|
108
|
-
- - "
|
110
|
+
- - "~>"
|
109
111
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
112
|
+
version: '0.16'
|
111
113
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
114
|
+
name: vcr
|
113
115
|
requirement: !ruby/object:Gem::Requirement
|
114
116
|
requirements:
|
115
|
-
- - "
|
117
|
+
- - "~>"
|
116
118
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
119
|
+
version: '4'
|
118
120
|
type: :development
|
119
121
|
prerelease: false
|
120
122
|
version_requirements: !ruby/object:Gem::Requirement
|
121
123
|
requirements:
|
122
|
-
- - "
|
124
|
+
- - "~>"
|
123
125
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
126
|
+
version: '4'
|
125
127
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
128
|
+
name: webmock
|
127
129
|
requirement: !ruby/object:Gem::Requirement
|
128
130
|
requirements:
|
129
|
-
- - "
|
131
|
+
- - "~>"
|
130
132
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
133
|
+
version: '3'
|
132
134
|
type: :development
|
133
135
|
prerelease: false
|
134
136
|
version_requirements: !ruby/object:Gem::Requirement
|
135
137
|
requirements:
|
136
|
-
- - "
|
138
|
+
- - "~>"
|
137
139
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
140
|
+
version: '3'
|
139
141
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
142
|
+
name: yard
|
141
143
|
requirement: !ruby/object:Gem::Requirement
|
142
144
|
requirements:
|
143
|
-
- - "
|
145
|
+
- - "~>"
|
144
146
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
147
|
+
version: '0.9'
|
146
148
|
type: :development
|
147
149
|
prerelease: false
|
148
150
|
version_requirements: !ruby/object:Gem::Requirement
|
149
151
|
requirements:
|
150
|
-
- - "
|
152
|
+
- - "~>"
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0.9'
|
155
|
+
- !ruby/object:Gem::Dependency
|
156
|
+
name: httparty
|
157
|
+
requirement: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - "~>"
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '0.16'
|
162
|
+
type: :runtime
|
163
|
+
prerelease: false
|
164
|
+
version_requirements: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - "~>"
|
151
167
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
168
|
+
version: '0.16'
|
153
169
|
- !ruby/object:Gem::Dependency
|
154
170
|
name: json
|
155
171
|
requirement: !ruby/object:Gem::Requirement
|
156
172
|
requirements:
|
157
|
-
- - "
|
173
|
+
- - "~>"
|
158
174
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
175
|
+
version: '2'
|
160
176
|
type: :runtime
|
161
177
|
prerelease: false
|
162
178
|
version_requirements: !ruby/object:Gem::Requirement
|
163
179
|
requirements:
|
164
|
-
- - "
|
180
|
+
- - "~>"
|
165
181
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
182
|
+
version: '2'
|
167
183
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
184
|
+
name: oauth2
|
169
185
|
requirement: !ruby/object:Gem::Requirement
|
170
186
|
requirements:
|
171
|
-
- - "
|
187
|
+
- - "~>"
|
172
188
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
189
|
+
version: '1'
|
174
190
|
type: :runtime
|
175
191
|
prerelease: false
|
176
192
|
version_requirements: !ruby/object:Gem::Requirement
|
177
193
|
requirements:
|
178
|
-
- - "
|
194
|
+
- - "~>"
|
179
195
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
196
|
+
version: '1'
|
181
197
|
description: A ruby gem that simplifies the use of Adobe's EchoSign web API.
|
182
198
|
email:
|
183
|
-
-
|
199
|
+
- joel@mojamail.com
|
184
200
|
executables: []
|
185
201
|
extensions: []
|
186
202
|
extra_rdoc_files: []
|
187
203
|
files:
|
188
204
|
- ".gitignore"
|
189
205
|
- ".rspec"
|
206
|
+
- ".rubocop.yml"
|
207
|
+
- ".rubocop_todo.yml"
|
208
|
+
- ".simplecov"
|
209
|
+
- ".travis.yml"
|
190
210
|
- Gemfile
|
191
211
|
- Gemfile.lock
|
192
212
|
- LICENSE
|
193
213
|
- LICENSE.txt
|
194
214
|
- README.md
|
195
215
|
- Rakefile
|
216
|
+
- doc/Echosign.html
|
217
|
+
- doc/Echosign/Agreement.html
|
218
|
+
- doc/Echosign/Client.html
|
219
|
+
- doc/Echosign/CounterSignerInfo.html
|
220
|
+
- doc/Echosign/Credentials.html
|
221
|
+
- doc/Echosign/Fileinfo.html
|
222
|
+
- doc/Echosign/FormFieldLocation.html
|
223
|
+
- doc/Echosign/MegaSign.html
|
224
|
+
- doc/Echosign/ParameterError.html
|
225
|
+
- doc/Echosign/PhoneInfo.html
|
226
|
+
- doc/Echosign/Recipient.html
|
227
|
+
- doc/Echosign/RecipientSecurityOption.html
|
228
|
+
- doc/Echosign/Refresh.html
|
229
|
+
- doc/Echosign/Reminder.html
|
230
|
+
- doc/Echosign/Request.html
|
231
|
+
- doc/Echosign/Request/EndpointHash.html
|
232
|
+
- doc/Echosign/Request/Failure.html
|
233
|
+
- doc/Echosign/RequestFormField.html
|
234
|
+
- doc/Echosign/RequiredParameterError.html
|
235
|
+
- doc/Echosign/UrlFileInfo.html
|
236
|
+
- doc/Echosign/User.html
|
237
|
+
- doc/Echosign/Validatable.html
|
238
|
+
- doc/Echosign/Widget.html
|
239
|
+
- doc/Echosign/WidgetCompletionInfo.html
|
240
|
+
- doc/Echosign/WidgetPersonalization.html
|
241
|
+
- doc/Echosign/WidgetSecurityOption.html
|
242
|
+
- doc/Echosign/WidgetSignerSecurityOption.html
|
243
|
+
- doc/Echosign/WidgetStatus.html
|
244
|
+
- doc/Echosign/WidgetVaultingInfo.html
|
245
|
+
- doc/_index.html
|
246
|
+
- doc/class_list.html
|
247
|
+
- doc/css/common.css
|
248
|
+
- doc/css/full_list.css
|
249
|
+
- doc/css/style.css
|
250
|
+
- doc/file.README.html
|
251
|
+
- doc/file_list.html
|
252
|
+
- doc/frames.html
|
253
|
+
- doc/index.html
|
254
|
+
- doc/js/app.js
|
255
|
+
- doc/js/full_list.js
|
256
|
+
- doc/js/jquery.js
|
257
|
+
- doc/method_list.html
|
258
|
+
- doc/top-level-namespace.html
|
196
259
|
- echosign.gemspec
|
197
260
|
- features/support/env.rb
|
198
261
|
- fixtures/agreement.pdf
|
@@ -224,6 +287,8 @@ files:
|
|
224
287
|
- fixtures/vcr_cassettes/library_combined_document.yml
|
225
288
|
- fixtures/vcr_cassettes/library_document_audit_trail.yml
|
226
289
|
- fixtures/vcr_cassettes/personalize_widget.yml
|
290
|
+
- fixtures/vcr_cassettes/refresh_token.yml
|
291
|
+
- fixtures/vcr_cassettes/revoke_token.yml
|
227
292
|
- fixtures/vcr_cassettes/update_widget_status.yml
|
228
293
|
- lib/echosign.rb
|
229
294
|
- lib/echosign/agreement.rb
|
@@ -261,15 +326,15 @@ files:
|
|
261
326
|
- lib/echosign/widget/widget_vaulting_info.rb
|
262
327
|
- spec/lib/agreement/client_spec.rb
|
263
328
|
- spec/lib/client_spec.rb
|
329
|
+
- spec/lib/credentials_spec.rb
|
264
330
|
- spec/lib/library_documents/client_spec.rb
|
265
|
-
- spec/lib/request_spec.rb
|
266
331
|
- spec/lib/shared_client.rb
|
267
332
|
- spec/lib/user_spec.rb
|
268
333
|
- spec/lib/validatable_spec.rb
|
269
334
|
- spec/lib/version_spec.rb
|
270
335
|
- spec/lib/widget/client_spec.rb
|
271
336
|
- spec/spec_helper.rb
|
272
|
-
homepage: http://github.com/
|
337
|
+
homepage: http://github.com/chamberflag/echosign
|
273
338
|
licenses:
|
274
339
|
- MIT
|
275
340
|
metadata: {}
|
@@ -297,8 +362,8 @@ test_files:
|
|
297
362
|
- features/support/env.rb
|
298
363
|
- spec/lib/agreement/client_spec.rb
|
299
364
|
- spec/lib/client_spec.rb
|
365
|
+
- spec/lib/credentials_spec.rb
|
300
366
|
- spec/lib/library_documents/client_spec.rb
|
301
|
-
- spec/lib/request_spec.rb
|
302
367
|
- spec/lib/shared_client.rb
|
303
368
|
- spec/lib/user_spec.rb
|
304
369
|
- spec/lib/validatable_spec.rb
|