groupdocs 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. data/CHANGELOG.md +34 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +3 -0
  4. data/examples/api-samples/public/docs/sample01.html +23 -23
  5. data/examples/api-samples/public/docs/sample02.html +27 -27
  6. data/examples/api-samples/public/docs/sample03.html +81 -69
  7. data/examples/api-samples/public/docs/sample04.html +29 -29
  8. data/examples/api-samples/public/docs/sample05.html +48 -48
  9. data/examples/api-samples/public/docs/sample06.html +47 -46
  10. data/examples/api-samples/public/docs/sample07.html +35 -35
  11. data/examples/api-samples/public/docs/sample08.html +45 -45
  12. data/examples/api-samples/public/docs/sample09.html +57 -57
  13. data/examples/api-samples/public/docs/sample10.html +41 -41
  14. data/examples/api-samples/public/docs/sample11.html +96 -118
  15. data/examples/api-samples/public/docs/sample12.html +29 -50
  16. data/examples/api-samples/public/docs/sample13.html +36 -44
  17. data/examples/api-samples/public/docs/sample14.html +29 -29
  18. data/examples/api-samples/public/docs/sample15.html +24 -24
  19. data/examples/api-samples/public/docs/sample16.html +32 -32
  20. data/examples/api-samples/public/docs/sample17.html +38 -38
  21. data/examples/api-samples/public/docs/sample18.html +105 -101
  22. data/examples/api-samples/public/docs/sample19.html +101 -101
  23. data/examples/api-samples/public/docs/sample20.html +42 -42
  24. data/examples/api-samples/public/docs/sample21.html +109 -109
  25. data/examples/api-samples/public/docs/sample22.html +56 -56
  26. data/examples/api-samples/public/docs/sample23.html +39 -39
  27. data/examples/api-samples/public/docs/sample24.html +36 -36
  28. data/examples/api-samples/public/docs/sample25.html +67 -67
  29. data/examples/api-samples/public/docs/sample26.html +23 -23
  30. data/examples/api-samples/public/docs/sample27.html +72 -72
  31. data/examples/api-samples/public/docs/sample28.html +46 -45
  32. data/examples/api-samples/public/docs/sample29.html +30 -30
  33. data/examples/api-samples/public/docs/sample30.html +30 -30
  34. data/examples/api-samples/public/docs/sample31.html +114 -114
  35. data/examples/api-samples/public/docs/sample32.html +96 -96
  36. data/examples/api-samples/public/docs/sample33.html +56 -56
  37. data/examples/api-samples/public/docs/sample34.html +27 -27
  38. data/examples/api-samples/public/docs/sample35.html +134 -135
  39. data/examples/api-samples/public/docs/sample36.html +32 -32
  40. data/examples/api-samples/public/docs/sample37.html +103 -103
  41. data/examples/api-samples/public/docs/sample38.html +76 -76
  42. data/examples/api-samples/public/docs/sample39.html +136 -136
  43. data/examples/api-samples/public/docs/sample40.html +104 -104
  44. data/examples/api-samples/public/docs/sample41.html +137 -137
  45. data/examples/api-samples/public/docs/sample42.html +61 -61
  46. data/examples/api-samples/public/docs/sample43.html +72 -72
  47. data/examples/api-samples/public/docs/sample44.html +751 -0
  48. data/examples/api-samples/public/docs/sample45.html +236 -0
  49. data/examples/api-samples/public/templates/merge_field3_doc.docx +0 -0
  50. data/examples/api-samples/samples/sample01.rb +2 -2
  51. data/examples/api-samples/samples/sample02.rb +2 -2
  52. data/examples/api-samples/samples/sample03.rb +2 -2
  53. data/examples/api-samples/samples/sample04.rb +2 -2
  54. data/examples/api-samples/samples/sample05.rb +2 -2
  55. data/examples/api-samples/samples/sample06.rb +2 -2
  56. data/examples/api-samples/samples/sample07.rb +2 -2
  57. data/examples/api-samples/samples/sample08.rb +2 -2
  58. data/examples/api-samples/samples/sample09.rb +2 -2
  59. data/examples/api-samples/samples/sample10.rb +2 -2
  60. data/examples/api-samples/samples/sample11.rb +2 -2
  61. data/examples/api-samples/samples/sample12.rb +2 -2
  62. data/examples/api-samples/samples/sample13.rb +2 -2
  63. data/examples/api-samples/samples/sample14.rb +2 -2
  64. data/examples/api-samples/samples/sample15.rb +2 -2
  65. data/examples/api-samples/samples/sample16.rb +2 -2
  66. data/examples/api-samples/samples/sample17.rb +2 -2
  67. data/examples/api-samples/samples/sample18.rb +2 -2
  68. data/examples/api-samples/samples/sample19.rb +2 -2
  69. data/examples/api-samples/samples/sample20.rb +2 -2
  70. data/examples/api-samples/samples/sample21.rb +2 -2
  71. data/examples/api-samples/samples/sample22.rb +2 -2
  72. data/examples/api-samples/samples/sample23.rb +2 -2
  73. data/examples/api-samples/samples/sample24.rb +2 -2
  74. data/examples/api-samples/samples/sample25.rb +2 -2
  75. data/examples/api-samples/samples/sample26.rb +2 -2
  76. data/examples/api-samples/samples/sample27.rb +2 -2
  77. data/examples/api-samples/samples/sample28.rb +2 -2
  78. data/examples/api-samples/samples/sample29.rb +2 -2
  79. data/examples/api-samples/samples/sample30.rb +2 -2
  80. data/examples/api-samples/samples/sample31.rb +2 -2
  81. data/examples/api-samples/samples/sample32.rb +2 -2
  82. data/examples/api-samples/samples/sample33.rb +2 -2
  83. data/examples/api-samples/samples/sample34.rb +2 -2
  84. data/examples/api-samples/samples/sample35.rb +4 -4
  85. data/examples/api-samples/samples/sample36.rb +2 -2
  86. data/examples/api-samples/samples/sample37.rb +2 -2
  87. data/examples/api-samples/samples/sample38.rb +2 -2
  88. data/examples/api-samples/samples/sample39.rb +2 -2
  89. data/examples/api-samples/samples/sample40.rb +2 -2
  90. data/examples/api-samples/samples/sample41.rb +2 -2
  91. data/examples/api-samples/samples/sample42.rb +2 -2
  92. data/examples/api-samples/samples/sample43.rb +2 -2
  93. data/examples/api-samples/samples/sample44.rb +188 -0
  94. data/examples/api-samples/samples/sample45.rb +74 -0
  95. data/examples/api-samples/views/_others_samples.haml +47 -43
  96. data/examples/api-samples/views/index.haml +55 -44
  97. data/examples/api-samples/views/layout.haml +1 -6
  98. data/examples/api-samples/views/sample01.haml +62 -57
  99. data/examples/api-samples/views/sample02.haml +52 -46
  100. data/examples/api-samples/views/sample03.haml +78 -73
  101. data/examples/api-samples/views/sample04.haml +51 -45
  102. data/examples/api-samples/views/sample05.haml +77 -71
  103. data/examples/api-samples/views/sample06.haml +58 -52
  104. data/examples/api-samples/views/sample07.haml +51 -45
  105. data/examples/api-samples/views/sample08.haml +90 -84
  106. data/examples/api-samples/views/sample09.haml +86 -80
  107. data/examples/api-samples/views/sample10.haml +83 -77
  108. data/examples/api-samples/views/sample11.haml +124 -120
  109. data/examples/api-samples/views/sample12.haml +65 -59
  110. data/examples/api-samples/views/sample13.haml +62 -56
  111. data/examples/api-samples/views/sample14.haml +57 -51
  112. data/examples/api-samples/views/sample15.haml +49 -43
  113. data/examples/api-samples/views/sample16.haml +49 -43
  114. data/examples/api-samples/views/sample17.haml +53 -47
  115. data/examples/api-samples/views/sample18.haml +140 -134
  116. data/examples/api-samples/views/sample19.haml +87 -81
  117. data/examples/api-samples/views/sample20.haml +53 -47
  118. data/examples/api-samples/views/sample21.haml +115 -111
  119. data/examples/api-samples/views/sample22.haml +94 -88
  120. data/examples/api-samples/views/sample23.haml +83 -78
  121. data/examples/api-samples/views/sample24.haml +54 -48
  122. data/examples/api-samples/views/sample25.haml +89 -83
  123. data/examples/api-samples/views/sample26.haml +62 -57
  124. data/examples/api-samples/views/sample27.haml +114 -109
  125. data/examples/api-samples/views/sample28.haml +55 -49
  126. data/examples/api-samples/views/sample29.haml +67 -69
  127. data/examples/api-samples/views/sample30.haml +54 -48
  128. data/examples/api-samples/views/sample31.haml +106 -100
  129. data/examples/api-samples/views/sample32.haml +90 -84
  130. data/examples/api-samples/views/sample33.haml +60 -54
  131. data/examples/api-samples/views/sample34.haml +51 -46
  132. data/examples/api-samples/views/sample35.haml +84 -78
  133. data/examples/api-samples/views/sample36.haml +63 -58
  134. data/examples/api-samples/views/sample37.haml +122 -116
  135. data/examples/api-samples/views/sample38.haml +104 -98
  136. data/examples/api-samples/views/sample39.haml +6 -2
  137. data/examples/api-samples/views/sample40.haml +94 -89
  138. data/examples/api-samples/views/sample41.haml +127 -123
  139. data/examples/api-samples/views/sample42.haml +60 -54
  140. data/examples/api-samples/views/sample43.haml +81 -77
  141. data/examples/api-samples/views/sample44.haml +85 -0
  142. data/examples/api-samples/views/sample45.haml +85 -0
  143. data/groupdocs.gemspec +2 -0
  144. data/lib/groupdocs/datasource/field.rb +9 -0
  145. data/lib/groupdocs/document.rb +66 -4
  146. data/lib/groupdocs/document/annotation.rb +11 -6
  147. data/lib/groupdocs/document/editor.rb +53 -0
  148. data/lib/groupdocs/document/field.rb +16 -0
  149. data/lib/groupdocs/document/style.rb +30 -0
  150. data/lib/groupdocs/job.rb +24 -0
  151. data/lib/groupdocs/questionnaire.rb +2 -0
  152. data/lib/groupdocs/questionnaire/collector.rb +52 -0
  153. data/lib/groupdocs/questionnaire/collector_style.rb +54 -0
  154. data/lib/groupdocs/questionnaire/question.rb +9 -0
  155. data/lib/groupdocs/questionnaire/style/base_font.rb +17 -0
  156. data/lib/groupdocs/questionnaire/style/question_title.rb +17 -0
  157. data/lib/groupdocs/questionnaire/style/title.rb +17 -0
  158. data/lib/groupdocs/signature/envelope.rb +43 -8
  159. data/lib/groupdocs/signature/form.rb +113 -12
  160. data/lib/groupdocs/signature/recipient.rb +38 -3
  161. data/lib/groupdocs/signature/shared/field_methods.rb +4 -2
  162. data/lib/groupdocs/signature/template.rb +20 -1
  163. data/lib/groupdocs/storage/file.rb +3 -2
  164. data/lib/groupdocs/user.rb +148 -0
  165. data/lib/groupdocs/version.rb +1 -1
  166. data/spec/groupdocs/api/helpers/access_rights_helper_spec.rb +5 -5
  167. data/spec/groupdocs/document/annotation_spec.rb +1 -1
  168. data/spec/groupdocs/signature/envelope_spec.rb +1 -1
  169. data/spec/groupdocs/user_spec.rb +4 -4
  170. data/spec/support/shared_examples/signature/shared/field_methods.rb +5 -4
  171. metadata +18 -3
