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">'/sample38'</span> <span class="keyword">do</span>
35
- haml <span class="symbol">:sample38</span>
36
- <span class="keyword">end</span></pre></div></div>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-38-how-to-create-new-user-and-add-him-as-collaborator-to-doc-with-annotations'</span> <span class="hljs-keyword">do</span>
35
+ haml <span class="hljs-symbol">:sample38</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">'/sample38'</span> <span class="keyword">do</span></pre></div></div>
51
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-38-how-to-create-new-user-and-add-him-as-collaborator-to-doc-with-annotations'</span> <span class="hljs-keyword">do</span></pre></div></div>
52
52
 
53
53
  </li>
54
54
 
@@ -63,15 +63,15 @@
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">:email</span>, params[<span class="symbol">:email</span>]
69
- set <span class="symbol">:source</span>, params[<span class="symbol">:source</span>]
70
- set <span class="symbol">:file_id</span>, params[<span class="symbol">:fileId</span>]
71
- set <span class="symbol">:url</span>, params[<span class="symbol">:url</span>]
72
- set <span class="symbol">:first_name</span>, params[<span class="symbol">:firstName</span>]
73
- set <span class="symbol">:last_name</span>, params[<span class="symbol">:lastName</span>]
74
- 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">:email</span>, params[<span class="hljs-symbol">:email</span>]
69
+ set <span class="hljs-symbol">:source</span>, params[<span class="hljs-symbol">:source</span>]
70
+ set <span class="hljs-symbol">:file_id</span>, params[<span class="hljs-symbol">:fileId</span>]
71
+ set <span class="hljs-symbol">:url</span>, params[<span class="hljs-symbol">:url</span>]
72
+ set <span class="hljs-symbol">:first_name</span>, params[<span class="hljs-symbol">:firstName</span>]
73
+ set <span class="hljs-symbol">:last_name</span>, params[<span class="hljs-symbol">:lastName</span>]
74
+ set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]</pre></div></div>
75
75
 
76
76
  </li>
77
77
 
@@ -86,7 +86,7 @@
86
86
 
87
87
  </div>
88
88
 
89
- <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>
89
+ <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>
90
90
 
91
91
  </li>
92
92
 
@@ -101,13 +101,13 @@
101
101
 
102
102
  </div>
103
103
 
104
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> <span class="constant">File</span>.directory?(downloads_path)
105
- <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> }
106
- <span class="keyword">else</span>
107
- <span class="constant">Dir::</span>mkdir(downloads_path)
108
- <span class="keyword">end</span>
104
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-constant">File</span>.directory?(downloads_path)
105
+ <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> }
106
+ <span class="hljs-keyword">else</span>
107
+ <span class="hljs-constant">Dir::</span>mkdir(downloads_path)
108
+ <span class="hljs-keyword">end</span>
109
109
 
110
- <span class="keyword">begin</span></pre></div></div>
110
+ <span class="hljs-keyword">begin</span></pre></div></div>
111
111
 
112
112
  </li>
113
113
 
@@ -122,7 +122,7 @@
122
122
 
123
123
  </div>
124
124
 
125
- <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.first_name.empty? <span class="keyword">or</span> settings.last_name.empty?</pre></div></div>
125
+ <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.first_name.empty? <span class="hljs-keyword">or</span> settings.last_name.empty?</pre></div></div>
126
126
 
127
127
  </li>
128
128
 
@@ -137,13 +137,13 @@
137
137
 
138
138
  </div>
139
139
 
140
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
141
- base_path = <span class="string">'https://api.groupdocs.com'</span>
142
- <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
143
- base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
144
- <span class="keyword">else</span>
140
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
141
+ base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
142
+ <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
143
+ base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
144
+ <span class="hljs-keyword">else</span>
145
145
  base_path = settings.base_path
146
- <span class="keyword">end</span></pre></div></div>
146
+ <span class="hljs-keyword">end</span></pre></div></div>
147
147
 
148
148
  </li>
149
149
 
@@ -158,7 +158,7 @@
158
158
 
159
159
  </div>
160
160
 
161
- <div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
161
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
162
162
  groupdocs.client_id = settings.client_id
163
163
  groupdocs.private_key = settings.private_key</pre></div></div>
164
164
 
@@ -175,9 +175,9 @@
175
175
 
176
176
  </div>
177
177
 
178
- <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
179
- <span class="keyword">end</span>
180
- file = <span class="keyword">nil</span></pre></div></div>
178
+ <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
179
+ <span class="hljs-keyword">end</span>
180
+ file = <span class="hljs-keyword">nil</span></pre></div></div>
181
181
 
182
182
  </li>
183
183
 
@@ -192,8 +192,8 @@
192
192
 
193
193
  </div>
194
194
 
195
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> settings.source
196
- <span class="keyword">when</span> <span class="string">'guid'</span></pre></div></div>
195
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.source
196
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'guid'</span></pre></div></div>
197
197
 
198
198
  </li>
199
199
 
@@ -208,8 +208,8 @@
208
208
 
209
209
  </div>
210
210
 
211
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.new({<span class="symbol">:guid</span> =&gt; settings.file_id})
212
- <span class="keyword">when</span> <span class="string">'local'</span></pre></div></div>
211
+ <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.file_id})
212
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'local'</span></pre></div></div>
213
213
 
214
214
  </li>
215
215
 
@@ -224,7 +224,7 @@
224
224
 
225
225
  </div>
226
226
 
227
- <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>
227
+ <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>
228
228
 
229
229
  </li>
230
230
 
@@ -239,7 +239,7 @@
239
239
 
240
240
  </div>
241
241
 
242
- <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>
242
+ <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>
243
243
 
244
244
  </li>
245
245
 
@@ -254,8 +254,8 @@
254
254
 
255
255
  </div>
256
256
 
