groupdocs 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/.travis.yml +4 -0
  2. data/CHANGELOG.md +32 -0
  3. data/examples/api-samples/public/css/style.css +123 -67
  4. data/examples/api-samples/public/images/help.png +0 -0
  5. data/examples/api-samples/public/images/info.png +0 -0
  6. data/examples/api-samples/public/templates/base-simple_source.html +192 -0
  7. data/examples/api-samples/public/templates/testdocument.html +101 -0
  8. data/examples/api-samples/public/templates/welcome.htm +137 -0
  9. data/examples/api-samples/samples/sample18.rb +134 -31
  10. data/examples/api-samples/views/sample18.haml +127 -9
  11. data/lib/groupdocs/api/request.rb +1 -1
  12. data/lib/groupdocs/document.rb +6 -3
  13. data/lib/groupdocs/signature.rb +6 -0
  14. data/lib/groupdocs/signature/contact.rb +42 -0
  15. data/lib/groupdocs/signature/envelope.rb +71 -0
  16. data/lib/groupdocs/signature/field.rb +21 -2
  17. data/lib/groupdocs/signature/form.rb +162 -9
  18. data/lib/groupdocs/signature/role.rb +5 -31
  19. data/lib/groupdocs/signature/shared/document_methods.rb +2 -1
  20. data/lib/groupdocs/signature/shared/entity_fields.rb +6 -16
  21. data/lib/groupdocs/signature/shared/entity_methods.rb +2 -2
  22. data/lib/groupdocs/signature/shared/field_methods.rb +56 -2
  23. data/lib/groupdocs/storage.rb +1 -0
  24. data/lib/groupdocs/storage/provider.rb +32 -0
  25. data/lib/groupdocs/user.rb +66 -0
  26. data/lib/groupdocs/version.rb +1 -1
  27. data/spec/groupdocs/signature/contact_spec.rb +21 -0
  28. data/spec/groupdocs/signature/envelope_spec.rb +53 -1
  29. data/spec/groupdocs/signature/field_spec.rb +19 -1
  30. data/spec/groupdocs/signature/form_spec.rb +47 -11
  31. data/spec/groupdocs/signature/role_spec.rb +4 -47
  32. data/spec/groupdocs/signature_spec.rb +4 -0
  33. data/spec/groupdocs/storage/provider_spec.rb +22 -0
  34. data/spec/groupdocs/user_spec.rb +54 -0
  35. data/spec/support/json/user_embed_key.json +39 -0
  36. data/spec/support/json/user_providers.json +31 -0
  37. data/spec/support/json/user_roles.json +25 -0
  38. data/spec/support/shared_examples/signature/shared/entity_fields.rb +14 -26
  39. data/spec/support/shared_examples/signature/shared/field_methods.rb +58 -34
  40. metadata +18 -4
@@ -4,3 +4,7 @@ rvm:
4
4
  - 1.9.2
5
5
  - 1.9.3
6
6
  - 2.0.0
7
+ matrix:
8
+ allow_failures:
9
+ # TODO: splats are not nice in Ruby 1.8 (see FieldMethods spec)
10
+ - rvm: 1.8.7
@@ -1,3 +1,35 @@
1
+ ## v1.4
2
+
3
+ **New**
4
+
5
+ * Added watermark support to `Signature::EntityFields` and `Signature::Form`
6
+ * Added signature and initials data support to `Signature`
7
+ * Added `Signature::Envelope#is_demo`
8
+ * Added `:scheduled` status for `Envelope`
9
+ * Added `Envelope#delegate_recipient!`
10
+ * Added `Envelope#signed_document!`
11
+ * Added `Signature::FieldMethods#assign_field!` support in templates and envelopes
12
+ * Added `Signature::Contact#add_integration!`
13
+ * `Signature::Form` now supports document methods
14
+ * `Signature::Form` now supports field methods
15
+
16
+ **Changes**
17
+
18
+ * Fixed `#owner_should_sign` and `#ordered_signature` in `Signature::EntityFields` as API now return boolean values
19
+ * Fixed `Signature::Role#can*` methods as API now return boolean values
20
+ * `Signature::Field#acceptable_values` should properly handle arrays
21
+ * `Signature::Form#fields_in_final_file_name` should properly handle arrays
22
+ * `Signature::DocumentMethods#documents!` now find documents both by `:documentId` and `:id`
23
+ * `Signature::Form#create!` now can be created without template
24
+
25
+ ## v1.3
26
+
27
+ **New**
28
+
29
+ * Added Ruby 1.8 support
30
+ * Added Ruby 2.0 support
31
+ * Added `Document#thumbnails!`
32
+
1
33
  ## v1.2
