echosign 1.5.0 → 1.5.2
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/.rubocop_todo.yml +2 -2
- data/.travis.yml +1 -1
- data/Gemfile +3 -3
- data/Gemfile.lock +12 -8
- data/README.md +3 -3
- data/doc/css/full_list.css +58 -58
- data/doc/css/style.css +496 -496
- data/doc/file.README.html +5 -5
- data/doc/file_list.html +56 -56
- data/doc/frames.html +17 -17
- data/doc/index.html +5 -5
- data/doc/js/app.js +292 -292
- data/doc/js/full_list.js +216 -216
- data/echosign.gemspec +1 -1
- data/features/support/env.rb +8 -8
- data/fixtures/vcr_cassettes/create_agreement_failure.yml +46 -0
- data/lib/echosign.rb +11 -11
- data/lib/echosign/request.rb +11 -3
- data/lib/echosign/version.rb +1 -1
- data/spec/lib/agreement/client_spec.rb +6 -0
- metadata +4 -3
data/doc/js/full_list.js
CHANGED
@@ -1,216 +1,216 @@
|
|
1
|
-
(function() {
|
2
|
-
|
3
|
-
var $clicked = $(null);
|
4
|
-
var searchTimeout = null;
|
5
|
-
var searchCache = [];
|
6
|
-
var caseSensitiveMatch = false;
|
7
|
-
var ignoreKeyCodeMin = 8;
|
8
|
-
var ignoreKeyCodeMax = 46;
|
9
|
-
var commandKey = 91;
|
10
|
-
|
11
|
-
RegExp.escape = function(text) {
|
12
|
-
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
13
|
-
}
|
14
|
-
|
15
|
-
function escapeShortcut() {
|
16
|
-
$(document).keydown(function(evt) {
|
17
|
-
if (evt.which == 27) {
|
18
|
-
window.parent.postMessage('navEscape', '*');
|
19
|
-
}
|
20
|
-
});
|
21
|
-
}
|
22
|
-
|
23
|
-
function navResizer() {
|
24
|
-
$(window).mousemove(function(e) {
|
25
|
-
window.parent.postMessage({
|
26
|
-
action: 'mousemove', event: {pageX: e.pageX, which: e.which}
|
27
|
-
}, '*');
|
28
|
-
}).mouseup(function(e) {
|
29
|
-
window.parent.postMessage({action: 'mouseup'}, '*');
|
30
|
-
});
|
31
|
-
window.parent.postMessage("navReady", "*");
|
32
|
-
}
|
33
|
-
|
34
|
-
function clearSearchTimeout() {
|
35
|
-
clearTimeout(searchTimeout);
|
36
|
-
searchTimeout = null;
|
37
|
-
}
|
38
|
-
|
39
|
-
function enableLinks() {
|
40
|
-
// load the target page in the parent window
|
41
|
-
$('#full_list li').on('click', function(evt) {
|
42
|
-
$('#full_list li').removeClass('clicked');
|
43
|
-
$clicked = $(this);
|
44
|
-
$clicked.addClass('clicked');
|
45
|
-
evt.stopPropagation();
|
46
|
-
|
47
|
-
if (evt.target.tagName === 'A') return true;
|
48
|
-
|
49
|
-
var elem = $clicked.find('> .item .object_link a')[0];
|
50
|
-
var e = evt.originalEvent;
|
51
|
-
var newEvent = new MouseEvent(evt.originalEvent.type);
|
52
|
-
newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
|
53
|
-
elem.dispatchEvent(newEvent);
|
54
|
-
evt.preventDefault();
|
55
|
-
return false;
|
56
|
-
});
|
57
|
-
}
|
58
|
-
|
59
|
-
function enableToggles() {
|
60
|
-
// show/hide nested classes on toggle click
|
61
|
-
$('#full_list a.toggle').on('click', function(evt) {
|
62
|
-
evt.stopPropagation();
|
63
|
-
evt.preventDefault();
|
64
|
-
$(this).parent().parent().toggleClass('collapsed');
|
65
|
-
highlight();
|
66
|
-
});
|
67
|
-
}
|
68
|
-
|
69
|
-
function populateSearchCache() {
|
70
|
-
$('#full_list li .item').each(function() {
|
71
|
-
var $node = $(this);
|
72
|
-
var $link = $node.find('.object_link a');
|
73
|
-
if ($link.length > 0) {
|
74
|
-
searchCache.push({
|
75
|
-
node: $node,
|
76
|
-
link: $link,
|
77
|
-
name: $link.text(),
|
78
|
-
fullName: $link.attr('title').split(' ')[0]
|
79
|
-
});
|
80
|
-
}
|
81
|
-
});
|
82
|
-
}
|
83
|
-
|
84
|
-
function enableSearch() {
|
85
|
-
$('#search input').keyup(function(event) {
|
86
|
-
if (ignoredKeyPress(event)) return;
|
87
|
-
if (this.value === "") {
|
88
|
-
clearSearch();
|
89
|
-
} else {
|
90
|
-
performSearch(this.value);
|
91
|
-
}
|
92
|
-
});
|
93
|
-
|
94
|
-
$('#full_list').after("<div id='noresults' style='display:none'></div>");
|
95
|
-
}
|
96
|
-
|
97
|
-
function ignoredKeyPress(event) {
|
98
|
-
if (
|
99
|
-
(event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) ||
|
100
|
-
(event.keyCode == commandKey)
|
101
|
-
) {
|
102
|
-
return true;
|
103
|
-
} else {
|
104
|
-
return false;
|
105
|
-
}
|
106
|
-
}
|
107
|
-
|
108
|
-
function clearSearch() {
|
109
|
-
clearSearchTimeout();
|
110
|
-
$('#full_list .found').removeClass('found').each(function() {
|
111
|
-
var $link = $(this).find('.object_link a');
|
112
|
-
$link.text($link.text());
|
113
|
-
});
|
114
|
-
$('#full_list, #content').removeClass('insearch');
|
115
|
-
$clicked.parents().removeClass('collapsed');
|
116
|
-
highlight();
|
117
|
-
}
|
118
|
-
|
119
|
-
function performSearch(searchString) {
|
120
|
-
clearSearchTimeout();
|
121
|
-
$('#full_list, #content').addClass('insearch');
|
122
|
-
$('#noresults').text('').hide();
|
123
|
-
partialSearch(searchString, 0);
|
124
|
-
}
|
125
|
-
|
126
|
-
function partialSearch(searchString, offset) {
|
127
|
-
var lastRowClass = '';
|
128
|
-
var i = null;
|
129
|
-
for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) {
|
130
|
-
var item = searchCache[i];
|
131
|
-
var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name);
|
132
|
-
var matchString = buildMatchString(searchString);
|
133
|
-
var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i");
|
134
|
-
if (searchName.match(matchRegexp) == null) {
|
135
|
-
item.node.removeClass('found');
|
136
|
-
item.link.text(item.link.text());
|
137
|
-
}
|
138
|
-
else {
|
139
|
-
item.node.addClass('found');
|
140
|
-
item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1');
|
141
|
-
lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2';
|
142
|
-
item.link.html(item.name.replace(matchRegexp, "<strong>$&</strong>"));
|
143
|
-
}
|
144
|
-
}
|
145
|
-
if(i == searchCache.length) {
|
146
|
-
searchDone();
|
147
|
-
} else {
|
148
|
-
searchTimeout = setTimeout(function() {
|
149
|
-
partialSearch(searchString, i);
|
150
|
-
}, 0);
|
151
|
-
}
|
152
|
-
}
|
153
|
-
|
154
|
-
function searchDone() {
|
155
|
-
searchTimeout = null;
|
156
|
-
highlight();
|
157
|
-
if ($('#full_list li:visible').size() === 0) {
|
158
|
-
$('#noresults').text('No results were found.').hide().fadeIn();
|
159
|
-
} else {
|
160
|
-
$('#noresults').text('').hide();
|
161
|
-
}
|
162
|
-
$('#content').removeClass('insearch');
|
163
|
-
}
|
164
|
-
|
165
|
-
function buildMatchString(searchString, event) {
|
166
|
-
caseSensitiveMatch = searchString.match(/[A-Z]/) != null;
|
167
|
-
var regexSearchString = RegExp.escape(searchString);
|
168
|
-
if (caseSensitiveMatch) {
|
169
|
-
regexSearchString += "|" +
|
170
|
-
$.map(searchString.split(''), function(e) { return RegExp.escape(e); }).
|
171
|
-
join('.+?');
|
172
|
-
}
|
173
|
-
return regexSearchString;
|
174
|
-
}
|
175
|
-
|
176
|
-
function highlight() {
|
177
|
-
$('#full_list li:visible').each(function(n) {
|
178
|
-
$(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even');
|
179
|
-
});
|
180
|
-
}
|
181
|
-
|
182
|
-
/**
|
183
|
-
* Expands the tree to the target element and its immediate
|
184
|
-
* children.
|
185
|
-
*/
|
186
|
-
function expandTo(path) {
|
187
|
-
var $target = $(document.getElementById('object_' + path));
|
188
|
-
$target.addClass('clicked');
|
189
|
-
$target.removeClass('collapsed');
|
190
|
-
$target.parentsUntil('#full_list', 'li').removeClass('collapsed');
|
191
|
-
if($target[0]) {
|
192
|
-
window.scrollTo(window.scrollX, $target.offset().top - 250);
|
193
|
-
highlight();
|
194
|
-
}
|
195
|
-
}
|
196
|
-
|
197
|
-
function windowEvents(event) {
|
198
|
-
var msg = event.data;
|
199
|
-
if (msg.action === "expand") {
|
200
|
-
expandTo(msg.path);
|
201
|
-
}
|
202
|
-
return false;
|
203
|
-
}
|
204
|
-
|
205
|
-
window.addEventListener("message", windowEvents, false);
|
206
|
-
|
207
|
-
$(document).ready(function() {
|
208
|
-
escapeShortcut();
|
209
|
-
navResizer();
|
210
|
-
enableLinks();
|
211
|
-
enableToggles();
|
212
|
-
populateSearchCache();
|
213
|
-
enableSearch();
|
214
|
-
});
|
215
|
-
|
216
|
-
})();
|
1
|
+
(function() {
|
2
|
+
|
3
|
+
var $clicked = $(null);
|
4
|
+
var searchTimeout = null;
|
5
|
+
var searchCache = [];
|
6
|
+
var caseSensitiveMatch = false;
|
7
|
+
var ignoreKeyCodeMin = 8;
|
8
|
+
var ignoreKeyCodeMax = 46;
|
9
|
+
var commandKey = 91;
|
10
|
+
|
11
|
+
RegExp.escape = function(text) {
|
12
|
+
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
13
|
+
}
|
14
|
+
|
15
|
+
function escapeShortcut() {
|
16
|
+
$(document).keydown(function(evt) {
|
17
|
+
if (evt.which == 27) {
|
18
|
+
window.parent.postMessage('navEscape', '*');
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
function navResizer() {
|
24
|
+
$(window).mousemove(function(e) {
|
25
|
+
window.parent.postMessage({
|
26
|
+
action: 'mousemove', event: {pageX: e.pageX, which: e.which}
|
27
|
+
}, '*');
|
28
|
+
}).mouseup(function(e) {
|
29
|
+
window.parent.postMessage({action: 'mouseup'}, '*');
|
30
|
+
});
|
31
|
+
window.parent.postMessage("navReady", "*");
|
32
|
+
}
|
33
|
+
|
34
|
+
function clearSearchTimeout() {
|
35
|
+
clearTimeout(searchTimeout);
|
36
|
+
searchTimeout = null;
|
37
|
+
}
|
38
|
+
|
39
|
+
function enableLinks() {
|
40
|
+
// load the target page in the parent window
|
41
|
+
$('#full_list li').on('click', function(evt) {
|
42
|
+
$('#full_list li').removeClass('clicked');
|
43
|
+
$clicked = $(this);
|
44
|
+
$clicked.addClass('clicked');
|
45
|
+
evt.stopPropagation();
|
46
|
+
|
47
|
+
if (evt.target.tagName === 'A') return true;
|
48
|
+
|
49
|
+
var elem = $clicked.find('> .item .object_link a')[0];
|
50
|
+
var e = evt.originalEvent;
|
51
|
+
var newEvent = new MouseEvent(evt.originalEvent.type);
|
52
|
+
newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
|
53
|
+
elem.dispatchEvent(newEvent);
|
54
|
+
evt.preventDefault();
|
55
|
+
return false;
|
56
|
+
});
|
57
|
+
}
|
58
|
+
|
59
|
+
function enableToggles() {
|
60
|
+
// show/hide nested classes on toggle click
|
61
|
+
$('#full_list a.toggle').on('click', function(evt) {
|
62
|
+
evt.stopPropagation();
|
63
|
+
evt.preventDefault();
|
64
|
+
$(this).parent().parent().toggleClass('collapsed');
|
65
|
+
highlight();
|
66
|
+
});
|
67
|
+
}
|
68
|
+
|
69
|
+
function populateSearchCache() {
|
70
|
+
$('#full_list li .item').each(function() {
|
71
|
+
var $node = $(this);
|
72
|
+
var $link = $node.find('.object_link a');
|
73
|
+
if ($link.length > 0) {
|
74
|
+
searchCache.push({
|
75
|
+
node: $node,
|
76
|
+
link: $link,
|
77
|
+
name: $link.text(),
|
78
|
+
fullName: $link.attr('title').split(' ')[0]
|
79
|
+
});
|
80
|
+
}
|
81
|
+
});
|
82
|
+
}
|
83
|
+
|
84
|
+
function enableSearch() {
|
85
|
+
$('#search input').keyup(function(event) {
|
86
|
+
if (ignoredKeyPress(event)) return;
|
87
|
+
if (this.value === "") {
|
88
|
+
clearSearch();
|
89
|
+
} else {
|
90
|
+
performSearch(this.value);
|
91
|
+
}
|
92
|
+
});
|
93
|
+
|
94
|
+
$('#full_list').after("<div id='noresults' style='display:none'></div>");
|
95
|
+
}
|
96
|
+
|
97
|
+
function ignoredKeyPress(event) {
|
98
|
+
if (
|
99
|
+
(event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) ||
|
100
|
+
(event.keyCode == commandKey)
|
101
|
+
) {
|
102
|
+
return true;
|
103
|
+
} else {
|
104
|
+
return false;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
function clearSearch() {
|
109
|
+
clearSearchTimeout();
|
110
|
+
$('#full_list .found').removeClass('found').each(function() {
|
111
|
+
var $link = $(this).find('.object_link a');
|
112
|
+
$link.text($link.text());
|
113
|
+
});
|
114
|
+
$('#full_list, #content').removeClass('insearch');
|
115
|
+
$clicked.parents().removeClass('collapsed');
|
116
|
+
highlight();
|
117
|
+
}
|
118
|
+
|
119
|
+
function performSearch(searchString) {
|
120
|
+
clearSearchTimeout();
|
121
|
+
$('#full_list, #content').addClass('insearch');
|
122
|
+
$('#noresults').text('').hide();
|
123
|
+
partialSearch(searchString, 0);
|
124
|
+
}
|
125
|
+
|
126
|
+
function partialSearch(searchString, offset) {
|
127
|
+
var lastRowClass = '';
|
128
|
+
var i = null;
|
129
|
+
for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) {
|
130
|
+
var item = searchCache[i];
|
131
|
+
var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name);
|
132
|
+
var matchString = buildMatchString(searchString);
|
133
|
+
var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i");
|
134
|
+
if (searchName.match(matchRegexp) == null) {
|
135
|
+
item.node.removeClass('found');
|
136
|
+
item.link.text(item.link.text());
|
137
|
+
}
|
138
|
+
else {
|
139
|
+
item.node.addClass('found');
|
140
|
+
item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1');
|
141
|
+
lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2';
|
142
|
+
item.link.html(item.name.replace(matchRegexp, "<strong>$&</strong>"));
|
143
|
+
}
|
144
|
+
}
|
145
|
+
if(i == searchCache.length) {
|
146
|
+
searchDone();
|
147
|
+
} else {
|
148
|
+
searchTimeout = setTimeout(function() {
|
149
|
+
partialSearch(searchString, i);
|
150
|
+
}, 0);
|
151
|
+
}
|
152
|
+
}
|
153
|
+
|
154
|
+
function searchDone() {
|
155
|
+
searchTimeout = null;
|
156
|
+
highlight();
|
157
|
+
if ($('#full_list li:visible').size() === 0) {
|
158
|
+
$('#noresults').text('No results were found.').hide().fadeIn();
|
159
|
+
} else {
|
160
|
+
$('#noresults').text('').hide();
|
161
|
+
}
|
162
|
+
$('#content').removeClass('insearch');
|
163
|
+
}
|
164
|
+
|
165
|
+
function buildMatchString(searchString, event) {
|
166
|
+
caseSensitiveMatch = searchString.match(/[A-Z]/) != null;
|
167
|
+
var regexSearchString = RegExp.escape(searchString);
|
168
|
+
if (caseSensitiveMatch) {
|
169
|
+
regexSearchString += "|" +
|
170
|
+
$.map(searchString.split(''), function(e) { return RegExp.escape(e); }).
|
171
|
+
join('.+?');
|
172
|
+
}
|
173
|
+
return regexSearchString;
|
174
|
+
}
|
175
|
+
|
176
|
+
function highlight() {
|
177
|
+
$('#full_list li:visible').each(function(n) {
|
178
|
+
$(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even');
|
179
|
+
});
|
180
|
+
}
|
181
|
+
|
182
|
+
/**
|
183
|
+
* Expands the tree to the target element and its immediate
|
184
|
+
* children.
|
185
|
+
*/
|
186
|
+
function expandTo(path) {
|
187
|
+
var $target = $(document.getElementById('object_' + path));
|
188
|
+
$target.addClass('clicked');
|
189
|
+
$target.removeClass('collapsed');
|
190
|
+
$target.parentsUntil('#full_list', 'li').removeClass('collapsed');
|
191
|
+
if($target[0]) {
|
192
|
+
window.scrollTo(window.scrollX, $target.offset().top - 250);
|
193
|
+
highlight();
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
197
|
+
function windowEvents(event) {
|
198
|
+
var msg = event.data;
|
199
|
+
if (msg.action === "expand") {
|
200
|
+
expandTo(msg.path);
|
201
|
+
}
|
202
|
+
return false;
|
203
|
+
}
|
204
|
+
|
205
|
+
window.addEventListener("message", windowEvents, false);
|
206
|
+
|
207
|
+
$(document).ready(function() {
|
208
|
+
escapeShortcut();
|
209
|
+
navResizer();
|
210
|
+
enableLinks();
|
211
|
+
enableToggles();
|
212
|
+
populateSearchCache();
|
213
|
+
enableSearch();
|
214
|
+
});
|
215
|
+
|
216
|
+
})();
|
data/echosign.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["joel@mojamail.com"]
|
10
10
|
spec.summary = 'Package summary'
|
11
11
|
spec.description = "A ruby gem that simplifies the use of Adobe's EchoSign web API."
|
12
|
-
spec.homepage = "http://github.com/
|
12
|
+
spec.homepage = "http://github.com/joelbarker2011/echosign"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0")
|
data/features/support/env.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require 'webmock/rspec'
|
2
|
-
|
3
|
-
module WebMockWorld
|
4
|
-
include WebMock
|
5
|
-
include WebMock::Matchers
|
6
|
-
end
|
7
|
-
|
8
|
-
World(WebMockWorld)
|
1
|
+
require 'webmock/rspec'
|
2
|
+
|
3
|
+
module WebMockWorld
|
4
|
+
include WebMock
|
5
|
+
include WebMock::Matchers
|
6
|
+
end
|
7
|
+
|
8
|
+
World(WebMockWorld)
|