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">'/sample42'</span> <span class="keyword">do</span>
35
- haml <span class="symbol">:sample42</span>
36
- <span class="keyword">end</span></pre></div></div>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-42-how-to-download-document-with-annotations-using-groupdocs'</span> <span class="hljs-keyword">do</span>
35
+ haml <span class="hljs-symbol">:sample42</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">'/sample42'</span> <span class="keyword">do</span></pre></div></div>
51
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-42-how-to-download-document-with-annotations-using-groupdocs'</span> <span class="hljs-keyword">do</span></pre></div></div>
52
52
 
53
53
  </li>
54
54
 
@@ -63,12 +63,12 @@
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">:file_id</span>, params[<span class="symbol">:fileId</span>]
69
- set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
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">:file_id</span>, params[<span class="hljs-symbol">:fileId</span>]
69
+ set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
70
70
 
71
- <span class="keyword">begin</span></pre></div></div>
71
+ <span class="hljs-keyword">begin</span></pre></div></div>
72
72
 
73
73
  </li>
74
74
 
@@ -83,7 +83,7 @@
83
83
 
84
84
  </div>
85
85
 
86
- <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>
86
+ <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>
87
87
 
88
88
  </li>
89
89
 
@@ -98,13 +98,13 @@
98
98
 
99
99
  </div>
100
100
 
101
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
102
- base_path = <span class="string">'https://api.groupdocs.com'</span>
103
- <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
104
- base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
105
- <span class="keyword">else</span>
101
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
102
+ base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
103
+ <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
104
+ base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
105
+ <span class="hljs-keyword">else</span>
106
106
  base_path = settings.base_path
107
- <span class="keyword">end</span></pre></div></div>
107
+ <span class="hljs-keyword">end</span></pre></div></div>
108
108
 
109
109
  </li>
110
110
 
@@ -119,7 +119,7 @@
119
119
 
120
120
  </div>
121
121
 
122
- <div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
122
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
123
123
  groupdocs.client_id = settings.client_id
124
124
  groupdocs.private_key = settings.private_key</pre></div></div>
125
125
 
@@ -136,11 +136,11 @@
136
136
 
137
137
  </div>
138
138
 
139
- <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
139
+ <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
140
140
 
141
- <span class="keyword">end</span>
141
+ <span class="hljs-keyword">end</span>
142
142
 
143
- document = <span class="constant">GroupDocs::Storage::File</span>.new(<span class="symbol">:guid</span> =&gt; settings.file_id).to_document</pre></div></div>
143
+ document = <span class="hljs-constant">GroupDocs::Storage::File</span>.new(<span class="hljs-symbol">:guid</span> =&gt; settings.file_id).to_document</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> raise <span class="string">'Your document has no annotations'</span> <span class="keyword">if</span> document.annotations!.empty?</pre></div></div>
158
+ <div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Your document has no annotations'</span> <span class="hljs-keyword">if</span> document.annotations!.empty?</pre></div></div>
159
159
 
160
160
  </li>
161
161
 
@@ -170,7 +170,7 @@
170
170
 
171
171
  </div>
172
172
 
173
- <div class="content"><div class='highlight'><pre> options = {<span class="symbol">:actions</span> =&gt; [<span class="symbol">:import_annotations</span>], <span class="symbol">:name</span> =&gt; <span class="string">'sample'</span>}</pre></div></div>
173
+ <div class="content"><div class='highlight'><pre> options = {<span class="hljs-symbol">:actions</span> =&gt; [<span class="hljs-symbol">:import_annotations</span>], <span class="hljs-symbol">:name</span> =&gt; <span class="hljs-string">'sample'</span>}</pre></div></div>
174
174
 
175
175
  </li>
176
176
 
@@ -185,7 +185,7 @@
185
185
 
186
186
  </div>
187
187
 
188
- <div class="content"><div class='highlight'><pre> job = <span class="constant">GroupDocs::Job</span>.create!(options)</pre></div></div>
188
+ <div class="content"><div class='highlight'><pre> job = <span class="hljs-constant">GroupDocs::Job</span>.create!(options)</pre></div></div>
189
189
 
190
190
  </li>
191
191
 
@@ -200,7 +200,7 @@
200
200
 
201
201
  </div>
202
202
 