2
34
 
3
35
  **New**
@@ -59,9 +59,14 @@ h1,h2,h3,h4,h5 {
59
59
  }
60
60
  h1 { font-size:64px; }
61
61
  h2 { font-size:40px; }
62
- h3 { font-size:36px; }
62
+ h3 {
63
+ font-size:36px;
64
+ padding-top: 25px;
65
+ text-align:center;
66
+ }
63
67
  h4 { font-size:28px; }
64
68
  h5 { font-size:21px; }
69
+
65
70
  blockquote {
66
71
  padding:10px;
67
72
  border:1px solid #666;
@@ -71,96 +76,147 @@ blockquote {
71
76
  -moz-border-radius:10px;
72
77
  -webkit-border-radius:10px;
73
78
  }
74
- blockquote:first-child {
75
- margin-top:15px;
76
- }
79
+
80
+ blockquote:first-child {
81
+ margin-top:15px;
82
+ }
83
+
77
84
  p,ul,ol {
78
85
  line-height:18px;
79
86
  margin-bottom:15px;
80
87
  }
81
- p:last-child { margin-bottom:0; }
88
+
89
+ p:last-child { margin-bottom:0; }
90
+
82
91
  ul,ol { margin:0 45px 15px 45px; }
83
- li { list-style-type:disc; }
92
+
93
+ li { list-style-type:disc; }
94
+
84
95
  pre,code,tt {
85
96
  font-family:monaco;
86
97
  font-size:13px;
87
98
  line-height:16px;
88
99
  }
100
+
89
101
  pre {
90
102
  background:#ccc;
91
103
  padding:15px;
92
104
  margin-bottom:15px;
93
105
  }
94
- pre:last-child { margin-bottom:0; }
106
+
107
+ pre:last-child { margin-bottom:0; }
108
+
95
109
  code,tt {
96
110
  background:#ccc;
97
111
  padding:2px 5px;
98
112
  }
113
+
99
114
  small { font-size:0.6em; }
115
+
100
116
  a { text-decoration:none; }
101
117
  a:link,a:visited { color:#069; }
102
118
  a:hover { color:#09c; }
119
+
103
120
  table {
104
121
  margin-bottom:15px;
105
122
  width:100%;
106
123
  }
107
- th,td {
108
- font-size:15px;
109
- line-height:15px;
110
- padding:5px 15px 5px 5px;
111
- vertical-align:top;
112
- }
113
- th {
114
- font-size:11px;
115
- font-variant:small-caps;
116
- text-align:left;
117
- vertical-align:top;
118
- }
119
- td:last-child {
120
- padding-right:3px;
121
- }
122
- tr.odd { background:#ccc; }
123
- div.header,div.content,div.footer { padding:30px; }
124
- div.content h3,div.content h4 { margin-bottom:15px; }
125
- div.content table {
126
- border:1px solid #666;
127
- margin:0 auto 15px auto;
128
- width:640px;
129
- }
130
- div.content tr { border:1px solid #666; }
131
- div.content th {
132
- font-family:qlassik;
133
- font-size:18px;
134
- text-transform:uppercase;
135
- color:#fff;
136
- background:#666;
137
- }
138
- div.content th,div.content td { padding:8px; }
139
- div.content td.pass { background:#cfc; }
140
- div.content td.fail { background:#fcc; }
141
- div.header {
142
- background:#999;
143
- border-radius:15px 15px 0 0;
144
- -moz-border-radius:15px 15px 0 0;
145
- -webkit-border-radius:15px 15px 0 0;
146
- }
147
- div.header h4 {
148
- font-family:qlassik;
149
- text-align:center;
150
- color:#333;
151
- }
152
- div.header h1 {
153
- color:#fff;
154
- font-size:72px;
155
- text-align:center;
156
- text-shadow:0 2px 5px #000;
157
- }
158
- div.footer {
159
- background:#333;
160
- }
161
- div.footer h5 {
162
- color:#666;
163
- text-align:center;
164
- text-shadow:0 2px 5px #000;
165
- margin:0;
166
- }
124
+
125
+ th,td {
126
+ font-size:15px;
127
+ line-height:15px;
128
+ padding:5px 15px 5px 5px;
129
+ vertical-align:top;
130
+ }
131
+
132
+ .border td {
133
+ border: 1px solid black;
134
+ }
135
+
136
+ th {
137
+ font-size:11px;
138
+ font-variant:small-caps;
139
+ text-align:left;
140
+ vertical-align:top;
141
+ }
142
+
143
+ td:last-child {
144
+ padding-right:3px;
145
+ }
146
+
147
+ tr.odd { background:#ccc; }
148
+
149
+ div.header,div.content,div.footer { padding:30px; }
150
+
151
+ div.content h3,div.content h4 { margin-bottom:15px; }
152
+
153
+ div.content table {
154
+ border:1px solid #666;
155
+ margin:0 auto 15px auto;
156
+ width:640px;
157
+ }
158
+
159
+ div.content tr { border:1px solid #666; }
160
+
161
+ div.content th {
162
+ font-family:qlassik;
163
+ font-size:18px;
164
+ text-transform:uppercase;
165
+ color:#fff;
166
+ background:#666;
167
+ }
168
+
169
+ div.content th,div.content td { padding:8px; }
170
+
171
+ div.content td.pass { background:#cfc; }
172
+
173
+ div.content td.fail { background:#fcc; }
174
+
175
+ div.header {
176
+ background:#999;
177
+ border-radius:15px 15px 0 0;
178
+ -moz-border-radius:15px 15px 0 0;
179
+ -webkit-border-radius:15px 15px 0 0;
180
+ }
181
+
182
+ div.header h4 {
183
+ font-family:qlassik;
184
+ text-align:center;
185
+ color:#333;
186
+ }
187
+
188
+ div.header h1 {
189
+ color:#fff;
190
+ font-size:72px;
191
+ text-align:center;
192
+ text-shadow:0 2px 5px #000;
193
+ }
194
+
195
+ div.footer {
196
+ background:#333;
197
+ }
198
+
199
+ div.footer h5 {
200
+ color:#666;
201
+ text-align:center;
202
+ text-shadow:0 2px 5px #000;
203
+ margin:0;
204
+ }
205
+
206
+
207
+ .optional {
208
+ color: grey;
209
+ font-style: italic;
210
+ }
211
+
212
+ .description {
213
+ font-style: italic;
214
+ background: url(/images/info.png) no-repeat left;
215
+ padding-left: 25px;
216
+ }
217
+
218
+ .documentation {
219
+ float: right;
220
+ background: url(/images/help.png) no-repeat left;
221
+ padding-left: 20px;
222
+ }
@@ -0,0 +1,192 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html>
3
+ <head>
4
+ <title>YUI Library - Base</title>
5
+ <link rel="stylesheet" type="text/css" href="../../build/reset/reset.css">
6
+ <link rel="stylesheet" type="text/css" href="../../build/fonts/fonts.css">
7
+ <link rel="stylesheet" type="text/css" href="../../build/base/base.css">
8
+ </head>
9
+
10
+ <body>
11
+
12
+ <h1>This document shows various HTML elements</h1>
13
+
14
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, volutpat. </p>
15
+ <h2>This is 2nd level heading bh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam no</h2>
16
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>
17
+ <h3>This is 3rd level heading</h3>
18
+
19
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>
20
+ <h4>This is 4th level heading</h4>
21
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>
22
+ <h5>This is 5th level heading</h5>
23
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>
24
+ <h6>This is 6th level heading</h6>
25
+
26
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>
27
+
28
+ <h2>Basic block level elements</h2>
29
+
30
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
31
+
32
+ <address>This holds an address. Block level, but without margin or padding because they're often stacked.</address>
33
+
34
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
35
+
36
+ <div>This is a <code>div</code> element. Lorem ipsum dolor sit amet, elit, sed diam nonummy nibh euismod tincidunt ut consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. (End of <code>div</code>.)</div>
37
+
38
+ <blockquote>
39
+ <p>This is a block quotation containing a <em>single</em> paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p></blockquote>
40
+
41
+
42
+ <p>The following contains address information about the author, in an <code>address</code>
43
+ element.</p>
44
+
45
+
46
+ <h2>Lists</h2>
47
+
48
+ <p>This is a paragraph before an <strong>unnumbered</strong> list (<code>ul</code>). Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
49
+
50
+ <ul>
51
+ <li>One.</li>
52
+ <li>Two.</li>
53
+ <li>Three. Well, probably this list item should be longer. Note that for short items lists look better if they are compactly presented, whereas for long items, it would be better to have more vertical spacing between items.</li>
54
+ <li>Four. This is the last item in this list. Let us terminate the list now without making any more fuss about it.</li>
55
+ </ul>
56
+
57
+ <p>This is a paragraph before a <strong>numbered</strong> list (<code>ol</code>). Note that the spacing between a paragraph and a list before or after that is hard to tune in a user style sheet. You can't guess which paragraphs are logically related to a list, e.g. as a "list header".</p>
58
+
59
+ <ol>
60
+ <li>One.</li>
61
+ <li>Two.</li>
62
+ <li>Three. Well, probably this list item should be longer. Note that if items are short, lists look better if they are compactly presented, whereas for long items, it would be better to have more vertical spacing between items.</li>
63
+ <li>Four. This is the last item in this list. Let us terminate the list now without making any more fuss about it.</li>
64
+ <li>Five</li>
65
+ <li>Six</li>
66
+ <li>Seven</li>
67
+ <li>Eight</li>
68
+ <li>Nine</li>
69
+ <li>Ten</li>
70
+
71
+ </ol>
72
+
73
+ <p>This is a paragraph before a <strong>definition</strong> list (<code>dl</code>). In principle, such a list should consist of <em>terms</em> and associated definitions. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>
74
+ <dl>
75
+ <dt>Apple</dt>
76
+ <dd>is a fruit.</dd>
77
+ <dt>Banana</dt>
78
+ <dd>Is also a fruit.</dd>
79
+ <dt>Tomato</dt>
80
+ <dd>Is debatable. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</dd>
81
+ </dl>
82
+
83
+ <h2>Text-level markup</h2>
84
+
85
+
86
+ <ul>
87
+ <li> <abbr title="Cascading Style Sheets">CSS</abbr> (an abbreviation;
88
+ <code>abbr</code> markup used)</li>
89
+ <li> <acronym title="radio detecting and ranging">radar</acronym> (an acronym; <code>acronym</code> markup used)</li>
90
+
91
+ <li> <cite>Origin of Species</cite> (a book title; <code>cite</code> markup used)</li>
92
+ <li> <code>a[i] = b[i] + c[i);</code> (computer code; <code>code</code> markup used)</li>
93
+
94
+ <li> an <dfn>octet</dfn> is an entity consisting of eight bits
95
+ (<code>dfn</code> markup used for the term being defined)</li>
96
+ <li> this is <em>very</em> simple (<code>em</code> markup used for emphasizing
97
+ a word)</li>
98
+
99
+ <li> type <kbd>yes</kbd> when prompted for an answer (<code>kbd</code> markup
100
+ used for text indicating keyboard input)</li>
101
+ <li> <q>Hello!</q> (<code>q</code> markup used for quotation)</li>
102
+
103
+ <li> He said: <q>She said <q>Hello!</q></q> (a quotation inside a quotation)</li>
104
+ <li> you may get the message <samp>Core dumped</samp> at times
105
+ (<code>samp</code> markup used for sample output)</li>
106
+
107
+ <li> <strong>this is highlighted text</strong> (<code>strong</code> markup used)</li>
108
+
109
+ <li> <tt>text in monospace font</tt> (<code>tt</code> markup used)</li>
110
+
111
+ <li> the command <code>cat</code> <var>filename</var> displays the
112
+ file specified by the <var>filename</var> (<code>var</code> markup
113
+ used to indicate a word as a variable).</li>
114
+ <li> In order to test how subscripts and superscripts (<code>sub</code> and <code>sup</code> markup) work inside running text, we need some dummy text around constructs like x<sub>1</sub> and H<sub>2</sub>O (where subscripts occur). So here is some fill so that you will (hopefully) see whether and how badly the subscripts and superscripts mess up vertical spacing between lines. Now superscripts: M<sup>lle</sup>, 1<sup>st</sup>, and then some mathematical notations: e<sup>x</sup>, sin<sup>2</sup> <i>x</i>, and some nested superscripts (exponents) too: Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </li>
115
+
116
+ </ul>
117
+
118
+ <p>Some of the elements tested above are typically displayed in a monospace font, often using the <em>same</em> presentation for all of them. This tests whether that is the case on your browser:</p>
119
+
120
+ <ul>
121
+ <li><code>This is sample text inside code markup</code></li>
122
+ <li><kbd>This is sample text inside kbd markup</kbd></li>
123
+ <li><samp>This is sample text inside samp markup</samp></li>
124
+
125
+ <li><tt>This is sample text inside tt markup</tt></li>
126
+ </ul>
127
+
128
+ <h2>Links</h2>
129
+
130
+ <ul>
131
+ <li><a href="http://developer.yahoo.com/yui">developer.yahoo.com/yui</a></li>
132
+ <li><a href="http://yuiblog.com">the YUI Blog</a></li>
133
+ </ul>
134
+
135
+
136
+ <h2>Tables</h2>
137
+
138
+ <p>The following table has a caption. The first row and the first column contain table header cells only; other cells are data cells.</p>
139
+
140
+ <table summary="each row names a nordic country and specifies its total area and land area, in square kilometers">
141
+ <caption>Caption: Sample table: Areas of the Nordic countries, in sq km</caption>
142
+ <tr>
143
+ <th>Country</th>
144
+ <th>Total area</th>
145
+
146
+ <th>Land area</th>
147
+ </tr>
148
+ <tr>
149
+ <th>Denmark</th>
150
+ <td>43,070</td>
151
+ <td>42,370</td>
152
+ </tr>
153
+ <tr>
154
+
155
+ <th>Finland</th>
156
+ <td>337,030</td>
157
+ <td>305,470</td>
158
+ </tr>
159
+ <tr>
160
+ <th>Iceland</th>
161
+ <td>103,000</td>
162
+
163
+ <td>100,250</td>
164
+ </tr>
165
+ <tr>
166
+ <th>Norway</th>
167
+ <td>324,220</td>
168
+ <td>307,860</td>
169
+ </tr>
170
+
171
+ <tr>
172
+ <th>Sweden</th>
173
+ <td>449,964</td>
174
+ <td>410,928</td>
175
+ </tr>
176
+ </table>
177
+
178
+ <p>This next bit shows that PREformatted text is working.</p>
179
+
180
+ <pre>
181
+ 1
182
+ 2
183
+ 3
184
+ 4
185
+ 5
186
+ </pre>
187
+
188
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
189
+
190
+
191
+ </body>
192
+ </html>