257
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload!(file_path, {})
258
- <span class="keyword">when</span> <span class="string">'url'</span></pre></div></div>
257
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(file_path, {})
258
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'url'</span></pre></div></div>
259
259
 
260
260
  </li>
261
261
 
@@ -270,10 +270,10 @@
270
270
 
271
271
  </div>
272
272
 
273
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
274
- <span class="keyword">else</span>
275
- raise <span class="string">'Wrong GUID source.'</span>
276
- <span class="keyword">end</span></pre></div></div>
273
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
274
+ <span class="hljs-keyword">else</span>
275
+ raise <span class="hljs-string">'Wrong GUID source.'</span>
276
+ <span class="hljs-keyword">end</span></pre></div></div>
277
277
 
278
278
  </li>
279
279
 
@@ -288,10 +288,10 @@
288
288
 
289
289
  </div>
290
290
 
291
- <div class="content"><div class='highlight'><pre> user = <span class="constant">GroupDocs::User</span>.get!
292
- userGuid = <span class="keyword">nil</span>
291
+ <div class="content"><div class='highlight'><pre> user = <span class="hljs-constant">GroupDocs::User</span>.get!
292
+ userGuid = <span class="hljs-keyword">nil</span>
293
293
  users = user.users!
294
- users.map <span class="keyword">do</span> |user|
294
+ users.map <span class="hljs-keyword">do</span> |user|
295
295
  email = user.primary_email</pre></div></div>
296
296
 
297
297
  </li>
@@ -307,7 +307,7 @@
307
307
 
308
308
  </div>
309
309
 
310
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.email == email</pre></div></div>
310
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.email == email</pre></div></div>
311
311
 
312
312
  </li>
313
313
 
@@ -323,9 +323,9 @@
323
323
  </div>
324
324
 
325
325
  <div class="content"><div class='highlight'><pre> userGuid = user.guid
326
- <span class="keyword">break</span>
327
- <span class="keyword">end</span>
328
- <span class="keyword">end</span></pre></div></div>
326
+ <span class="hljs-keyword">break</span>
327
+ <span class="hljs-keyword">end</span>
328
+ <span class="hljs-keyword">end</span></pre></div></div>
329
329
 
330
330
  </li>
331
331
 
@@ -340,8 +340,8 @@
340
340
 
341
341
  </div>
342
342
 
343
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> userGuid.<span class="keyword">nil</span>?
344
- userNew = <span class="constant">GroupDocs::User</span>.new</pre></div></div>
343
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> userGuid.<span class="hljs-keyword">nil</span>?
344
+ userNew = <span class="hljs-constant">GroupDocs::User</span>.new</pre></div></div>
345
345
 
346
346
  </li>
347
347
 
@@ -416,7 +416,7 @@
416
416
 
417
417
  </div>
418
418
 
419
- <div class="content"><div class='highlight'><pre> userNew.roles = [{<span class="symbol">:id</span> =&gt; <span class="string">'3'</span>, <span class="symbol">:name</span> =&gt; <span class="string">'User'</span>}]</pre></div></div>
419
+ <div class="content"><div class='highlight'><pre> userNew.roles = [{<span class="hljs-symbol">:id</span> =&gt; <span class="hljs-string">'3'</span>, <span class="hljs-symbol">:name</span> =&gt; <span class="hljs-string">'User'</span>}]</pre></div></div>
420
420
 
421
421
  </li>
422
422
 
@@ -431,7 +431,7 @@
431
431
 
432
432
  </div>
433
433
 
434
- <div class="content"><div class='highlight'><pre> new_user = <span class="constant">GroupDocs::User</span>.update_account!(userNew)
434
+ <div class="content"><div class='highlight'><pre> new_user = <span class="hljs-constant">GroupDocs::User</span>.update_account!(userNew)
435
435
 
436
436
  guid = new_user.guid</pre></div></div>
437
437
 
@@ -466,12 +466,12 @@
466
466
 
467
467
  <div class="content"><div class='highlight'><pre> addCollaborator = document.set_collaborators!(emails)
468
468
  getCollaborator = document.collaborators!
469
- getCollaborator.each <span class="keyword">do</span> |reviewer|
470
- reviewer.access_rights = <span class="string">%w(view)</span>
471
- <span class="keyword">end</span>
469
+ getCollaborator.each <span class="hljs-keyword">do</span> |reviewer|
470
+ reviewer.access_rights = <span class="hljs-string">%w(view)</span>
471
+ <span class="hljs-keyword">end</span>
472
472
  setReviewers = document.set_reviewers! getCollaborator
473
473
 
474
- <span class="keyword">if</span> setReviewers</pre></div></div>
474
+ <span class="hljs-keyword">if</span> setReviewers</pre></div></div>
475
475
 
476
476
  </li>
477
477
 
@@ -482,11 +482,11 @@
482
482
  <div class="pilwrap ">
483
483
  <a class="pilcrow" href="#section-28">&#182;</a>
484
484
  </div>
485
- <p>Add user GUID as &quot;uid&quot; parameter to the iframe URL</p>
485
+ <p>Add user GUID as uid parameter to the iframe URL</p>
486
486
 
487
487
  </div>
488
488
 
489
- <div class="content"><div class='highlight'><pre> iframe = <span class="string">"/document-annotation2/embed/<span class="subst">#{file.guid}</span>?&amp;uid=<span class="subst">#{guid}</span>&amp;download=true"</span></pre></div></div>
489
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-annotation2/embed/<span class="hljs-subst">#{file.guid}</span>?&amp;uid=<span class="hljs-subst">#{guid}</span>&amp;download=true"</span></pre></div></div>
490
490
 
491
491
  </li>
492
492
 
@@ -501,7 +501,7 @@
501
501
 
502
502
  </div>
503
503
 
504
- <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>
504
+ <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>
505
505
 
506
506
  </li>
507
507
 
@@ -516,22 +516,22 @@
516
516
 
517
517
  </div>
518
518
 