203
- <div class="content"><div class='highlight'><pre> job.add_document!(document, {<span class="symbol">:check_ownership</span> =&gt; <span class="keyword">false</span>})</pre></div></div>
203
+ <div class="content"><div class='highlight'><pre> job.add_document!(document, {<span class="hljs-symbol">:check_ownership</span> =&gt; <span class="hljs-keyword">false</span>})</pre></div></div>
204
204
 
205
205
  </li>
206
206
 
@@ -211,20 +211,20 @@
211
211
  <div class="pilwrap ">
212
212
  <a class="pilcrow" href="#section-12">&#182;</a>
213
213
  </div>
214
- <p>Update the Job with new status. :status =&gt; &#39;0&#39; mean Active status of the job (Start the job)</p>
214
+ <p>Update the Job with new status. :status =&gt; 0 mean Active status of the job (Start the job)</p>
215
215
 
216
216
  </div>
217
217
 
218
- <div class="content"><div class='highlight'><pre> id = job.update!({<span class="symbol">:status</span> =&gt; <span class="string">'0'</span>})
218
+ <div class="content"><div class='highlight'><pre> id = job.update!({<span class="hljs-symbol">:status</span> =&gt; <span class="hljs-string">'0'</span>})
219
219
 
220
- i = <span class="number">1</span>
220
+ i = <span class="hljs-number">1</span>
221
221
 
222
- <span class="keyword">while</span> i&lt;<span class="number">5</span> <span class="keyword">do</span>
223
- sleep(<span class="number">5</span>)
224
- job = <span class="constant">GroupDocs::Job</span>.get!(id[<span class="symbol">:job_id</span>])
225
- <span class="keyword">break</span> <span class="keyword">if</span> job.status == <span class="symbol">:archived</span>
226
- i = i + <span class="number">1</span>
227
- <span class="keyword">end</span></pre></div></div>
222
+ <span class="hljs-keyword">while</span> i&lt;<span class="hljs-number">5</span> <span class="hljs-keyword">do</span>
223
+ sleep(<span class="hljs-number">5</span>)
224
+ job = <span class="hljs-constant">GroupDocs::Job</span>.get!(id[<span class="hljs-symbol">:job_id</span>])
225
+ <span class="hljs-keyword">break</span> <span class="hljs-keyword">if</span> job.status == <span class="hljs-symbol">:archived</span>
226
+ i = i + <span class="hljs-number">1</span>
227
+ <span class="hljs-keyword">end</span></pre></div></div>
228
228
 
229
229
  </li>
230
230
 
@@ -241,7 +241,7 @@
241
241
 
242
242
  <div class="content"><div class='highlight'><pre> file = job.documents!()
243
243
 
244
- document = file[<span class="symbol">:inputs</span>]</pre></div></div>
244
+ document = file[<span class="hljs-symbol">:inputs</span>]</pre></div></div>
245
245
 
246
246
  </li>
247
247
 
@@ -256,7 +256,7 @@
256
256
 
257
257
  </div>
258
258
 
259
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> document</pre></div></div>
259
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> document</pre></div></div>
260
260
 
261
261
  </li>
262
262
 
@@ -271,7 +271,7 @@
271
271
 
272
272
  </div>
273
273
 
274
- <div class="content"><div class='highlight'><pre> iframe = <span class="string">"/document-annotation2/embed/<span class="subst">#{document[<span class="number">0</span>].guid}</span>"</span></pre></div></div>
274
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-annotation2/embed/<span class="hljs-subst">#{document[<span class="hljs-number">0</span>].guid}</span>"</span></pre></div></div>
275
275
 
276
276
  </li>
277
277
 
@@ -286,7 +286,7 @@
286
286
 
287
287
  </div>
288
288
 
289
- <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>
289
+ <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>
290
290
 
291
291
  </li>
292
292
 
@@ -301,18 +301,18 @@
301
301
 
302
302
  </div>
303
303
 
304
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
305
- <span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
306
- iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
307
- <span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
308
- iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
309
- <span class="keyword">else</span>
310
- iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
311
- <span class="keyword">end</span>
304
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
305
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
306
+ iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
307
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
308
+ iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
309
+ <span class="hljs-keyword">else</span>
310
+ iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
311
+ <span class="hljs-keyword">end</span>
312
312
 