@@ -31,9 +31,9 @@
31
31
 
32
32
  </div>
33
33
 
34
- <div class="content"><div class='highlight'><pre>get <span class="string">'/sample36'</span> <span class="keyword">do</span>
35
- haml <span class="symbol">:sample36</span>
36
- <span class="keyword">end</span></pre></div></div>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-36-how-to-download-signed-documents-when-envelope-was-signed'</span> <span class="hljs-keyword">do</span>
35
+ haml <span class="hljs-symbol">:sample36</span>
36
+ <span class="hljs-keyword">end</span></pre></div></div>
37
37
 
38
38
  </li>
39
39
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  </div>
50
50
 
51
- <div class="content"><div class='highlight'><pre>post <span class="string">'/sample36'</span> <span class="keyword">do</span></pre></div></div>
51
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-36-how-to-download-signed-documents-when-envelope-was-signed'</span> <span class="hljs-keyword">do</span></pre></div></div>
52
52
 
53
53
  </li>
54
54
 
@@ -63,10 +63,10 @@
63
63
 
64
64
  </div>
65
65
 
66
- <div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
67
- set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
68
- set <span class="symbol">:envelope</span>, params[<span class="symbol">:envelopeGuid</span>]
69
- set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]</pre></div></div>
66
+ <div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
67
+ set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
68
+ set <span class="hljs-symbol">:envelope</span>, params[<span class="hljs-symbol">:envelopeGuid</span>]
69
+ set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]</pre></div></div>
70
70
 