519
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
520
- <span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
521
- iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
522
- <span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
523
- iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
524
- <span class="keyword">else</span>
525
- iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
526
- <span class="keyword">end</span>
519
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
520
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
521
+ iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
522
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
523
+ iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
524
+ <span class="hljs-keyword">else</span>
525
+ iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
526
+ <span class="hljs-keyword">end</span>
527
527
 
528
- iframe = <span class="string">"&lt;iframe src='<span class="subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</span>
529
- <span class="keyword">end</span>
530
- <span class="keyword">end</span>
528
+ iframe = <span class="hljs-string">"&lt;iframe src='<span class="hljs-subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</span>
529
+ <span class="hljs-keyword">end</span>
530
+ <span class="hljs-keyword">end</span>
531
531
 
532
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
532
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
533
533
  err = e.message
534
- <span class="keyword">end</span></pre></div></div>
534
+ <span class="hljs-keyword">end</span></pre></div></div>
535
535
 
536
536
  </li>
537
537
 
@@ -546,8 +546,8 @@
546
546
 
547
547
  </div>
548
548
 
549
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample38</span>, <span class="symbol">:locals</span> =&gt; {<span class="symbol">:userId</span> =&gt; settings.client_id, <span class="symbol">:fileId</span> =&gt; settings.file_id, <span class="symbol">:privateKey</span> =&gt; settings.private_key, <span class="symbol">:iframe</span> =&gt; iframe, <span class="symbol">:email</span> =&gt; settings.email, <span class="symbol">:firstName</span> =&gt; settings.first_name, <span class="symbol">:lastName</span> =&gt; settings.last_name, <span class="symbol">:err</span> =&gt; err}
550
- <span class="keyword">end</span></pre></div></div>
549
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample38</span>, <span class="hljs-symbol">:locals</span> =&gt; {<span class="hljs-symbol">:userId</span> =&gt; settings.client_id, <span class="hljs-symbol">:fileId</span> =&gt; settings.file_id, <span class="hljs-symbol">:privateKey</span> =&gt; settings.private_key, <span class="hljs-symbol">:iframe</span> =&gt; iframe, <span class="hljs-symbol">:email</span> =&gt; settings.email, <span class="hljs-symbol">:firstName</span> =&gt; settings.first_name, <span class="hljs-symbol">:lastName</span> =&gt; settings.last_name, <span class="hljs-symbol">:err</span> =&gt; err}
550
+ <span class="hljs-keyword">end</span></pre></div></div>
551
551
 
552
552
  </li>
553
553
 
@@ -31,9 +31,9 @@
31
31
 
32
32
  </div>
33
33
 
34
- <div class="content"><div class='highlight'><pre>get <span class="string">'/sample39'</span> <span class="keyword">do</span>
35
- haml <span class="symbol">:sample39</span>
36
- <span class="keyword">end</span></pre></div></div>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-39-how-to-add-a-signature-to-a-document-and-re-direct-after-signing-with-groupdocs-widget'</span> <span class="hljs-keyword">do</span>
35
+ haml <span class="hljs-symbol">:sample39</span>
36
+ <span class="hljs-keyword">end</span></pre></div></div>
37
37
 
38
38
  </li>
39
39
 
@@ -48,9 +48,9 @@
48
48
 
49
49
  </div>
50
50
 
51
- <div class="content"><div class='highlight'><pre>get <span class="string">'/popup'</span> <span class="keyword">do</span>
52
- haml <span class="symbol">:popup</span>
53
- <span class="keyword">end</span></pre></div></div>
51
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/popup'</span> <span class="hljs-keyword">do</span>
52
+ haml <span class="hljs-symbol">:popup</span>
53
+ <span class="hljs-keyword">end</span></pre></div></div>
54
54
 
55
55
  </li>
56
56
 
@@ -65,8 +65,8 @@
65
65
 
66
66
  </div>
67
67
 
68
- <div class="content"><div class='highlight'><pre>post <span class="string">'/sample39/signature_callback'</span> <span class="keyword">do</span>
69
- <span class="keyword">begin</span></pre></div></div>
68
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample39/signature_callback'</span> <span class="hljs-keyword">do</span>
69
+ <span class="hljs-keyword">begin</span></pre></div></div>
70
70
 
71
71
  </li>
72
72
 
@@ -81,12 +81,12 @@
81
81
 
82
82
  </div>
83
83
 
84
- <div class="content"><div class='highlight'><pre> data = <span class="constant">JSON</span>.parse(request.body.read)
84
+ <div class="content"><div class='highlight'><pre> data = <span class="hljs-constant">JSON</span>.parse(request.body.read)
85
85
 
86
- raise <span class="string">'Empty params!'</span> <span class="keyword">if</span> data.empty?
87
- source_id = <span class="keyword">nil</span>
88
- client_id = <span class="keyword">nil</span>
89
- private_key = <span class="keyword">nil</span></pre></div></div>
86
+ raise <span class="hljs-string">'Empty params!'</span> <span class="hljs-keyword">if</span> data.empty?
87
+ source_id = <span class="hljs-keyword">nil</span>
88
+ client_id = <span class="hljs-keyword">nil</span>
89
+ private_key = <span class="hljs-keyword">nil</span></pre></div></div>
90
90
 
91
91
  </li>
92
92
 
@@ -101,11 +101,11 @@
101
101
 
102
102
  </div>
103
103
 
104
- <div class="content"><div class='highlight'><pre> data.each <span class="keyword">do</span> |key, value|
105
- <span class="keyword">if</span> key == <span class="string">'SourceId'</span>
104
+ <div class="content"><div class='highlight'><pre> data.each <span class="hljs-keyword">do</span> |key, value|
105
+ <span class="hljs-keyword">if</span> key == <span class="hljs-string">'SourceId'</span>
106
106
  source_id = value