313
- iframe = <span class="string">"&lt;iframe width='100%' height='600' id='downloadframe' frameborder='0' src='<span class="subst">#{iframe}</span>'&gt;&lt;/iframe&gt;"</span>
313
+ iframe = <span class="hljs-string">"&lt;iframe width='100%' height='600' id='downloadframe' frameborder='0' src='<span class="hljs-subst">#{iframe}</span>'&gt;&lt;/iframe&gt;"</span>
314
314
 
315
- 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>
315
+ 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>
316
316
 
317
317
  </li>
318
318
 
@@ -327,20 +327,20 @@
327
327
 
328
328
  </div>
329
329
 
330
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> <span class="constant">File</span>.directory?(path)
331
- <span class="constant">Dir</span>.foreach(path) { |f| fn = <span class="constant">File</span>.join(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> }
332
- <span class="keyword">else</span>
333
- <span class="constant">Dir::</span>mkdir(path)
334
- <span class="keyword">end</span>
330
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-constant">File</span>.directory?(path)
331
+ <span class="hljs-constant">Dir</span>.foreach(path) { |f| fn = <span class="hljs-constant">File</span>.join(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> }
332
+ <span class="hljs-keyword">else</span>
333
+ <span class="hljs-constant">Dir::</span>mkdir(path)
334
+ <span class="hljs-keyword">end</span>
335
335
 
336
- <span class="constant">GroupDocs::User</span>.download!(path, document[<span class="number">0</span>].outputs[<span class="number">0</span>].name, document[<span class="number">0</span>].outputs[<span class="number">0</span>].guid)
337
- message = <span class="string">"&lt;span style=\"color:green\"&gt;File with annotations was downloaded to server's local folder. You can check them &lt;a href=\"/downloads/<span class="subst">#{document[<span class="number">0</span>].outputs[<span class="number">0</span>].name}</span>\" download&gt;here&lt;/a&gt;&lt;/span&gt;"</span>
338
- <span class="keyword">else</span>
339
- raise <span class="string">'File was not converted'</span>
340
- <span class="keyword">end</span>
341
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
336
+ <span class="hljs-constant">GroupDocs::User</span>.download!(path, document[<span class="hljs-number">0</span>].outputs[<span class="hljs-number">0</span>].name, document[<span class="hljs-number">0</span>].outputs[<span class="hljs-number">0</span>].guid)
337
+ message = <span class="hljs-string">"&lt;span style=\"color:green\"&gt;File with annotations was downloaded to server's local folder. You can check them &lt;a href=\"/downloads/<span class="hljs-subst">#{document[<span class="hljs-number">0</span>].outputs[<span class="hljs-number">0</span>].name}</span>\" download&gt;here&lt;/a&gt;&lt;/span&gt;"</span>
338
+ <span class="hljs-keyword">else</span>
339
+ raise <span class="hljs-string">'File was not converted'</span>
340
+ <span class="hljs-keyword">end</span>
341
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
342
342
  err = e.message
343
- <span class="keyword">end</span></pre></div></div>
343
+ <span class="hljs-keyword">end</span></pre></div></div>
344
344
 
345
345
  </li>
346
346
 
@@ -355,8 +355,8 @@
355
355
 
356
356
  </div>
357
357
 
358
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample42</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">:err</span> =&gt; err, <span class="symbol">:iframe</span> =&gt; iframe, <span class="symbol">:message</span> =&gt; message}
359
- <span class="keyword">end</span></pre></div></div>
358
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample42</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">:err</span> =&gt; err, <span class="hljs-symbol">:iframe</span> =&gt; iframe, <span class="hljs-symbol">:message</span> =&gt; message}
359
+ <span class="hljs-keyword">end</span></pre></div></div>
360
360
 
361
361
  </li>
362
362
 
@@ -31,9 +31,9 @@
31
31
 
32
32
  </div>
33
33
 
34
- <div class="content"><div class='highlight'><pre>get <span class="string">'/sample43'</span> <span class="keyword">do</span>
35
- haml <span class="symbol">:sample43</span>
36
- <span class="keyword">end</span></pre></div></div>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-43-how-to-add-numeration-in-the-doc-file'</span> <span class="hljs-keyword">do</span>
35
+ haml <span class="hljs-symbol">:sample43</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">'/sample43'</span> <span class="keyword">do</span></pre></div></div>
51
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-43-how-to-add-numeration-in-the-doc-file'</span> <span class="hljs-keyword">do</span></pre></div></div>
52
52
 
53
53
  </li>
54
54
 
@@ -63,12 +63,12 @@
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">:source</span>, params[<span class="symbol">:source</span>]
69
- set <span class="symbol">:file_id</span>, params[<span class="symbol">:fileId</span>]
70
- set <span class="symbol">:url</span>, params[<span class="symbol">:url</span>]
71
- 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">:source</span>, params[<span class="hljs-symbol">:source</span>]
69
+ set <span class="hljs-symbol">:file_id</span>, params[<span class="hljs-symbol">:fileId</span>]
70
+ set <span class="hljs-symbol">:url</span>, params[<span class="hljs-symbol">:url</span>]
71
+ set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]</pre></div></div>
72
72
 
73
73
  </li>
74
74
 
@@ -83,7 +83,7 @@
83
83
 
84
84
  </div>
85
85
 
86
- <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>
86
+ <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>
87
87
 
88
88
  </li>
89
89
 
@@ -98,13 +98,13 @@
98
98
 
99
99
  </div>
100
100
 
101
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> <span class="constant">File</span>.directory?(downloads_path)
102
- <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> }
103
- <span class="keyword">else</span>
104
- <span class="constant">Dir::</span>mkdir(downloads_path)
105
- <span class="keyword">end</span>
101
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-constant">File</span>.directory?(downloads_path)
102
+ <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> }
103
+ <span class="hljs-keyword">else</span>
104
+ <span class="hljs-constant">Dir::</span>mkdir(downloads_path)
105
+ <span class="hljs-keyword">end</span>
106
106
 