71
71
  </li>
72
72
 
@@ -81,7 +81,7 @@
81
81
 
82
82
  </div>
83
83
 
84
- <div class="content"><div class='highlight'><pre> downloads_path = <span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads"</span></pre></div></div>
84
+ <div class="content"><div class='highlight'><pre> downloads_path = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/downloads"</span></pre></div></div>
85
85
 
86
86
  </li>
87
87
 
@@ -96,14 +96,14 @@
96
96
 
97
97
  </div>
98
98
 
99
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> <span class="constant">File</span>.directory?(downloads_path)
100
- <span class="constant">Dir</span>.foreach(downloads_path) { |f| fn = <span class="constant">File</span>.join(downloads_path, f); <span class="constant">File</span>.delete(fn) <span class="keyword">if</span> f != <span class="string">'.'</span> &amp;&amp; f != <span class="string">'..'</span> }
101
- <span class="keyword">else</span>
102
- <span class="constant">Dir::</span>mkdir(downloads_path)
103
- <span class="keyword">end</span>
99
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-constant">File</span>.directory?(downloads_path)
100
+ <span class="hljs-constant">Dir</span>.foreach(downloads_path) { |f| fn = <span class="hljs-constant">File</span>.join(downloads_path, f); <span class="hljs-constant">File</span>.delete(fn) <span class="hljs-keyword">if</span> f != <span class="hljs-string">'.'</span> &amp;&amp; f != <span class="hljs-string">'..'</span> }
101
+ <span class="hljs-keyword">else</span>
102
+ <span class="hljs-constant">Dir::</span>mkdir(downloads_path)
103
+ <span class="hljs-keyword">end</span>
104
104
 
105
105
 
106
- <span class="keyword">begin</span></pre></div></div>
106
+ <span class="hljs-keyword">begin</span></pre></div></div>
107
107
 
108
108
  </li>
109
109
 
@@ -118,7 +118,7 @@
118
118
 
119
119
  </div>
120
120
 
121
- <div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty?</pre></div></div>
121
+ <div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty?</pre></div></div>
122
122
 
123
123
  </li>
124
124
 
@@ -133,13 +133,13 @@
133
133
 
134
134
  </div>
135
135
 
136
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
137
- base_path = <span class="string">'https://api.groupdocs.com'</span>
138
- <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
139
- base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
140
- <span class="keyword">else</span>
136
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
137
+ base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
138
+ <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
139
+ base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
140
+ <span class="hljs-keyword">else</span>
141
141
  base_path = settings.base_path
142
- <span class="keyword">end</span></pre></div></div>
142
+ <span class="hljs-keyword">end</span></pre></div></div>
143
143
 
144
144
  </li>
145
145
 
@@ -154,7 +154,7 @@
154
154
 
155
155
  </div>
156
156
 
157
- <div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
157
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
158
158
  groupdocs.client_id = settings.client_id
159
159
  groupdocs.private_key = settings.private_key</pre></div></div>
160
160
 
@@ -171,8 +171,8 @@
171
171
 
172
172
  </div>
173
173
 
174
- <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
175
- <span class="keyword">end</span></pre></div></div>
174
+ <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
175
+ <span class="hljs-keyword">end</span></pre></div></div>
176
176
 
177
177
  </li>
178
178
 
@@ -187,7 +187,7 @@
187
187
 
188
188
  </div>
189
189
 
190
- <div class="content"><div class='highlight'><pre> envelope = <span class="constant">GroupDocs::Signature::Envelope</span>.get!(settings.envelope)</pre></div></div>
190
+ <div class="content"><div class='highlight'><pre> envelope = <span class="hljs-constant">GroupDocs::Signature::Envelope</span>.get!(settings.envelope)</pre></div></div>
191
191
 
192
192
  </li>
193
193
 
@@ -217,12 +217,12 @@
217
217
 
218
218
  </div>
219
219
 