107
- <span class="keyword">end</span>
108
- <span class="keyword">end</span></pre></div></div>
107
+ <span class="hljs-keyword">end</span>
108
+ <span class="hljs-keyword">end</span></pre></div></div>
109
109
 
110
110
  </li>
111
111
 
@@ -120,12 +120,12 @@
120
120
 
121
121
  </div>
122
122
 
123
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> <span class="constant">File</span>.exist?(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/user_info.txt"</span>)
124
- contents = <span class="constant">File</span>.read(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/user_info.txt"</span>)
125
- contents = contents.split(<span class="string">' '</span>)
123
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-constant">File</span>.exist?(<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>)
124
+ contents = <span class="hljs-constant">File</span>.read(<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>)
125
+ contents = contents.split(<span class="hljs-string">' '</span>)
126
126
  client_id = contents.first
127
127
  private_key = contents.last
128
- <span class="keyword">end</span></pre></div></div>
128
+ <span class="hljs-keyword">end</span></pre></div></div>
129
129
 
130
130
  </li>
131
131
 
@@ -140,7 +140,7 @@
140
140
 
141
141
  </div>
142
142
 
143
- <div class="content"><div class='highlight'><pre> job = <span class="constant">GroupDocs::Signature::Envelope</span>.new({<span class="symbol">:id</span> =&gt; source_id})</pre></div></div>
143
+ <div class="content"><div class='highlight'><pre> job = <span class="hljs-constant">GroupDocs::Signature::Envelope</span>.new({<span class="hljs-symbol">:id</span> =&gt; source_id})</pre></div></div>
144
144
 
145
145
  </li>
146
146
 
@@ -155,7 +155,7 @@
155
155
 
156
156
  </div>
157
157
 
158
- <div class="content"><div class='highlight'><pre> documents = job.documents!({}, {<span class="symbol">:client_id</span> =&gt; client_id, <span class="symbol">:private_key</span> =&gt; private_key}).first</pre></div></div>
158
+ <div class="content"><div class='highlight'><pre> documents = job.documents!({}, {<span class="hljs-symbol">:client_id</span> =&gt; client_id, <span class="hljs-symbol">:private_key</span> =&gt; private_key}).first</pre></div></div>
159
159
 
160
160
  </li>
161
161
 
@@ -185,7 +185,7 @@
185
185
 
186
186
  </div>
187
187
 
188
- <div class="content"><div class='highlight'><pre> 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/callback_info.txt"</span>, <span class="string">'w'</span>)</pre></div></div>
188
+ <div class="content"><div class='highlight'><pre> 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/callback_info.txt"</span>, <span class="hljs-string">'w'</span>)</pre></div></div>
189
189
 
190
190
  </li>
191
191
 
@@ -200,13 +200,13 @@
200
200
 
201
201
  </div>
202
202
 
203
- <div class="content"><div class='highlight'><pre> out_file.write(<span class="string">"<span class="subst">#{guid}</span>"</span>)
203
+ <div class="content"><div class='highlight'><pre> out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{guid}</span>"</span>)
204
204
  out_file.close
205
205
 
206
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
206
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
207
207
  err = e.message
208
- <span class="keyword">end</span>
209
- <span class="keyword">end</span></pre></div></div>
208
+ <span class="hljs-keyword">end</span>
209
+ <span class="hljs-keyword">end</span></pre></div></div>
210
210
 
211
211
  </li>
212
212
 
@@ -221,12 +221,12 @@
221
221
 
222
222
  </div>
223
223
 
224
- <div class="content"><div class='highlight'><pre>post <span class="string">'/sample39/check'</span> <span class="keyword">do</span>
225
- <span class="keyword">begin</span>
226
- result = <span class="keyword">nil</span>
227
- i = <span class="number">0</span>
228
- <span class="keyword">for</span> i <span class="keyword">in</span> <span class="number">1</span>..<span class="number">10</span>
229
- i +=<span class="number">1</span></pre></div></div>
224
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample39/check'</span> <span class="hljs-keyword">do</span>
225
+ <span class="hljs-keyword">begin</span>
226
+ result = <span class="hljs-keyword">nil</span>
227
+ i = <span class="hljs-number">0</span>
228
+ <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-number">1</span>..<span class="hljs-number">10</span>
229
+ i +=<span class="hljs-number">1</span></pre></div></div>
230
230
 
231
231
  </li>
232
232
 
@@ -241,12 +241,12 @@
241
241
 
242
242
  </div>
243
243
 
244
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> <span class="constant">File</span>.exist?(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/callback_info.txt"</span>)
245
- result = <span class="constant">File</span>.read(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/callback_info.txt"</span>)
246
- <span class="keyword">if</span> result.<span class="keyword">nil</span>? <span class="keyword">then</span> <span class="keyword">break</span> <span class="keyword">end</span>
247
- <span class="keyword">end</span>
248
- sleep(<span class="number">5</span>)
249
- <span class="keyword">end</span></pre></div></div>
244
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-constant">File</span>.exist?(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/callback_info.txt"</span>)
245
+ result = <span class="hljs-constant">File</span>.read(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/callback_info.txt"</span>)
246
+ <span class="hljs-keyword">if</span> result.<span class="hljs-keyword">nil</span>? <span class="hljs-keyword">then</span> <span class="hljs-keyword">break</span> <span class="hljs-keyword">end</span>
247
+ <span class="hljs-keyword">end</span>
248
+ sleep(<span class="hljs-number">5</span>)
249
+ <span class="hljs-keyword">end</span></pre></div></div>
250
250
 
251
251
  </li>
252
252
 
@@ -261,16 +261,16 @@
261
261
 
262
262
  </div>
263
263
 
264
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> result == <span class="string">'Error'</span>
265
- result = <span class="string">"File was not found. Looks like something went wrong."</span>
266
- <span class="keyword">else</span>
264
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> result == <span class="hljs-string">'Error'</span>
265
+ result = <span class="hljs-string">"File was not found. Looks like something went wrong."</span>
266
+ <span class="hljs-keyword">else</span>
267
267
  result
268
- <span class="keyword">end</span>
268
+ <span class="hljs-keyword">end</span>
269
269
 
270
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
270
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
271
271
  err = e.message
272
- <span class="keyword">end</span>
273
- <span class="keyword">end</span></pre></div></div>
272
+ <span class="hljs-keyword">end</span>
273
+ <span class="hljs-keyword">end</span></pre></div></div>
274
274
 
275
275
  </li>
276
276
 
@@ -285,7 +285,7 @@
285
285
 
286
286
  </div>
287
287
 
288
- <div class="content"><div class='highlight'><pre>post <span class="string">'/sample39/postdata'</span> <span class="keyword">do</span>
288
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample39/postdata'</span> <span class="hljs-keyword">do</span>
289
289
 
290
290
  data = request.body.read</pre></div></div>
291
291
 
@@ -302,7 +302,7 @@
302
302
 
303
303
  </div>
304
304
 
305
- <div class="content"><div class='highlight'><pre> json_post_data = <span class="constant">JSON</span>.parse(data);</pre></div></div>
305
+ <div class="content"><div class='highlight'><pre> json_post_data = <span class="hljs-constant">JSON</span>.parse(data);</pre></div></div>
306
306
 
307
307
  </li>
308
308
 
@@ -317,7 +317,7 @@
317
317
 
318
318
  </div>
319
319
 
320
- <div class="content"><div class='highlight'><pre> clientId = json_post_data[<span class="string">'userId'</span>];</pre></div></div>
320
+ <div class="content"><div class='highlight'><pre> clientId = json_post_data[<span class="hljs-string">'userId'</span>];</pre></div></div>
321
321
 
322
322
  </li>
323
323
 
@@ -332,7 +332,7 @@
332
332
 
333
333
  </div>
334
334
 
335
- <div class="content"><div class='highlight'><pre> privateKey = json_post_data[<span class="string">'privateKey'</span>];</pre></div></div>
335
+ <div class="content"><div class='highlight'><pre> privateKey = json_post_data[<span class="hljs-string">'privateKey'</span>];</pre></div></div>
336
336
 
337
337
  </li>
338
338
 
@@ -347,7 +347,7 @@
347
347
 
348
348
  </div>
349
349
 
350
- <div class="content"><div class='highlight'><pre> documents = json_post_data[<span class="string">'documents'</span>];</pre></div></div>
350
+ <div class="content"><div class='highlight'><pre> documents = json_post_data[<span class="hljs-string">'documents'</span>];</pre></div></div>
351
351
 
352
352
  </li>
353
353
 
@@ -362,7 +362,7 @@
362
362
 
363
363
  </div>
364
364
 
365
- <div class="content"><div class='highlight'><pre> signers = json_post_data[<span class="string">'signers'</span>];</pre></div></div>
365
+ <div class="content"><div class='highlight'><pre> signers = json_post_data[<span class="hljs-string">'signers'</span>];</pre></div></div>
366
366
 
367
367
  </li>
368
368
 
@@ -377,8 +377,8 @@
377
377
 
378
378
  </div>
379
379
 
380
- <div class="content"><div class='highlight'><pre> document_path = <span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads/<span class="subst">#{documents[<span class="number">0</span>][<span class="string">'name'</span>]}</span>"</span>
381
- signer_path = <span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads/<span class="subst">#{signers[<span class="number">0</span>][<span class="string">'name'</span>]}</span>.png"</span></pre></div></div>
380
+ <div class="content"><div class='highlight'><pre> document_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 class="hljs-subst">#{documents[<span class="hljs-number">0</span>][<span class="hljs-string">'name'</span>]}</span>"</span>
381
+ signer_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 class="hljs-subst">#{signers[<span class="hljs-number">0</span>][<span class="hljs-string">'name'</span>]}</span>.png"</span></pre></div></div>
382
382
 
383
383
  </li>
384
384
 
@@ -393,8 +393,8 @@
393
393
 
394
394
  </div>
395
395
 
396
- <div class="content"><div class='highlight'><pre> base64_documents = documents[<span class="number">0</span>][<span class="string">'data'</span>].split(<span class="string">','</span>).last
397
- base64_signers = signers[<span class="number">0</span>][<span class="string">'data'</span>].split(<span class="string">','</span>).last</pre></div></div>
396
+ <div class="content"><div class='highlight'><pre> base64_documents = documents[<span class="hljs-number">0</span>][<span class="hljs-string">'data'</span>].split(<span class="hljs-string">','</span>).last
397
+ base64_signers = signers[<span class="hljs-number">0</span>][<span class="hljs-string">'data'</span>].split(<span class="hljs-string">','</span>).last</pre></div></div>
398
398
 
399
399
  </li>
400
400
 
@@ -409,13 +409,13 @@
409
409
 
410
410
  </div>
411
411
 
412
- <div class="content"><div class='highlight'><pre> <span class="constant">File</span>.open(document_path, <span class="string">'wb'</span>) <span class="keyword">do</span> |f|
413
- f.write(<span class="constant">Base64</span>.strict_decode64(base64_documents))
414
- <span class="keyword">end</span>
412
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">File</span>.open(document_path, <span class="hljs-string">'wb'</span>) <span class="hljs-keyword">do</span> |f|
413
+ f.write(<span class="hljs-constant">Base64</span>.strict_decode64(base64_documents))
414
+ <span class="hljs-keyword">end</span>
415
415
 
416
- <span class="constant">File</span>.open(signer_path, <span class="string">'wb'</span>) <span class="keyword">do</span> |f|
417
- f.write(<span class="constant">Base64</span>.strict_decode64(base64_signers))
418
- <span class="keyword">end</span></pre></div></div>
416
+ <span class="hljs-constant">File</span>.open(signer_path, <span class="hljs-string">'wb'</span>) <span class="hljs-keyword">do</span> |f|
417
+ f.write(<span class="hljs-constant">Base64</span>.strict_decode64(base64_signers))
418
+ <span class="hljs-keyword">end</span></pre></div></div>
419
419
 
420
420
  </li>
421
421
 
@@ -430,7 +430,7 @@
430
430
 
431
431
  </div>
432
432
 
433
- <div class="content"><div class='highlight'><pre> documents = <span class="constant">GroupDocs::Storage::File</span>.new(<span class="symbol">:name=&gt;documents</span>[<span class="number">0</span>][<span class="string">'name'</span>], <span class="symbol">:local_path=&gt;document_path</span>).to_document</pre></div></div>
433
+ <div class="content"><div class='highlight'><pre> documents = <span class="hljs-constant">GroupDocs::Storage::File</span>.new(<span class="hljs-symbol">:name=&gt;documents</span>[<span class="hljs-number">0</span>][<span class="hljs-string">'name'</span>], <span class="hljs-symbol">:local_path=&gt;document_path</span>).to_document</pre></div></div>
434
434
 
435
435
  </li>
436
436
 
@@ -445,8 +445,8 @@
445
445
 
446
446
  </div>
447
447
 
448
- <div class="content"><div class='highlight'><pre> signers = <span class="constant">GroupDocs::Signature</span>.new(<span class="symbol">:name=&gt;signers</span>[<span class="number">0</span>][<span class="string">'name'</span>], <span class="symbol">:image_path=&gt;signer_path</span>)
449
- signers.position = {<span class="symbol">top:</span> <span class="number">0</span>.<span class="number">83319</span>, <span class="symbol">left:</span> <span class="number">0</span>.<span class="number">72171</span>, <span class="symbol">width:</span> <span class="number">100</span>, <span class="symbol">height:</span> <span class="number">40</span>}</pre></div></div>
448
+ <div class="content"><div class='highlight'><pre> signers = <span class="hljs-constant">GroupDocs::Signature</span>.new(<span class="hljs-symbol">:name=&gt;signers</span>[<span class="hljs-number">0</span>][<span class="hljs-string">'name'</span>], <span class="hljs-symbol">:image_path=&gt;signer_path</span>)
449
+ signers.position = {<span class="hljs-symbol">top:</span> <span class="hljs-number">0</span>.<span class="hljs-number">83319</span>, <span class="hljs-symbol">left:</span> <span class="hljs-number">0</span>.<span class="hljs-number">72171</span>, <span class="hljs-symbol">width:</span> <span class="hljs-number">100</span>, <span class="hljs-symbol">height:</span> <span class="hljs-number">40</span>}</pre></div></div>
450
450
 
451
451
  </li>
452
452
 
@@ -461,8 +461,8 @@
461
461
 
462
462
  </div>
463
463
 
464
- <div class="content"><div class='highlight'><pre> signDocument = <span class="constant">GroupDocs::Document</span>.sign_documents!([documents], [signers], {}, {<span class="symbol">:client_id=&gt;clientId</span>, <span class="symbol">:private_key=&gt;privateKey</span>})
465
- sleep(<span class="number">5</span>)</pre></div></div>
464
+ <div class="content"><div class='highlight'><pre> signDocument = <span class="hljs-constant">GroupDocs::Document</span>.sign_documents!([documents], [signers], {}, {<span class="hljs-symbol">:client_id=&gt;clientId</span>, <span class="hljs-symbol">:private_key=&gt;privateKey</span>})
465
+ sleep(<span class="hljs-number">5</span>)</pre></div></div>
466
466
 
467
467
  </li>
468
468
 
@@ -477,7 +477,7 @@
477
477
 
478
478
  </div>
479
479
 
480
- <div class="content"><div class='highlight'><pre> document = <span class="constant">GroupDocs::Signature</span>.sign_document_status!(signDocument, {<span class="symbol">:client_id=&gt;clientId</span>, <span class="symbol">:private_key=&gt;privateKey</span>})</pre></div></div>
480
+ <div class="content"><div class='highlight'><pre> document = <span class="hljs-constant">GroupDocs::Signature</span>.sign_document_status!(signDocument, {<span class="hljs-symbol">:client_id=&gt;clientId</span>, <span class="hljs-symbol">:private_key=&gt;privateKey</span>})</pre></div></div>
481
481
 
482
482
  </li>
483
483
 
@@ -507,7 +507,7 @@
507
507
 
508
508
  </div>
509
509
 
510
- <div class="content"><div class='highlight'><pre> result = [<span class="string">'guid'</span> =&gt; guid,<span class="string">'clientId'</span> =&gt; clientId,<span class="string">'privateKey'</span> =&gt; privateKey]</pre></div></div>
510
+ <div class="content"><div class='highlight'><pre> result = [<span class="hljs-string">'guid'</span> =&gt; guid,<span class="hljs-string">'clientId'</span> =&gt; clientId,<span class="hljs-string">'privateKey'</span> =&gt; privateKey]</pre></div></div>
511
511
 
512
512
  </li>
513
513
 
@@ -523,7 +523,7 @@
523
523
  </div>
524
524
 
525
525
  <div class="content"><div class='highlight'><pre> result.to_json
526
- <span class="keyword">end</span></pre></div></div>
526
+ <span class="hljs-keyword">end</span></pre></div></div>
527
527
 
528
528
  </li>
529
529
 
@@ -538,7 +538,7 @@
538
538
 
539
539
  </div>
540
540
 
541
- <div class="content"><div class='highlight'><pre>post <span class="string">'/sample39'</span> <span class="keyword">do</span></pre></div></div>
541
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-39-how-to-add-a-signature-to-a-document-and-re-direct-after-signing-with-groupdocs-widget'</span> <span class="hljs-keyword">do</span></pre></div></div>
542
542
 
543
543
  </li>
544
544
 
@@ -553,13 +553,13 @@
553
553
 
554
554
  </div>
555
555
 
556
- <div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
557
- set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
558
- set <span class="symbol">:name</span>, params[<span class="symbol">:name</span>]
559
- set <span class="symbol">:email</span>, params[<span class="symbol">:email</span>]
560
- set <span class="symbol">:callback</span>, params[<span class="symbol">:callbackUrl</span>]
561
- set <span class="symbol">:last_name</span>, params[<span class="symbol">:lastName</span>]
562
- set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]</pre></div></div>
556
+ <div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
557
+ set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
558
+ set <span class="hljs-symbol">:name</span>, params[<span class="hljs-symbol">:name</span>]
559
+ set <span class="hljs-symbol">:email</span>, params[<span class="hljs-symbol">:email</span>]
560
+ set <span class="hljs-symbol">:callback</span>, params[<span class="hljs-symbol">:callbackUrl</span>]
561
+ set <span class="hljs-symbol">:last_name</span>, params[<span class="hljs-symbol">:lastName</span>]
562
+ set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]</pre></div></div>
563
563
 
564
564
  </li>
565
565
 
@@ -574,7 +574,7 @@
574
574
 
575
575
  </div>
576
576
 
577
- <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>
577
+ <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>
578
578
 
579
579
  </li>
580
580
 
@@ -589,13 +589,13 @@
589
589
 
590
590
  </div>
591
591
 
592
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> <span class="constant">File</span>.directory?(downloads_path)
593
- <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> }
594
- <span class="keyword">else</span>
595
- <span class="constant">Dir::</span>mkdir(downloads_path)
596
- <span class="keyword">end</span>
592
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-constant">File</span>.directory?(downloads_path)
593
+ <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> }
594
+ <span class="hljs-keyword">else</span>
595
+ <span class="hljs-constant">Dir::</span>mkdir(downloads_path)
596
+ <span class="hljs-keyword">end</span>
597
597
 