107
- <span class="keyword">begin</span></pre></div></div>
107
+ <span class="hljs-keyword">begin</span></pre></div></div>
108
108
 
109
109
  </li>
110
110
 
@@ -119,7 +119,7 @@
119
119
 
120
120
  </div>
121
121
 
122
- <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>
122
+ <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>
123
123
 
124
124
  </li>
125
125
 
@@ -134,13 +134,13 @@
134
134
 
135
135
  </div>
136
136
 
137
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
138
- base_path = <span class="string">'https://api.groupdocs.com'</span>
139
- <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
140
- base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
141
- <span class="keyword">else</span>
137
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
138
+ base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
139
+ <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
140
+ base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
141
+ <span class="hljs-keyword">else</span>
142
142
  base_path = settings.base_path
143
- <span class="keyword">end</span></pre></div></div>
143
+ <span class="hljs-keyword">end</span></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> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
158
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
159
159
  groupdocs.client_id = settings.client_id
160
160
  groupdocs.private_key = settings.private_key</pre></div></div>
161
161
 
@@ -172,9 +172,9 @@
172
172
 
173
173
  </div>
174
174
 
175
- <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
175
+ <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
176
176
 
177
- <span class="keyword">end</span></pre></div></div>
177
+ <span class="hljs-keyword">end</span></pre></div></div>
178
178
 
179
179
  </li>
180
180
 
@@ -189,8 +189,8 @@
189
189
 
190
190
  </div>
191
191
 
192
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> settings.source
193
- <span class="keyword">when</span> <span class="string">'guid'</span></pre></div></div>
192
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.source
193
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'guid'</span></pre></div></div>
194
194
 
195
195
  </li>
196
196
 
@@ -205,8 +205,8 @@
205
205
 
206
206
  </div>
207
207
 
208
- <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})
209
- <span class="keyword">when</span> <span class="string">'local'</span></pre></div></div>
208
+ <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})
209
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'local'</span></pre></div></div>
210
210
 
211
211
  </li>
212
212
 
@@ -221,7 +221,7 @@
221
221
 
222
222
  </div>
223
223
 
224
- <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>
224
+ <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>
225
225
 
226
226
  </li>
227
227
 
@@ -236,7 +236,7 @@
236
236
 
237
237
  </div>
238
238
 
239
- <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>
239
+ <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>
240
240
 
241
241
  </li>
242
242
 
@@ -251,8 +251,8 @@
251
251
 