220
- <div class="content"><div class='highlight'><pre> file = path.split(<span class="string">'/'</span>).last
220
+ <div class="content"><div class='highlight'><pre> file = path.split(<span class="hljs-string">'/'</span>).last
221
221
 
222
- message = <span class="string">"&lt;span style=\"color:green\"&gt;Files from the envelope were downloaded to server's local folder. You can check them &lt;a href=\"/downloads/<span class="subst">#{file}</span>\"&gt;here&lt;/a&gt;&lt;/span&gt;"</span>
223
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
222
+ message = <span class="hljs-string">"&lt;span style=\"color:green\"&gt;Files from the envelope were downloaded to server's local folder. You can check them &lt;a href=\"/downloads/<span class="hljs-subst">#{file}</span>\"&gt;here&lt;/a&gt;&lt;/span&gt;"</span>
223
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
224
224
  err = e.message
225
- <span class="keyword">end</span></pre></div></div>
225
+ <span class="hljs-keyword">end</span></pre></div></div>
226
226
 
227
227
  </li>
228
228
 
@@ -237,8 +237,8 @@
237
237
 
238
238
  </div>
239
239
 
240
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample36</span>, <span class="symbol">:locals</span> =&gt; {<span class="symbol">:userId</span> =&gt; settings.client_id, <span class="symbol">:privateKey</span> =&gt; settings.private_key, <span class="symbol">:envelopeGuid</span> =&gt; settings.envelope, <span class="symbol">:message</span> =&gt; message, <span class="symbol">:err</span> =&gt; err}
241
- <span class="keyword">end</span></pre></div></div>
240
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample36</span>, <span class="hljs-symbol">:locals</span> =&gt; {<span class="hljs-symbol">:userId</span> =&gt; settings.client_id, <span class="hljs-symbol">:privateKey</span> =&gt; settings.private_key, <span class="hljs-symbol">:envelopeGuid</span> =&gt; settings.envelope, <span class="hljs-symbol">:message</span> =&gt; message, <span class="hljs-symbol">:err</span> =&gt; err}
241
+ <span class="hljs-keyword">end</span></pre></div></div>
242
242
 
243
243
  </li>
244
244
 
@@ -27,13 +27,13 @@
27
27
  <div class="pilwrap ">
28
28
  <a class="pilcrow" href="#section-1">&#182;</a>
29
29
  </div>
30
- <p>Route the handler url &quot;/sample37&quot;</p>
30
+ <p>Route the handler url “/sample37”</p>
31
31
 
32
32
  </div>
33
33
 
34
- <div class="content"><div class='highlight'><pre>get <span class="string">'/sample37'</span> <span class="keyword">do</span>
35
- haml <span class="symbol">:sample37</span>
36
- <span class="keyword">end</span></pre></div></div>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-37-how-to-create-envelop-and-download-signed-document-when-envelop-was-signed-using-callback'</span> <span class="hljs-keyword">do</span>
35
+ haml <span class="hljs-symbol">:sample37</span>
36
+ <span class="hljs-keyword">end</span></pre></div></div>
37
37
 
38
38
  </li>
39
39
 
@@ -57,14 +57,14 @@
57
57
  <div class="pilwrap ">
58
58
  <a class="pilcrow" href="#section-3">&#182;</a>
59
59
  </div>
60
- <p>Route the handler url &quot;/sample37/signature_callback&quot;. The block function for callback with server</p>
60
+ <p>Route the handler url “/sample37/signature_callback”. The block function for callback with server</p>
61
61
 
62
62
  </div>
63
63
 