598
- <span class="keyword">begin</span></pre></div></div>
598
+ <span class="hljs-keyword">begin</span></pre></div></div>
599
599
 
600
600
  </li>
601
601
 
@@ -610,7 +610,7 @@
610
610
 
611
611
  </div>
612
612
 
613
- <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.name.empty? <span class="keyword">or</span> settings.email.empty? <span class="keyword">or</span> settings.last_name.empty?</pre></div></div>
613
+ <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.name.empty? <span class="hljs-keyword">or</span> settings.email.empty? <span class="hljs-keyword">or</span> settings.last_name.empty?</pre></div></div>
614
614
 
615
615
  </li>
616
616
 
@@ -625,13 +625,13 @@
625
625
 
626
626
  </div>
627
627
 
628
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
629
- base_path = <span class="string">'https://api.groupdocs.com'</span>
630
- <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
631
- base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
632
- <span class="keyword">else</span>
628
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
629
+ base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
630
+ <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
631
+ base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
632
+ <span class="hljs-keyword">else</span>
633
633
  base_path = settings.base_path
634
- <span class="keyword">end</span></pre></div></div>
634
+ <span class="hljs-keyword">end</span></pre></div></div>
635
635
 
636
636
  </li>
637
637
 
@@ -646,7 +646,7 @@
646
646
 