252
252
  </div>
253
253
 
254
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload!(file_path, {})
255
- <span class="keyword">when</span> <span class="string">'url'</span></pre></div></div>
254
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(file_path, {})
255
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'url'</span></pre></div></div>
256
256
 
257
257
  </li>
258
258
 
@@ -267,10 +267,10 @@
267
267
 
268
268
  </div>
269
269
 
270
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
271
- <span class="keyword">else</span>
272
- raise <span class="string">'Wrong GUID source.'</span>
273
- <span class="keyword">end</span></pre></div></div>
270
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
271
+ <span class="hljs-keyword">else</span>
272
+ raise <span class="hljs-string">'Wrong GUID source.'</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> raise <span class="string">'No such file'</span> <span class="keyword">unless</span> file.is_a?(<span class="constant">GroupDocs::Storage::File</span>)</pre></div></div>
288
+ <div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'No such file'</span> <span class="hljs-keyword">unless</span> file.is_a?(<span class="hljs-constant">GroupDocs::Storage::File</span>)</pre></div></div>
289
289
 
290
290
  </li>
291
291
 
@@ -315,7 +315,7 @@
315
315
 
316
316
  </div>
317
317
 
318
- <div class="content"><div class='highlight'><pre> options = {<span class="symbol">:actions</span> =&gt; [<span class="symbol">:convert</span>, <span class="symbol">:number_lines</span>], <span class="symbol">:out_formats</span> =&gt; [<span class="string">'doc'</span>], <span class="symbol">:name</span> =&gt; <span class="string">'sample'</span>}</pre></div></div>
318
+ <div class="content"><div class='highlight'><pre> options = {<span class="hljs-symbol">:actions</span> =&gt; [<span class="hljs-symbol">:convert</span>, <span class="hljs-symbol">:number_lines</span>], <span class="hljs-symbol">:out_formats</span> =&gt; [<span class="hljs-string">'doc'</span>], <span class="hljs-symbol">:name</span> =&gt; <span class="hljs-string">'sample'</span>}</pre></div></div>
319
319
 
320
320
  </li>
321
321
 
@@ -330,7 +330,7 @@
330
330
 
331
331
  </div>
332
332
 
333
- <div class="content"><div class='highlight'><pre> job = <span class="constant">GroupDocs::Job</span>.create!(options)</pre></div></div>
333
+ <div class="content"><div class='highlight'><pre> job = <span class="hljs-constant">GroupDocs::Job</span>.create!(options)</pre></div></div>
334
334
 
335
335
  </li>
336
336
 
@@ -345,7 +345,7 @@
345
345
 
346
346
  </div>
347
347
 
348
- <div class="content"><div class='highlight'><pre> job.add_document!(document, {<span class="symbol">:check_ownership</span> =&gt; <span class="keyword">false</span>})</pre></div></div>
348
+ <div class="content"><div class='highlight'><pre> job.add_document!(document, {<span class="hljs-symbol">:check_ownership</span> =&gt; <span class="hljs-keyword">false</span>})</pre></div></div>
349
349
 
350
350
  </li>
351
351
 
@@ -356,20 +356,20 @@
356
356
  <div class="pilwrap ">
357
357
  <a class="pilcrow" href="#section-21">&#182;</a>
358
358
  </div>
359
- <p>Update the Job with new status. :status =&gt; &#39;0&#39; mean Active status of the job (Start the job)</p>
359
+ <p>Update the Job with new status. :status =&gt; 0 mean Active status of the job (Start the job)</p>
360
360
 
361
361
  </div>
362
362
 
363
- <div class="content"><div class='highlight'><pre> id = job.update!({<span class="symbol">:status</span> =&gt; <span class="string">'pending'</span>})
363
+ <div class="content"><div class='highlight'><pre> id = job.update!({<span class="hljs-symbol">:status</span> =&gt; <span class="hljs-string">'pending'</span>})
364
364
 
365
- i = <span class="number">1</span>
365
+ i = <span class="hljs-number">1</span>
366
366
 