64
- <div class="content"><div class='highlight'><pre>post <span class="string">'/sample37/signature_callback'</span> <span class="keyword">do</span>
65
- <span class="keyword">unless</span> <span class="constant">File</span>.directory?(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads"</span>)
66
- <span class="keyword">return</span> <span class="string">'Directory was not found.'</span>
67
- <span class="keyword">end</span></pre></div></div>
64
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample37/signature_callback'</span> <span class="hljs-keyword">do</span>
65
+ <span class="hljs-keyword">unless</span> <span class="hljs-constant">File</span>.directory?(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/downloads"</span>)
66
+ <span class="hljs-keyword">return</span> <span class="hljs-string">'Directory was not found.'</span>
67
+ <span class="hljs-keyword">end</span></pre></div></div>
68
68
 
69
69
  </li>
70
70
 
@@ -79,9 +79,9 @@
79
79
 
80
80
  </div>
81
81
 
82
- <div class="content"><div class='highlight'><pre> name = <span class="keyword">nil</span>
82
+ <div class="content"><div class='highlight'><pre> name = <span class="hljs-keyword">nil</span>
83
83
 
84
- i = <span class="number">0</span></pre></div></div>
84
+ i = <span class="hljs-number">0</span></pre></div></div>
85
85
 
86
86
  </li>
87
87
 
@@ -96,17 +96,17 @@
96
96
 
97
97
  </div>
98
98
 
99
- <div class="content"><div class='highlight'><pre> <span class="keyword">while</span> i&lt;<span class="number">10</span> <span class="keyword">do</span>
100
- sleep(<span class="number">5</span>)
101
- <span class="constant">Dir</span>.entries(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads"</span>).each <span class="keyword">do</span> |file|
102
- name = file <span class="keyword">if</span> file != <span class="string">'.'</span> &amp;&amp; file != <span class="string">'..'</span>
103
- <span class="keyword">end</span>
104
- <span class="keyword">break</span> <span class="keyword">if</span> name
105
- i += <span class="number">1</span>
106
- <span class="keyword">end</span>
99
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">while</span> i&lt;<span class="hljs-number">10</span> <span class="hljs-keyword">do</span>
100
+ sleep(<span class="hljs-number">5</span>)
101
+ <span class="hljs-constant">Dir</span>.entries(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/downloads"</span>).each <span class="hljs-keyword">do</span> |file|
102
+ name = file <span class="hljs-keyword">if</span> file != <span class="hljs-string">'.'</span> &amp;&amp; file != <span class="hljs-string">'..'</span>
103
+ <span class="hljs-keyword">end</span>
104
+ <span class="hljs-keyword">break</span> <span class="hljs-keyword">if</span> name
105
+ i += <span class="hljs-number">1</span>
106
+ <span class="hljs-keyword">end</span>
107
107
 
108
108
  name
109
- <span class="keyword">end</span></pre></div></div>
109
+ <span class="hljs-keyword">end</span></pre></div></div>
110
110
 
111
111
  </li>
112
112
 
@@ -117,11 +117,11 @@
117
117
  <div class="pilwrap ">
118
118
  <a class="pilcrow" href="#section-6">&#182;</a>
119
119
  </div>
120
- <p>Route the handler url &quot;/sample37/downloads&quot;</p>
120
+ <p>Route the handler url “/sample37/downloads”</p>
121
121
 
122
122
  </div>
123
123
 
124
- <div class="content"><div class='highlight'><pre>get <span class="string">'/sample37/downloads/:filename'</span> <span class="keyword">do</span> |filename|</pre></div></div>
124
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample37/downloads/:filename'</span> <span class="hljs-keyword">do</span> |filename|</pre></div></div>
125
125
 
126
126
  </li>
127
127
 
@@ -136,8 +136,8 @@
136
136
 
137
137
  </div>
138
138
 
139
- <div class="content"><div class='highlight'><pre> send_file <span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads/<span class="subst">#{filename}</span>"</span>, <span class="symbol">:filename</span> =&gt; filename, <span class="symbol">:type</span> =&gt; <span class="string">'Application/octet-stream'</span>
140
- <span class="keyword">end</span></pre></div></div>
139
+ <div class="content"><div class='highlight'><pre> send_file <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/downloads/<span class="hljs-subst">#{filename}</span>"</span>, <span class="hljs-symbol">:filename</span> =&gt; filename, <span class="hljs-symbol">:type</span> =&gt; <span class="hljs-string">'Application/octet-stream'</span>
140
+ <span class="hljs-keyword">end</span></pre></div></div>
141
141
 
142
142
  </li>
143
143
 
@@ -148,11 +148,11 @@
148
148
  <div class="pilwrap ">
149
149
  <a class="pilcrow" href="#section-8">&#182;</a>
150
150
  </div>
151
- <p>Route the handler url &quot;/sample37&quot;. The function block creates new envelope</p>
151
+ <p>Route the handler url “/sample37”. The function block creates new envelope</p>
152
152
 
153
153
  </div>
154
154
 
155
- <div class="content"><div class='highlight'><pre>post <span class="string">'/sample37'</span> <span class="keyword">do</span></pre></div></div>
155
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-37-how-to-create-envelop-and-download-signed-document-when-envelop-was-signed-using-callback'</span> <span class="hljs-keyword">do</span></pre></div></div>
156
156
 
157
157
  </li>
158
158
 
@@ -167,16 +167,16 @@
167
167
 
168
168
  </div>
169
169
 
170
- <div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
171
- set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
172
- set <span class="symbol">:email</span>, params[<span class="symbol">:email</span>]
173
- set <span class="symbol">:name</span>, params[<span class="symbol">:name</span>]
174
- set <span class="symbol">:lastName</span>, params[<span class="symbol">:lastName</span>]
175
- set <span class="symbol">:fileId</span>, params[<span class="symbol">:fileId</span>]
176
- set <span class="symbol">:callback</span>, params[<span class="symbol">:callback</span>]
177
- set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
178
- set <span class="symbol">:url</span>, params[<span class="symbol">:url</span>]
179
- set <span class="symbol">:source</span>, params[<span class="symbol">:source</span>]</pre></div></div>
170
+ <div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
171
+ set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
172
+ set <span class="hljs-symbol">:email</span>, params[<span class="hljs-symbol">:email</span>]
173
+ set <span class="hljs-symbol">:name</span>, params[<span class="hljs-symbol">:name</span>]
174
+ set <span class="hljs-symbol">:lastName</span>, params[<span class="hljs-symbol">:lastName</span>]
175
+ set <span class="hljs-symbol">:fileId</span>, params[<span class="hljs-symbol">:fileId</span>]
176
+ set <span class="hljs-symbol">:callback</span>, params[<span class="hljs-symbol">:callback</span>]
177
+ set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
178
+ set <span class="hljs-symbol">:url</span>, params[<span class="hljs-symbol">:url</span>]
179
+ set <span class="hljs-symbol">:source</span>, params[<span class="hljs-symbol">:source</span>]</pre></div></div>
180
180
 
181
181
  </li>
182
182
 
@@ -191,7 +191,7 @@
191
191
 
192
192
  </div>
193
193
 
194
- <div class="content"><div class='highlight'><pre> downloads_path = <span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads"</span></pre></div></div>
194
+ <div class="content"><div class='highlight'><pre> downloads_path = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/downloads"</span></pre></div></div>
195
195
 
196
196
  </li>
197
197
 
@@ -206,13 +206,13 @@
206
206
 
207
207
  </div>
208
208
 
209
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> <span class="constant">File</span>.directory?(downloads_path)
210
- <span class="constant">Dir</span>.foreach(downloads_path) { |f| fn = <span class="constant">File</span>.join(downloads_path, f); <span class="constant">File</span>.delete(fn) <span class="keyword">if</span> f != <span class="string">'.'</span> &amp;&amp; f != <span class="string">'..'</span> }
211
- <span class="keyword">else</span>
212
- <span class="constant">Dir::</span>mkdir(downloads_path)
213
- <span class="keyword">end</span>
209
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-constant">File</span>.directory?(downloads_path)
210
+ <span class="hljs-constant">Dir</span>.foreach(downloads_path) { |f| fn = <span class="hljs-constant">File</span>.join(downloads_path, f); <span class="hljs-constant">File</span>.delete(fn) <span class="hljs-keyword">if</span> f != <span class="hljs-string">'.'</span> &amp;&amp; f != <span class="hljs-string">'..'</span> }
211
+ <span class="hljs-keyword">else</span>
212
+ <span class="hljs-constant">Dir::</span>mkdir(downloads_path)
213
+ <span class="hljs-keyword">end</span>
214
214
 
215
- <span class="keyword">begin</span></pre></div></div>
215
+ <span class="hljs-keyword">begin</span></pre></div></div>
216
216
 
217
217
  </li>
218
218
 
@@ -227,7 +227,7 @@
227
227
 
228
228
  </div>
229
229
 
230
- <div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty? <span class="keyword">or</span> settings.email.empty? <span class="keyword">or</span> settings.name.empty? <span class="keyword">or</span> settings.lastName.empty?</pre></div></div>
230
+ <div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty? <span class="hljs-keyword">or</span> settings.email.empty? <span class="hljs-keyword">or</span> settings.name.empty? <span class="hljs-keyword">or</span> settings.lastName.empty?</pre></div></div>
231
231
 
232
232
  </li>
233
233
 
@@ -242,13 +242,13 @@
242
242
 
243
243
  </div>
244
244
 
245
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
246
- base_path = <span class="string">'https://api.groupdocs.com'</span>
247
- <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
248
- base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
249
- <span class="keyword">else</span>
245
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
246
+ base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
247
+ <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
248
+ base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
249
+ <span class="hljs-keyword">else</span>
250
250
  base_path = settings.base_path
251
- <span class="keyword">end</span></pre></div></div>
251
+ <span class="hljs-keyword">end</span></pre></div></div>
252
252
 
253
253
  </li>
254
254
 
@@ -263,7 +263,7 @@
263
263
 
264
264
  </div>
265
265
 
266
- <div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
266
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
267
267
  groupdocs.client_id = settings.client_id
268
268
  groupdocs.private_key = settings.private_key</pre></div></div>
269
269
 
@@ -280,8 +280,8 @@
280
280
 
281
281
  </div>
282
282
 
283
- <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
284
- <span class="keyword">end</span></pre></div></div>
283
+ <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
284
+ <span class="hljs-keyword">end</span></pre></div></div>
285
285
 
286
286
  </li>
287
287
 
@@ -296,8 +296,8 @@
296
296
 
297
297
  </div>
298
298
 
299
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.callback
300
- out_file = <span class="constant">File</span>.new(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/user_info.txt"</span>, <span class="string">'w'</span>)</pre></div></div>
299
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.callback
300
+ out_file = <span class="hljs-constant">File</span>.new(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/user_info.txt"</span>, <span class="hljs-string">'w'</span>)</pre></div></div>
301
301
 
302
302
  </li>
303
303
 
@@ -312,12 +312,12 @@
312
312
 
313
313
  </div>
314
314
 
315
- <div class="content"><div class='highlight'><pre> out_file.write(<span class="string">"<span class="subst">#{settings.client_id}</span> "</span>)
316
- out_file.write(<span class="string">"<span class="subst">#{settings.private_key}</span>"</span>)
315
+ <div class="content"><div class='highlight'><pre> out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.client_id}</span> "</span>)
316
+ out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.private_key}</span>"</span>)
317
317
  out_file.close
318
- <span class="keyword">end</span>
318
+ <span class="hljs-keyword">end</span>
319
319
 
320
- file = <span class="keyword">nil</span></pre></div></div>
320
+ file = <span class="hljs-keyword">nil</span></pre></div></div>
321
321
 
322
322
  </li>
323
323
 
@@ -332,8 +332,8 @@
332
332
 
333
333
  </div>
334
334
 
335
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> settings.source
336
- <span class="keyword">when</span> <span class="string">'guid'</span></pre></div></div>
335
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.source
336
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'guid'</span></pre></div></div>
337
337
 
338
338
  </li>
339
339
 
@@ -348,9 +348,9 @@
348
348
 
349
349
  </div>
350
350
 
351
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.new({<span class="symbol">:guid</span> =&gt; settings.fileId}).to_document.metadata!()
351
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.new({<span class="hljs-symbol">:guid</span> =&gt; settings.fileId}).to_document.metadata!()
352
352
  file = file.last_view.document.file.to_document
353
- <span class="keyword">when</span> <span class="string">'local'</span></pre></div></div>
353
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'local'</span></pre></div></div>
354
354
 
355
355
  </li>
356
356
 
@@ -365,7 +365,7 @@
365
365
 
366
366
  </div>
367
367
 
368
- <div class="content"><div class='highlight'><pre> file_path = <span class="string">"<span class="subst">#{<span class="constant">Dir</span>.tmpdir}</span>/<span class="subst">#{params[<span class="symbol">:file</span>][<span class="symbol">:filename</span>]}</span>"</span></pre></div></div>
368
+ <div class="content"><div class='highlight'><pre> file_path = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">Dir</span>.tmpdir}</span>/<span class="hljs-subst">#{params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:filename</span>]}</span>"</span></pre></div></div>
369
369
 
370
370
  </li>
371
371
 
@@ -380,7 +380,7 @@
380
380
 
381
381
  </div>
382
382
 
383
- <div class="content"><div class='highlight'><pre> <span class="constant">File</span>.open(file_path, <span class="string">'wb'</span>) { |f| f.write(params[<span class="symbol">:file</span>][<span class="symbol">:tempfile</span>].read) }</pre></div></div>
383
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">File</span>.open(file_path, <span class="hljs-string">'wb'</span>) { |f| f.write(params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:tempfile</span>].read) }</pre></div></div>
384
384
 
385
385
  </li>
386
386
 
@@ -395,9 +395,9 @@
395
395
 
396
396
  </div>
397
397
 
398
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload!(file_path).to_document
398
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(file_path).to_document
399
399
 
400
- <span class="keyword">when</span> <span class="string">'url'</span></pre></div></div>
400
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'url'</span></pre></div></div>
401
401
 
402
402
  </li>
403
403
 
@@ -412,10 +412,10 @@
412
412
 
413
413
  </div>
414
414
 
415
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload_web!(settings.url).to_document
416
- <span class="keyword">else</span>
417
- raise <span class="string">'Wrong GUID source.'</span>
418
- <span class="keyword">end</span>
415
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url).to_document
416
+ <span class="hljs-keyword">else</span>
417
+ raise <span class="hljs-string">'Wrong GUID source.'</span>
418
+ <span class="hljs-keyword">end</span>
419
419
 
420
420
  name = file.name</pre></div></div>
421
421
 
@@ -432,9 +432,9 @@
432
432
 
433
433
  </div>
434
434
 
435
- <div class="content"><div class='highlight'><pre> envelope = <span class="constant">GroupDocs::Signature::Envelope</span>.new
435
+ <div class="content"><div class='highlight'><pre> envelope = <span class="hljs-constant">GroupDocs::Signature::Envelope</span>.new
436
436
  envelope.name = file.name
437
- envelope.email_subject = <span class="string">'Sing this!'</span>
437
+ envelope.email_subject = <span class="hljs-string">'Sing this!'</span>
438
438
  envelope.create!({})</pre></div></div>
439
439
 
440
440
  </li>
@@ -465,7 +465,7 @@
465
465
 
466
466
  </div>
467
467
 
468
- <div class="content"><div class='highlight'><pre> roles = <span class="constant">GroupDocs::Signature::Role</span>.get!({})</pre></div></div>
468
+ <div class="content"><div class='highlight'><pre> roles = <span class="hljs-constant">GroupDocs::Signature::Role</span>.get!({})</pre></div></div>
469
469
 
470
470
  </li>
471
471
 
@@ -480,11 +480,11 @@
480
480
 
481
481
  </div>
482
482
 
483
- <div class="content"><div class='highlight'><pre> recipient = <span class="constant">GroupDocs::Signature::Recipient</span>.new
483
+ <div class="content"><div class='highlight'><pre> recipient = <span class="hljs-constant">GroupDocs::Signature::Recipient</span>.new
484
484
  recipient.email = settings.email
485
485
  recipient.first_name = settings.name
486
486
  recipient.last_name = settings.lastName
487
- recipient.role_id = roles.detect { |role| role.name == <span class="string">'Signer'</span> }.id</pre></div></div>
487
+ recipient.role_id = roles.detect { |role| role.name == <span class="hljs-string">'Signer'</span> }.id</pre></div></div>
488
488
 
489
489
  </li>
490
490
 
@@ -529,9 +529,9 @@
529
529
 
530
530
  </div>
531
531
 
532
- <div class="content"><div class='highlight'><pre> field = <span class="constant">GroupDocs::Signature::Field</span>.get!.detect { |f| f.type == <span class="symbol">:signature</span> }
533
- field.location = {<span class="symbol">:location_x</span> =&gt; <span class="number">0</span>.<span class="number">15</span>, <span class="symbol">:location_y</span> =&gt; <span class="number">0</span>.<span class="number">73</span>, <span class="symbol">:location_w</span> =&gt; <span class="number">150</span>, <span class="symbol">:location_h</span> =&gt; <span class="number">50</span>, <span class="symbol">:page</span> =&gt; <span class="number">1</span>}
534
- field.name = <span class="string">'EMPLOYEE SIGNATURE'</span></pre></div></div>
532
+ <div class="content"><div class='highlight'><pre> field = <span class="hljs-constant">GroupDocs::Signature::Field</span>.get!.detect { |f| f.type == <span class="hljs-symbol">:signature</span> }
533
+ field.location = {<span class="hljs-symbol">:location_x</span> =&gt; <span class="hljs-number">0</span>.<span class="hljs-number">15</span>, <span class="hljs-symbol">:location_y</span> =&gt; <span class="hljs-number">0</span>.<span class="hljs-number">73</span>, <span class="hljs-symbol">:location_w</span> =&gt; <span class="hljs-number">150</span>, <span class="hljs-symbol">:location_h</span> =&gt; <span class="hljs-number">50</span>, <span class="hljs-symbol">:page</span> =&gt; <span class="hljs-number">1</span>}
534
+ field.name = <span class="hljs-string">'EMPLOYEE SIGNATURE'</span></pre></div></div>
535
535
 
536
536
  </li>
537
537
 
@@ -546,7 +546,7 @@
546
546
 
547
547
  </div>
548
548
 
549
- <div class="content"><div class='highlight'><pre> envelope.add_field!(field, document[<span class="number">0</span>], recipient)</pre></div></div>
549
+ <div class="content"><div class='highlight'><pre> envelope.add_field!(field, document[<span class="hljs-number">0</span>], recipient)</pre></div></div>
550
550
 
551
551
  </li>
552
552
 
@@ -561,7 +561,7 @@
561
561
 
562
562
  </div>
563
563
 
564
- <div class="content"><div class='highlight'><pre> envelope.send!({<span class="symbol">:callbackUrl</span> =&gt; settings.callback})</pre></div></div>
564
+ <div class="content"><div class='highlight'><pre> envelope.send!({<span class="hljs-symbol">:callbackUrl</span> =&gt; settings.callback})</pre></div></div>
565
565
 
566
566
  </li>
567
567
 
@@ -576,8 +576,8 @@
576
576
 
577
577
  </div>
578
578
 
579
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.callback
580
- out_file = <span class="constant">File</span>.new(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/user_info.txt"</span>, <span class="string">'w'</span>)</pre></div></div>
579
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.callback
580
+ out_file = <span class="hljs-constant">File</span>.new(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/user_info.txt"</span>, <span class="hljs-string">'w'</span>)</pre></div></div>
581
581
 
582
582
  </li>
583
583
 
@@ -592,11 +592,11 @@
592
592
 
593
593
  </div>
594
594
 
595
- <div class="content"><div class='highlight'><pre> out_file.write(<span class="string">"<span class="subst">#{settings.client_id}</span> "</span>)
596
- out_file.write(<span class="string">"<span class="subst">#{settings.private_key}</span>"</span>)
597
- out_file.write(<span class="string">"<span class="subst">#{envelope.id}</span>"</span>)
595
+ <div class="content"><div class='highlight'><pre> out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.client_id}</span> "</span>)
596
+ out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.private_key}</span>"</span>)
597
+ out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{envelope.id}</span>"</span>)
598
598
  out_file.close
599
- <span class="keyword">end</span></pre></div></div>
599
+ <span class="hljs-keyword">end</span></pre></div></div>
600
600
 
601
601
  </li>
602
602
 
@@ -611,7 +611,7 @@
611
611
 
612
612
  </div>
613
613
 
614
- <div class="content"><div class='highlight'><pre> iframe = <span class="string">"/signature2/signembed/<span class="subst">#{envelope.id}</span>/<span class="subst">#{recipient.id}</span>"</span></pre></div></div>
614
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/signature2/signembed/<span class="hljs-subst">#{envelope.id}</span>/<span class="hljs-subst">#{recipient.id}</span>"</span></pre></div></div>
615
615
 
616
616
  </li>
617
617
 
@@ -626,7 +626,7 @@
626
626
 
627
627
  </div>
628
628
 
629
- <div class="content"><div class='highlight'><pre> url = <span class="constant">GroupDocs::Api::Request</span>.new(<span class="symbol">:path</span> =&gt; iframe).prepare_and_sign_url</pre></div></div>
629
+ <div class="content"><div class='highlight'><pre> url = <span class="hljs-constant">GroupDocs::Api::Request</span>.new(<span class="hljs-symbol">:path</span> =&gt; iframe).prepare_and_sign_url</pre></div></div>
630
630
 
631
631
  </li>
632
632
 
@@ -641,14 +641,14 @@
641
641
 
642
642
  </div>
643
643
 
644
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
645
- <span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
646
- iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
647
- <span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
648
- iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
649
- <span class="keyword">else</span>
650
- iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
651
- <span class="keyword">end</span></pre></div></div>
644
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
645
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
646
+ iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
647
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
648
+ iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
649
+ <span class="hljs-keyword">else</span>
650
+ iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
651
+ <span class="hljs-keyword">end</span></pre></div></div>
652
652
 
653
653
  </li>
654
654
 
@@ -663,12 +663,12 @@
663
663
 
664
664
  </div>
665
665
 
666
- <div class="content"><div class='highlight'><pre> iframe = <span class="string">"&lt;iframe id='downloadframe' src='<span class="subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</span>
666
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"&lt;iframe id='downloadframe' src='<span class="hljs-subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</span>
667
667
 
668
- message = <span class="string">"&lt;p&gt;File was uploaded to GroupDocs. Here you can see your &lt;strong&gt;<span class="subst">#{name}</span>&lt;/strong&gt; file in the GroupDocs Embedded Viewer.&lt;/p&gt;"</span>
669
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
668
+ message = <span class="hljs-string">"&lt;p&gt;File was uploaded to GroupDocs. Here you can see your &lt;strong&gt;<span class="hljs-subst">#{name}</span>&lt;/strong&gt; file in the GroupDocs Embedded Viewer.&lt;/p&gt;"</span>
669
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
670
670
  err = e.message
671
- <span class="keyword">end</span></pre></div></div>
671
+ <span class="hljs-keyword">end</span></pre></div></div>
672
672
 
673
673
  </li>
674
674
 
@@ -683,8 +683,8 @@
683
683
 
684
684
  </div>
685
685
 
686
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample37</span>, <span class="symbol">:locals</span> =&gt; {<span class="symbol">:userId</span> =&gt; settings.client_id, <span class="symbol">:privateKey</span> =&gt; settings.private_key, <span class="symbol">:email</span> =&gt; settings.email, <span class="symbol">:name</span> =&gt; settings.name, <span class="symbol">:lastName</span> =&gt; settings.lastName, <span class="symbol">:iframe</span> =&gt; iframe, <span class="symbol">:massage</span> =&gt; message, <span class="symbol">:err</span> =&gt; err, <span class="symbol">:callback</span> =&gt; settings.callback,}
687
- <span class="keyword">end</span></pre></div></div>
686
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample37</span>, <span class="hljs-symbol">:locals</span> =&gt; {<span class="hljs-symbol">:userId</span> =&gt; settings.client_id, <span class="hljs-symbol">:privateKey</span> =&gt; settings.private_key, <span class="hljs-symbol">:email</span> =&gt; settings.email, <span class="hljs-symbol">:name</span> =&gt; settings.name, <span class="hljs-symbol">:lastName</span> =&gt; settings.lastName, <span class="hljs-symbol">:iframe</span> =&gt; iframe, <span class="hljs-symbol">:massage</span> =&gt; message, <span class="hljs-symbol">:err</span> =&gt; err, <span class="hljs-symbol">:callback</span> =&gt; settings.callback,}
687
+ <span class="hljs-keyword">end</span></pre></div></div>
688
688
 
689
689
  </li>
690
690