647
647
  </div>
648
648
 
649
- <div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
649
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
650
650
  groupdocs.client_id = settings.client_id
651
651
  groupdocs.private_key = settings.private_key</pre></div></div>
652
652
 
@@ -663,9 +663,9 @@
663
663
 
664
664
  </div>
665
665
 
666
- <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment">#Default is 'https://api.groupdocs.com'</span>
666
+ <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment">#Default is 'https://api.groupdocs.com'</span>
667
667
 
668
- <span class="keyword">end</span></pre></div></div>
668
+ <span class="hljs-keyword">end</span></pre></div></div>
669
669
 
670
670
  </li>
671
671
 
@@ -680,8 +680,8 @@
680
680
 
681
681
  </div>
682
682
 
683
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.callback[<span class="number">0</span>]
684
- 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>
683
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.callback[<span class="hljs-number">0</span>]
684
+ 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>
685
685
 
686
686
  </li>
687
687
 
@@ -696,10 +696,10 @@
696
696
 
697
697
  </div>
698
698
 
699
- <div class="content"><div class='highlight'><pre> out_file.write(<span class="string">"<span class="subst">#{settings.client_id}</span> "</span>)
700
- out_file.write(<span class="string">"<span class="subst">#{settings.private_key}</span>"</span>)
699
+ <div class="content"><div class='highlight'><pre> out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.client_id}</span> "</span>)
700
+ out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.private_key}</span>"</span>)
701
701
  out_file.close