367
- <span class="keyword">while</span> i&lt;<span class="number">5</span> <span class="keyword">do</span>
368
- sleep(<span class="number">5</span>)
369
- job = <span class="constant">GroupDocs::Job</span>.get!(id[<span class="symbol">:job_id</span>])
370
- <span class="keyword">break</span> <span class="keyword">if</span> job.status == <span class="symbol">:archived</span>
371
- i = i + <span class="number">1</span>
372
- <span class="keyword">end</span></pre></div></div>
367
+ <span class="hljs-keyword">while</span> i&lt;<span class="hljs-number">5</span> <span class="hljs-keyword">do</span>
368
+ sleep(<span class="hljs-number">5</span>)
369
+ job = <span class="hljs-constant">GroupDocs::Job</span>.get!(id[<span class="hljs-symbol">:job_id</span>])
370
+ <span class="hljs-keyword">break</span> <span class="hljs-keyword">if</span> job.status == <span class="hljs-symbol">:archived</span>
371
+ i = i + <span class="hljs-number">1</span>
372
+ <span class="hljs-keyword">end</span></pre></div></div>
373
373
 
374
374
  </li>
375
375
 
@@ -386,7 +386,7 @@
386
386
 
387
387
  <div class="content"><div class='highlight'><pre> file = job.documents!()
388
388
 
389
- document = file[<span class="symbol">:inputs</span>][<span class="number">0</span>].outputs[<span class="number">0</span>]</pre></div></div>
389
+ document = file[<span class="hljs-symbol">:inputs</span>][<span class="hljs-number">0</span>].outputs[<span class="hljs-number">0</span>]</pre></div></div>
390
390
 
391
391
  </li>
392
392
 
@@ -401,7 +401,7 @@
401
401
 
402
402
  </div>
403
403
 
404
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> document</pre></div></div>
404
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> document</pre></div></div>
405
405
 
406
406
  </li>
407
407
 
@@ -416,7 +416,7 @@
416
416
 
417
417
  </div>
418
418
 
419
- <div class="content"><div class='highlight'><pre> iframe = <span class="string">"document-viewer/embed/<span class="subst">#{document.guid}</span>"</span></pre></div></div>
419
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-viewer/embed/<span class="hljs-subst">#{document.guid}</span>"</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> url = <span class="constant">GroupDocs::Api::Request</span>.new(<span class="symbol">:path</span> =&gt; iframe).prepare_and_sign_url</pre></div></div>
434
+ <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>
435
435
 
436
436
  </li>
437
437
 
@@ -446,22 +446,22 @@
446
446
 
447
447
  </div>
448
448
 
449
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
450
- <span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
451
- iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
452
- <span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
453
- iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
454
- <span class="keyword">else</span>
455
- iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
456
- <span class="keyword">end</span>
449
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
450
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
451
+ iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
452
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
453
+ iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
454
+ <span class="hljs-keyword">else</span>
455
+ iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
456
+ <span class="hljs-keyword">end</span>
457
457
 
458
- iframe = <span class="string">"&lt;iframe width='100%' height='600' id='downloadframe' frameborder='0' src='<span class="subst">#{iframe}</span>'&gt;&lt;/iframe&gt;"</span>
459
- <span class="keyword">else</span>
460
- raise <span class="string">'File was not converted'</span>
461
- <span class="keyword">end</span>
462
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
458
+ iframe = <span class="hljs-string">"&lt;iframe width='100%' height='600' id='downloadframe' frameborder='0' src='<span class="hljs-subst">#{iframe}</span>'&gt;&lt;/iframe&gt;"</span>
459
+ <span class="hljs-keyword">else</span>
460
+ raise <span class="hljs-string">'File was not converted'</span>
461
+ <span class="hljs-keyword">end</span>
462
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
463
463
  err = e.message
464
- <span class="keyword">end</span></pre></div></div>
464
+ <span class="hljs-keyword">end</span></pre></div></div>
465
465
 
466
466
  </li>
467
467
 
@@ -476,8 +476,8 @@
476
476
 
477
477
  </div>
478
478
 
479
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample43</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">:err</span> =&gt; err, <span class="symbol">:iframe</span> =&gt; iframe}
480
- <span class="keyword">end</span></pre></div></div>
479
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample43</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">:err</span> =&gt; err, <span class="hljs-symbol">:iframe</span> =&gt; iframe}
480
+ <span class="hljs-keyword">end</span></pre></div></div>
481
481
 
482
482
  </li>
483
483