702
- <span class="keyword">end</span></pre></div></div>
702
+ <span class="hljs-keyword">end</span></pre></div></div>
703
703
 
704
704
  </li>
705
705
 
@@ -714,7 +714,7 @@
714
714
 
715
715
  </div>
716
716
 
717
- <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>
717
+ <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>
718
718
 
719
719
  </li>
720
720
 
@@ -729,7 +729,7 @@
729
729
 
730
730
  </div>
731
731
 
732
- <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>
732
+ <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>
733
733
 
734
734
  </li>
735
735
 
@@ -744,7 +744,7 @@
744
744
 
745
745
  </div>
746
746
 
747
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload!(file_path)
747
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(file_path)
748
748
  document = file.to_document</pre></div></div>
749
749
 
750
750
  </li>
@@ -760,9 +760,9 @@
760
760
 
761
761
  </div>
762
762
 
763
- <div class="content"><div class='highlight'><pre> envelope = <span class="constant">GroupDocs::Signature::Envelope</span>.new
763
+ <div class="content"><div class='highlight'><pre> envelope = <span class="hljs-constant">GroupDocs::Signature::Envelope</span>.new
764
764
  envelope.name = file.name
765
- envelope.email_subject = <span class="string">'Sing this!'</span>
765
+ envelope.email_subject = <span class="hljs-string">'Sing this!'</span>
766
766
  envelope.create!</pre></div></div>
767
767
 
768
768
  </li>
@@ -793,7 +793,7 @@
793
793
 
794
794
  </div>
795
795
 
796
- <div class="content"><div class='highlight'><pre> roles = <span class="constant">GroupDocs::Signature::Role</span>.get!</pre></div></div>
796
+ <div class="content"><div class='highlight'><pre> roles = <span class="hljs-constant">GroupDocs::Signature::Role</span>.get!</pre></div></div>
797
797
 
798
798
  </li>
799
799
 
@@ -808,11 +808,11 @@
808
808
 
809
809
  </div>
810
810
 
811
- <div class="content"><div class='highlight'><pre> recipient = <span class="constant">GroupDocs::Signature::Recipient</span>.new
811
+ <div class="content"><div class='highlight'><pre> recipient = <span class="hljs-constant">GroupDocs::Signature::Recipient</span>.new
812
812
  recipient.email = settings.email
813
813
  recipient.first_name = settings.name
814
814
  recipient.last_name = settings.last_name
815
- recipient.role_id = roles.detect { |role| role.name == <span class="string">'Signer'</span> }.id</pre></div></div>
815
+ recipient.role_id = roles.detect { |role| role.name == <span class="hljs-string">'Signer'</span> }.id</pre></div></div>
816
816
 
817
817
  </li>
818
818
 
@@ -857,9 +857,9 @@
857
857
 
858
858
  </div>
859
859
 
860
- <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> }
861
- 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>}
862
- field.name = <span class="string">'EMPLOYEE SIGNATURE'</span></pre></div></div>
860
+ <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> }
861
+ 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>}
862
+ field.name = <span class="hljs-string">'EMPLOYEE SIGNATURE'</span></pre></div></div>
863
863
 
864
864
  </li>
865
865
 
@@ -874,7 +874,7 @@
874
874
 
875
875
  </div>
876
876
 
877
- <div class="content"><div class='highlight'><pre> envelope.add_field!(field, document[<span class="number">0</span>], recipient, {})</pre></div></div>
877
+ <div class="content"><div class='highlight'><pre> envelope.add_field!(field, document[<span class="hljs-number">0</span>], recipient, {})</pre></div></div>
878
878
 
879
879
  </li>
880
880
 
@@ -889,7 +889,7 @@
889
889
 
890
890
  </div>
891
891
 
892
- <div class="content"><div class='highlight'><pre> envelope.send!({<span class="symbol">:callbackUrl</span> =&gt; settings.callback})</pre></div></div>
892
+ <div class="content"><div class='highlight'><pre> envelope.send!({<span class="hljs-symbol">:callbackUrl</span> =&gt; settings.callback})</pre></div></div>
893
893
 
894
894
  </li>
895
895
 
@@ -904,7 +904,7 @@
904
904
 
905
905
  </div>
906
906
 
907
- <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>
907
+ <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>
908
908
 
909
909
  </li>
910
910
 
@@ -919,7 +919,7 @@
919
919
 
920
920
  </div>
921
921
 
922
- <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>
922
+ <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>
923
923
 
924
924
  </li>
925
925
 
@@ -934,14 +934,14 @@
934
934
 
935
935
  </div>
936
936
 
937
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
938
- <span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
939
- iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
940
- <span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
941
- iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
942
- <span class="keyword">else</span>
943
- iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
944
- <span class="keyword">end</span></pre></div></div>
937
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
938
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
939
+ iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
940
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
941
+ iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
942
+ <span class="hljs-keyword">else</span>
943
+ iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
944
+ <span class="hljs-keyword">end</span></pre></div></div>
945
945
 
946
946
  </li>
947
947
 
@@ -956,12 +956,12 @@
956
956
 
957
957
  </div>
958
958
 
959
- <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>
959
+ <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>
960
960
 
961
961
 
962
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
962
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
963
963
  err = e.message
964
- <span class="keyword">end</span></pre></div></div>
964
+ <span class="hljs-keyword">end</span></pre></div></div>
965
965
 
966
966
  </li>
967
967
 
@@ -976,15 +976,15 @@
976
976
 
977
977
  </div>
978
978
 
979
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample39</span>, <span class="symbol">:locals</span> =&gt; {<span class="symbol">:userId</span> =&gt; settings.client_id,
980
- <span class="symbol">:privateKey</span> =&gt; settings.private_key,
981
- <span class="symbol">:callback</span> =&gt; settings.callback,
982
- <span class="symbol">:email</span> =&gt; settings.email,
983
- <span class="symbol">:name</span> =&gt; settings.name,
984
- <span class="symbol">:lastName</span> =&gt; settings.last_name,
985
- <span class="symbol">:iframe</span> =&gt; iframe,
986
- <span class="symbol">:err</span> =&gt; err}
987
- <span class="keyword">end</span></pre></div></div>
979
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample39</span>, <span class="hljs-symbol">:locals</span> =&gt; {<span class="hljs-symbol">:userId</span> =&gt; settings.client_id,
980
+ <span class="hljs-symbol">:privateKey</span> =&gt; settings.private_key,
981
+ <span class="hljs-symbol">:callback</span> =&gt; settings.callback,
982
+ <span class="hljs-symbol">:email</span> =&gt; settings.email,
983
+ <span class="hljs-symbol">:name</span> =&gt; settings.name,
984
+ <span class="hljs-symbol">:lastName</span> =&gt; settings.last_name,
985
+ <span class="hljs-symbol">:iframe</span> =&gt; iframe,
986
+ <span class="hljs-symbol">:err</span> =&gt; err}
987
+ <span class="hljs-keyword">end</span></pre></div></div>
988
988
 
989
989
  </li>
990
990