dh_easy-core 0.2.2 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/doc/DhEasy.html +6 -6
  3. data/doc/DhEasy/Core.html +39 -40
  4. data/doc/DhEasy/Core/Config.html +6 -6
  5. data/doc/DhEasy/Core/Exception.html +6 -6
  6. data/doc/DhEasy/Core/Exception/OutdatedError.html +6 -6
  7. data/doc/DhEasy/Core/Helper.html +6 -6
  8. data/doc/DhEasy/Core/Helper/Cookie.html +6 -6
  9. data/doc/DhEasy/Core/Mock.html +6 -6
  10. data/doc/DhEasy/Core/Mock/FakeDb.html +963 -400
  11. data/doc/DhEasy/Core/Mock/FakeExecutor.html +26 -37
  12. data/doc/DhEasy/Core/Mock/FakeFinisher.html +6 -6
  13. data/doc/DhEasy/Core/Mock/FakeParser.html +6 -6
  14. data/doc/DhEasy/Core/Mock/FakeSeeder.html +6 -6
  15. data/doc/DhEasy/Core/Plugin.html +6 -6
  16. data/doc/DhEasy/Core/Plugin/CollectionVault.html +6 -6
  17. data/doc/DhEasy/Core/Plugin/ConfigBehavior.html +7 -7
  18. data/doc/DhEasy/Core/Plugin/ContextIntegrator.html +6 -6
  19. data/doc/DhEasy/Core/Plugin/Executor.html +6 -6
  20. data/doc/DhEasy/Core/Plugin/ExecutorBehavior.html +6 -6
  21. data/doc/DhEasy/Core/Plugin/Finisher.html +6 -6
  22. data/doc/DhEasy/Core/Plugin/FinisherBehavior.html +6 -6
  23. data/doc/DhEasy/Core/Plugin/InitializeHook.html +6 -6
  24. data/doc/DhEasy/Core/Plugin/Parser.html +6 -6
  25. data/doc/DhEasy/Core/Plugin/ParserBehavior.html +6 -6
  26. data/doc/DhEasy/Core/Plugin/Seeder.html +6 -6
  27. data/doc/DhEasy/Core/Plugin/SeederBehavior.html +6 -6
  28. data/doc/DhEasy/Core/SmartCollection.html +6 -6
  29. data/doc/_index.html +7 -7
  30. data/doc/class_list.html +2 -2
  31. data/doc/css/style.css +2 -2
  32. data/doc/file.README.html +9 -16
  33. data/doc/file_list.html +2 -2
  34. data/doc/frames.html +2 -2
  35. data/doc/index.html +9 -16
  36. data/doc/js/app.js +14 -3
  37. data/doc/method_list.html +80 -48
  38. data/doc/top-level-namespace.html +6 -6
  39. data/lib/dh_easy/core.rb +2 -1
  40. data/lib/dh_easy/core/mock/fake_db.rb +228 -35
  41. data/lib/dh_easy/core/mock/fake_executor.rb +0 -1
  42. data/lib/dh_easy/core/version.rb +1 -1
  43. metadata +3 -4
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: DhEasy::Core::Mock
8
8
 
9
- &mdash; Documentation by YARD 0.9.20
9
+ &mdash; Documentation by YARD 0.9.24
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "DhEasy::Core::Mock";
19
19
  relpath = '../../';
20
20
  </script>
@@ -272,9 +272,9 @@
272
272
  </div>
273
273
 
274
274
  <div id="footer">
275
- Generated on Wed Dec 4 23:00:02 2019 by
275
+ Generated on Sun May 23 08:36:54 2021 by
276
276
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
277
- 0.9.20 (ruby-2.5.3).
277
+ 0.9.24 (ruby-2.6.5).
278
278
  </div>
279
279
 
280
280
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: DhEasy::Core::Mock::FakeDb
8
8
 
9
- &mdash; Documentation by YARD 0.9.20
9
+ &mdash; Documentation by YARD 0.9.24
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "DhEasy::Core::Mock::FakeDb";
19
19
  relpath = '../../../';
20
20
  </script>
@@ -102,8 +102,7 @@
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
104
 
105
- <p>Fake in memory database that emulates `DataHen` database objects&#39; black
106
- box behavior.</p>
105
+ <p>Fake in memory database that emulates `DataHen` database objects&#39; black box behavior.</p>
107
106
 
108
107
 
109
108
  </div>
@@ -205,6 +204,54 @@ box behavior.</p>
205
204
  </dt>
206
205
  <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>default</span><span class='tstring_end'>&#39;</span></span></pre></dd>
207
206
 
207
+ <dt id="DEFAULT_FETCH_TYPE-constant" class="">DEFAULT_FETCH_TYPE =
208
+ <div class="docstring">
209
+ <div class="discussion">
210
+
211
+ <p>Default page&#39;s fetch type</p>
212
+
213
+
214
+ </div>
215
+ </div>
216
+ <div class="tags">
217
+
218
+
219
+ </div>
220
+ </dt>
221
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>standard</span><span class='tstring_end'>&#39;</span></span></pre></dd>
222
+
223
+ <dt id="DEFAULT_UUID_ALGORITHM-constant" class="">DEFAULT_UUID_ALGORITHM =
224
+ <div class="docstring">
225
+ <div class="discussion">
226
+
227
+ <p>Default uuid algorithm</p>
228
+
229
+
230
+ </div>
231
+ </div>
232
+ <div class="tags">
233
+
234
+
235
+ </div>
236
+ </dt>
237
+ <dd><pre class="code"><span class='symbol'>:md5</span></pre></dd>
238
+
239
+ <dt id="VALID_UUID_ALGORITHMS-constant" class="">VALID_UUID_ALGORITHMS =
240
+ <div class="docstring">
241
+ <div class="discussion">
242
+
243
+ <p>Valid uuid algorithms</p>
244
+
245
+
246
+ </div>
247
+ </div>
248
+ <div class="tags">
249
+
250
+
251
+ </div>
252
+ </dt>
253
+ <dd><pre class="code"><span class='lbracket'>[</span><span class='symbol'>:md5</span><span class='comma'>,</span> <span class='symbol'>:sha1</span><span class='comma'>,</span> <span class='symbol'>:sha256</span><span class='rbracket'>]</span></pre></dd>
254
+
208
255
  </dl>
209
256
 
210
257
 
@@ -336,8 +383,31 @@ box behavior.</p>
336
383
 
337
384
 
338
385
  <span class="summary_desc"><div class='inline'>
339
- <p>Clean an URL to remove fragment, lowercase schema and host, and sort
340
- query string.</p>
386
+ <p>Clean an URL to remove fragment, lowercase schema and host, and sort query string.</p>
387
+ </div></span>
388
+
389
+ </li>
390
+
391
+
392
+ <li class="public ">
393
+ <span class="summary_signature">
394
+
395
+ <a href="#clean_uri_obj-class_method" title="clean_uri_obj (class method)">.<strong>clean_uri_obj</strong>(raw_url) &#x21d2; URI::HTTPS </a>
396
+
397
+
398
+
399
+ </span>
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+ <span class="summary_desc"><div class='inline'>
410
+ <p>Clean an URL to remove fragment, lowercase schema and host, and sort query string.</p>
341
411
  </div></span>
342
412
 
343
413
  </li>
@@ -346,7 +416,7 @@ query string.</p>
346
416
  <li class="public ">
347
417
  <span class="summary_signature">
348
418
 
349
- <a href="#fake_uuid-class_method" title="fake_uuid (class method)">.<strong>fake_uuid</strong>(seed = nil) &#x21d2; String </a>
419
+ <a href="#fake_uuid-class_method" title="fake_uuid (class method)">.<strong>fake_uuid</strong>(seed = nil, algorithm = nil) &#x21d2; String </a>
350
420
 
351
421
 
352
422
 
@@ -394,7 +464,7 @@ query string.</p>
394
464
  <li class="public ">
395
465
  <span class="summary_signature">
396
466
 
397
- <a href="#output_uuid-class_method" title="output_uuid (class method)">.<strong>output_uuid</strong>(data) &#x21d2; String </a>
467
+ <a href="#output_uuid-class_method" title="output_uuid (class method)">.<strong>output_uuid</strong>(data, uuid_algorithm = nil) &#x21d2; String </a>
398
468
 
399
469
 
400
470
 
@@ -466,8 +536,7 @@ query string.</p>
466
536
 
467
537
 
468
538
  <span class="summary_desc"><div class='inline'>
469
- <p>Specify whenever job id overriding by user is allowed on page or output
470
- insert.</p>
539
+ <p>Specify whenever job id overriding by user is allowed on page or output insert.</p>
471
540
  </div></span>
472
541
 
473
542
  </li>
@@ -491,8 +560,7 @@ insert.</p>
491
560
 
492
561
 
493
562
  <span class="summary_desc"><div class='inline'>
494
- <p>Specify whenever page gid overriding by user is allowed on page or output
495
- insert.</p>
563
+ <p>Specify whenever page gid overriding by user is allowed on page or output insert.</p>
496
564
  </div></span>
497
565
 
498
566
  </li>
@@ -615,6 +683,30 @@ insert.</p>
615
683
  <p>Get current job or create new one from values.</p>
616
684
  </div></span>
617
685
 
686
+ </li>
687
+
688
+
689
+ <li class="public ">
690
+ <span class="summary_signature">
691
+
692
+ <a href="#fake_uuid-instance_method" title="#fake_uuid (instance method)">#<strong>fake_uuid</strong>(seed = nil) &#x21d2; String </a>
693
+
694
+
695
+
696
+ </span>
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+ <span class="summary_desc"><div class='inline'>
707
+ <p>Generate a fake UUID using the configured uuid algorithm.</p>
708
+ </div></span>
709
+
618
710
  </li>
619
711
 
620
712
 
@@ -684,8 +776,7 @@ insert.</p>
684
776
 
685
777
 
686
778
  <span class="summary_desc"><div class='inline'>
687
- <p>Generate a fake UUID based on page data: * url * method * headers *
688
- fetch_type * cookie * no_redirect * body * ua_type.</p>
779
+ <p>Generate a fake UUID based on page data: * url * method * headers * fetch_type * cookie * no_redirect * body * ua_type.</p>
689
780
  </div></span>
690
781
 
691
782
  </li>
@@ -1026,6 +1117,54 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1026
1117
  <p>Set fake scraper_name value.</p>
1027
1118
  </div></span>
1028
1119
 
1120
+ </li>
1121
+
1122
+
1123
+ <li class="public ">
1124
+ <span class="summary_signature">
1125
+
1126
+ <a href="#uuid_algorithm-instance_method" title="#uuid_algorithm (instance method)">#<strong>uuid_algorithm</strong> &#x21d2; Enumerator<sup>?</sup> </a>
1127
+
1128
+
1129
+
1130
+ </span>
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+
1140
+ <span class="summary_desc"><div class='inline'>
1141
+ <p>Current UUID algorithm.</p>
1142
+ </div></span>
1143
+
1144
+ </li>
1145
+
1146
+
1147
+ <li class="public ">
1148
+ <span class="summary_signature">
1149
+
1150
+ <a href="#uuid_algorithm=-instance_method" title="#uuid_algorithm= (instance method)">#<strong>uuid_algorithm=</strong>(value) &#x21d2; Object </a>
1151
+
1152
+
1153
+
1154
+ </span>
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+
1164
+ <span class="summary_desc"><div class='inline'>
1165
+ <p>Set current UUID algorithm value.</p>
1166
+ </div></span>
1167
+
1029
1168
  </li>
1030
1169
 
1031
1170
 
@@ -1149,6 +1288,22 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1149
1288
 
1150
1289
  &mdash; <div class='inline'>
1151
1290
  <p>Specify whenever job id can be overrided on page or output insert.</p>
1291
+ </div>
1292
+
1293
+ </li>
1294
+
1295
+ <li>
1296
+ <span class="name">:uuid_algorithm</span>
1297
+ <span class="type">(<tt>Enumerator</tt>, <tt>nil</tt>)</span>
1298
+ <span class="default">
1299
+
1300
+ &mdash; default:
1301
+ <tt>:md5</tt>
1302
+
1303
+ </span>
1304
+
1305
+ &mdash; <div class='inline'>
1306
+ <p>Specify the algorithm to be used to generate UUID values.</p>
1152
1307
  </div>
1153
1308
 
1154
1309
  </li>
@@ -1163,21 +1318,23 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1163
1318
  <pre class="lines">
1164
1319
 
1165
1320
 
1166
- 266
1167
- 267
1168
- 268
1169
- 269
1170
- 270
1171
- 271
1172
- 272</pre>
1321
+ 380
1322
+ 381
1323
+ 382
1324
+ 383
1325
+ 384
1326
+ 385
1327
+ 386
1328
+ 387</pre>
1173
1329
  </td>
1174
1330
  <td>
1175
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 266</span>
1331
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 380</span>
1176
1332
 
1177
1333
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1178
1334
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_job_id'>job_id</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:job_id</span><span class='rbracket'>]</span>
1179
1335
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scraper_name'>scraper_name</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:scraper_name</span><span class='rbracket'>]</span>
1180
1336
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_page_gid'>page_gid</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:page_gid</span><span class='rbracket'>]</span>
1337
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_uuid_algorithm'>uuid_algorithm</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uuid_algorithm</span><span class='rbracket'>]</span>
1181
1338
  <span class='ivar'>@allow_page_gid_override</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:allow_page_gid_override</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='kw'>false</span> <span class='op'>:</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:allow_page_gid_override</span><span class='rbracket'>]</span>
1182
1339
  <span class='ivar'>@allow_job_id_override</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:allow_job_id_override</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='kw'>false</span> <span class='op'>:</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:allow_job_id_override</span><span class='rbracket'>]</span>
1183
1340
  <span class='kw'>end</span></pre>
@@ -1311,17 +1468,17 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1311
1468
  <pre class="lines">
1312
1469
 
1313
1470
 
1314
- 146
1315
- 147
1316
- 148
1317
- 149
1318
- 150
1319
- 151
1320
- 152
1321
- 153</pre>
1471
+ 243
1472
+ 244
1473
+ 245
1474
+ 246
1475
+ 247
1476
+ 248
1477
+ 249
1478
+ 250</pre>
1322
1479
  </td>
1323
1480
  <td>
1324
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 146</span>
1481
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 243</span>
1325
1482
 
1326
1483
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_build_fake_job'>build_fake_job</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1327
1484
  <span class='id identifier rubyid_job'>job</span> <span class='op'>=</span> <span class='lbrace'>{</span>
@@ -1422,15 +1579,15 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1422
1579
  <pre class="lines">
1423
1580
 
1424
1581
 
1425
- 74
1426
- 75
1427
- 76
1428
- 77
1429
- 78
1430
- 79</pre>
1582
+ 90
1583
+ 91
1584
+ 92
1585
+ 93
1586
+ 94
1587
+ 95</pre>
1431
1588
  </td>
1432
1589
  <td>
1433
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 74</span>
1590
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 90</span>
1434
1591
 
1435
1592
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_build_fake_page'>build_fake_page</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1436
1593
  <span class='id identifier rubyid_page'>page</span> <span class='op'>=</span> <span class='lbrace'>{</span>
@@ -1520,14 +1677,14 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1520
1677
  <pre class="lines">
1521
1678
 
1522
1679
 
1523
- 132
1524
- 133
1525
- 134
1526
- 135
1527
- 136</pre>
1680
+ 229
1681
+ 230
1682
+ 231
1683
+ 232
1684
+ 233</pre>
1528
1685
  </td>
1529
1686
  <td>
1530
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 132</span>
1687
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 229</span>
1531
1688
 
1532
1689
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_build_job'>build_job</span> <span class='id identifier rubyid_job'>job</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1533
1690
  <span class='id identifier rubyid_temp_db'>temp_db</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../DhEasy.html" title="DhEasy (module)">DhEasy</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Core.html" title="DhEasy::Core (module)">Core</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Mock.html" title="DhEasy::Core::Mock (module)">Mock</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeDb (class)">FakeDb</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="DhEasy::Core::Mock::FakeDb#initialize (method)">new</a></span></span> <span class='id identifier rubyid_opts'>opts</span>
@@ -1616,18 +1773,18 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1616
1773
  <pre class="lines">
1617
1774
 
1618
1775
 
1619
- 58
1620
- 59
1621
- 60
1622
- 61
1623
- 62
1624
- 63
1625
- 64
1626
- 65
1627
- 66</pre>
1776
+ 74
1777
+ 75
1778
+ 76
1779
+ 77
1780
+ 78
1781
+ 79
1782
+ 80
1783
+ 81
1784
+ 82</pre>
1628
1785
  </td>
1629
1786
  <td>
1630
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 58</span>
1787
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 74</span>
1631
1788
 
1632
1789
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_build_page'>build_page</span> <span class='id identifier rubyid_page'>page</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1633
1790
  <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
@@ -1705,47 +1862,15 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1705
1862
  <pre class="lines">
1706
1863
 
1707
1864
 
1708
- 87
1709
- 88
1710
- 89
1711
- 90
1712
- 91
1713
- 92
1714
- 93
1715
- 94
1716
- 95
1717
- 96
1718
- 97
1719
- 98
1720
- 99
1721
- 100
1722
- 101
1723
- 102
1724
- 103
1725
- 104
1726
- 105</pre>
1865
+ 129
1866
+ 130
1867
+ 131</pre>
1727
1868
  </td>
1728
1869
  <td>
1729
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 87</span>
1870
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 129</span>
1730
1871
 
1731
1872
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_clean_uri'>clean_uri</span> <span class='id identifier rubyid_raw_url'>raw_url</span>
1732
- <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_raw_url'>raw_url</span><span class='rparen'>)</span>
1733
- <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_hostname'>hostname</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_hostname'>hostname</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span>
1734
- <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>nil</span>
1735
-
1736
- <span class='comment'># Sort query string keys
1737
- </span> <span class='kw'>unless</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1738
- <span class='id identifier rubyid_query_string'>query_string</span> <span class='op'>=</span> <span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='rparen'>)</span>
1739
- <span class='id identifier rubyid_keys'>keys</span> <span class='op'>=</span> <span class='id identifier rubyid_query_string'>query_string</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span>
1740
- <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1741
- <span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='op'>|</span>
1742
- <span class='id identifier rubyid_query_string'>query_string</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
1743
- <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span> <span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span> <span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1744
- <span class='kw'>end</span>
1745
- <span class='kw'>end</span>
1746
- <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>&amp;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1747
- <span class='kw'>end</span>
1748
- <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
1873
+ <span class='id identifier rubyid_clean_uri_obj'>clean_uri_obj</span><span class='lparen'>(</span><span class='id identifier rubyid_raw_url'>raw_url</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
1749
1874
  <span class='kw'>end</span></pre>
1750
1875
  </td>
1751
1876
  </tr>
@@ -1753,9 +1878,9 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1753
1878
  </div>
1754
1879
 
1755
1880
  <div class="method_details ">
1756
- <h3 class="signature " id="fake_uuid-class_method">
1881
+ <h3 class="signature " id="clean_uri_obj-class_method">
1757
1882
 
1758
- .<strong>fake_uuid</strong>(seed = nil) &#x21d2; <tt>String</tt>
1883
+ .<strong>clean_uri_obj</strong>(raw_url) &#x21d2; <tt>URI::HTTPS</tt>
1759
1884
 
1760
1885
 
1761
1886
 
@@ -1764,7 +1889,10 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1764
1889
  </h3><div class="docstring">
1765
1890
  <div class="discussion">
1766
1891
 
1767
- <p>Generate a fake UUID.</p>
1892
+ <p>Clean an URL to remove fragment, lowercase schema and host, and sort</p>
1893
+
1894
+ <pre class="code ruby"><code class="ruby">query string.
1895
+ </code></pre>
1768
1896
 
1769
1897
 
1770
1898
  </div>
@@ -1775,18 +1903,16 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1775
1903
 
1776
1904
  <li>
1777
1905
 
1778
- <span class='name'>seed</span>
1779
-
1906
+ <span class='name'>raw_url</span>
1780
1907
 
1781
- <span class='type'>(<tt>nil</tt>)</span>
1782
1908
 
1909
+ <span class='type'>(<tt>String</tt>)</span>
1783
1910
 
1784
- <em class="default">(defaults to: <tt>nil</tt>)</em>
1785
1911
 
1786
1912
 
1787
1913
  &mdash;
1788
1914
  <div class='inline'>
1789
- <p>Object to use as seed for uuid.</p>
1915
+ <p>URL to clean.</p>
1790
1916
  </div>
1791
1917
 
1792
1918
  </li>
@@ -1799,7 +1925,7 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1799
1925
  <li>
1800
1926
 
1801
1927
 
1802
- <span class='type'>(<tt>String</tt>)</span>
1928
+ <span class='type'>(<tt>URI::HTTPS</tt>)</span>
1803
1929
 
1804
1930
 
1805
1931
 
@@ -1813,17 +1939,47 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1813
1939
  <pre class="lines">
1814
1940
 
1815
1941
 
1816
- 37
1817
- 38
1818
- 39
1819
- 40</pre>
1942
+ 103
1943
+ 104
1944
+ 105
1945
+ 106
1946
+ 107
1947
+ 108
1948
+ 109
1949
+ 110
1950
+ 111
1951
+ 112
1952
+ 113
1953
+ 114
1954
+ 115
1955
+ 116
1956
+ 117
1957
+ 118
1958
+ 119
1959
+ 120
1960
+ 121</pre>
1820
1961
  </td>
1821
1962
  <td>
1822
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 37</span>
1963
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 103</span>
1823
1964
 
1824
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fake_uuid'>fake_uuid</span> <span class='id identifier rubyid_seed'>seed</span> <span class='op'>=</span> <span class='kw'>nil</span>
1825
- <span class='id identifier rubyid_seed'>seed</span> <span class='op'>||=</span> <span class='lparen'>(</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span> <span class='op'>+</span> <span class='id identifier rubyid_rand'>rand</span><span class='rparen'>)</span>
1826
- <span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA1</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span> <span class='id identifier rubyid_seed'>seed</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
1965
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_clean_uri_obj'>clean_uri_obj</span> <span class='id identifier rubyid_raw_url'>raw_url</span>
1966
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_raw_url'>raw_url</span><span class='rparen'>)</span>
1967
+ <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_hostname'>hostname</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_hostname'>hostname</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span>
1968
+ <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>nil</span>
1969
+
1970
+ <span class='comment'># Sort query string keys
1971
+ </span> <span class='kw'>unless</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1972
+ <span class='id identifier rubyid_query_string'>query_string</span> <span class='op'>=</span> <span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='rparen'>)</span>
1973
+ <span class='id identifier rubyid_keys'>keys</span> <span class='op'>=</span> <span class='id identifier rubyid_query_string'>query_string</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span>
1974
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1975
+ <span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='op'>|</span>
1976
+ <span class='id identifier rubyid_query_string'>query_string</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
1977
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span> <span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span> <span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1978
+ <span class='kw'>end</span>
1979
+ <span class='kw'>end</span>
1980
+ <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>&amp;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1981
+ <span class='kw'>end</span>
1982
+ <span class='id identifier rubyid_url'>url</span>
1827
1983
  <span class='kw'>end</span></pre>
1828
1984
  </td>
1829
1985
  </tr>
@@ -1831,9 +1987,9 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1831
1987
  </div>
1832
1988
 
1833
1989
  <div class="method_details ">
1834
- <h3 class="signature " id="new_collection-class_method">
1990
+ <h3 class="signature " id="fake_uuid-class_method">
1835
1991
 
1836
- .<strong>new_collection</strong>(keys, opts = {}) &#x21d2; <tt><span class='object_link'><a href="../SmartCollection.html" title="DhEasy::Core::SmartCollection (class)">DhEasy::Core::SmartCollection</a></span></tt>
1992
+ .<strong>fake_uuid</strong>(seed = nil, algorithm = nil) &#x21d2; <tt>String</tt>
1837
1993
 
1838
1994
 
1839
1995
 
@@ -1842,7 +1998,7 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1842
1998
  </h3><div class="docstring">
1843
1999
  <div class="discussion">
1844
2000
 
1845
- <p>Generate a smart collection with keys and initial values.</p>
2001
+ <p>Generate a fake UUID.</p>
1846
2002
 
1847
2003
 
1848
2004
  </div>
@@ -1853,34 +2009,36 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1853
2009
 
1854
2010
  <li>
1855
2011
 
1856
- <span class='name'>keys</span>
2012
+ <span class='name'>seed</span>
1857
2013
 
1858
2014
 
1859
- <span class='type'>(<tt>Array</tt>)</span>
2015
+ <span class='type'>(<tt>nil</tt>)</span>
2016
+
1860
2017
 
2018
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1861
2019
 
1862
2020
 
1863
2021
  &mdash;
1864
2022
  <div class='inline'>
1865
- <p>Analog to primary keys, combination will be uniq.</p>
2023
+ <p>Object to use as seed for uuid.</p>
1866
2024
  </div>
1867
2025
 
1868
2026
  </li>
1869
2027
 
1870
2028
  <li>
1871
2029
 
1872
- <span class='name'>opts</span>
2030
+ <span class='name'>algorithm</span>
1873
2031
 
1874
2032
 
1875
- <span class='type'>(<tt>Hash</tt>)</span>
2033
+ <span class='type'>(<tt>Enumerator</tt>)</span>
1876
2034
 
1877
2035
 
1878
- <em class="default">(defaults to: <tt>{}</tt>)</em>
2036
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1879
2037
 
1880
2038
 
1881
2039
  &mdash;
1882
2040
  <div class='inline'>
1883
- <p>Configuration options (see DhEasy::Core::SmartCollection#initialize).</p>
2041
+ <p>(nil) Algorithm to use: sha256 (default), sha1, md5.</p>
1884
2042
  </div>
1885
2043
 
1886
2044
  </li>
@@ -1893,7 +2051,7 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1893
2051
  <li>
1894
2052
 
1895
2053
 
1896
- <span class='type'>(<tt><span class='object_link'><a href="../SmartCollection.html" title="DhEasy::Core::SmartCollection (class)">DhEasy::Core::SmartCollection</a></span></tt>)</span>
2054
+ <span class='type'>(<tt>String</tt>)</span>
1897
2055
 
1898
2056
 
1899
2057
 
@@ -1907,14 +2065,124 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1907
2065
  <pre class="lines">
1908
2066
 
1909
2067
 
1910
- 28
1911
- 29
1912
- 30</pre>
2068
+ 44
2069
+ 45
2070
+ 46
2071
+ 47
2072
+ 48
2073
+ 49
2074
+ 50
2075
+ 51
2076
+ 52
2077
+ 53
2078
+ 54
2079
+ 55</pre>
1913
2080
  </td>
1914
2081
  <td>
1915
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 28</span>
2082
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 44</span>
1916
2083
 
1917
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new_collection'>new_collection</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
2084
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fake_uuid'>fake_uuid</span> <span class='id identifier rubyid_seed'>seed</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_algorithm'>algorithm</span> <span class='op'>=</span> <span class='kw'>nil</span>
2085
+ <span class='id identifier rubyid_seed'>seed</span> <span class='op'>||=</span> <span class='lparen'>(</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span> <span class='op'>+</span> <span class='id identifier rubyid_rand'>rand</span><span class='rparen'>)</span>
2086
+ <span class='id identifier rubyid_algorithm'>algorithm</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="#DEFAULT_UUID_ALGORITHM-constant" title="DhEasy::Core::Mock::FakeDb::DEFAULT_UUID_ALGORITHM (constant)">DEFAULT_UUID_ALGORITHM</a></span></span>
2087
+ <span class='kw'>case</span> <span class='id identifier rubyid_algorithm'>algorithm</span>
2088
+ <span class='kw'>when</span> <span class='symbol'>:sha256</span>
2089
+ <span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA256</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span> <span class='id identifier rubyid_seed'>seed</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
2090
+ <span class='kw'>when</span> <span class='symbol'>:sha1</span>
2091
+ <span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA1</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span> <span class='id identifier rubyid_seed'>seed</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
2092
+ <span class='kw'>else</span>
2093
+ <span class='const'>Digest</span><span class='op'>::</span><span class='const'>MD5</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span> <span class='id identifier rubyid_seed'>seed</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
2094
+ <span class='kw'>end</span>
2095
+ <span class='kw'>end</span></pre>
2096
+ </td>
2097
+ </tr>
2098
+ </table>
2099
+ </div>
2100
+
2101
+ <div class="method_details ">
2102
+ <h3 class="signature " id="new_collection-class_method">
2103
+
2104
+ .<strong>new_collection</strong>(keys, opts = {}) &#x21d2; <tt><span class='object_link'><a href="../SmartCollection.html" title="DhEasy::Core::SmartCollection (class)">DhEasy::Core::SmartCollection</a></span></tt>
2105
+
2106
+
2107
+
2108
+
2109
+
2110
+ </h3><div class="docstring">
2111
+ <div class="discussion">
2112
+
2113
+ <p>Generate a smart collection with keys and initial values.</p>
2114
+
2115
+
2116
+ </div>
2117
+ </div>
2118
+ <div class="tags">
2119
+ <p class="tag_title">Parameters:</p>
2120
+ <ul class="param">
2121
+
2122
+ <li>
2123
+
2124
+ <span class='name'>keys</span>
2125
+
2126
+
2127
+ <span class='type'>(<tt>Array</tt>)</span>
2128
+
2129
+
2130
+
2131
+ &mdash;
2132
+ <div class='inline'>
2133
+ <p>Analog to primary keys, combination will be uniq.</p>
2134
+ </div>
2135
+
2136
+ </li>
2137
+
2138
+ <li>
2139
+
2140
+ <span class='name'>opts</span>
2141
+
2142
+
2143
+ <span class='type'>(<tt>Hash</tt>)</span>
2144
+
2145
+
2146
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
2147
+
2148
+
2149
+ &mdash;
2150
+ <div class='inline'>
2151
+ <p>Configuration options (see DhEasy::Core::SmartCollection#initialize).</p>
2152
+ </div>
2153
+
2154
+ </li>
2155
+
2156
+ </ul>
2157
+
2158
+ <p class="tag_title">Returns:</p>
2159
+ <ul class="return">
2160
+
2161
+ <li>
2162
+
2163
+
2164
+ <span class='type'>(<tt><span class='object_link'><a href="../SmartCollection.html" title="DhEasy::Core::SmartCollection (class)">DhEasy::Core::SmartCollection</a></span></tt>)</span>
2165
+
2166
+
2167
+
2168
+ </li>
2169
+
2170
+ </ul>
2171
+
2172
+ </div><table class="source_code">
2173
+ <tr>
2174
+ <td>
2175
+ <pre class="lines">
2176
+
2177
+
2178
+ 34
2179
+ 35
2180
+ 36</pre>
2181
+ </td>
2182
+ <td>
2183
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 34</span>
2184
+
2185
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new_collection'>new_collection</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1918
2186
  <span class='const'><span class='object_link'><a href="../../../DhEasy.html" title="DhEasy (module)">DhEasy</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Core.html" title="DhEasy::Core (module)">Core</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SmartCollection.html" title="DhEasy::Core::SmartCollection (class)">SmartCollection</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../SmartCollection.html#initialize-instance_method" title="DhEasy::Core::SmartCollection#initialize (method)">new</a></span></span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span>
1919
2187
  <span class='kw'>end</span></pre>
1920
2188
  </td>
@@ -1925,7 +2193,7 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1925
2193
  <div class="method_details ">
1926
2194
  <h3 class="signature " id="output_uuid-class_method">
1927
2195
 
1928
- .<strong>output_uuid</strong>(data) &#x21d2; <tt>String</tt>
2196
+ .<strong>output_uuid</strong>(data, uuid_algorithm = nil) &#x21d2; <tt>String</tt>
1929
2197
 
1930
2198
 
1931
2199
 
@@ -1955,6 +2223,24 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1955
2223
  &mdash;
1956
2224
  <div class='inline'>
1957
2225
  <p>Output data.</p>
2226
+ </div>
2227
+
2228
+ </li>
2229
+
2230
+ <li>
2231
+
2232
+ <span class='name'>uuid_algorithm</span>
2233
+
2234
+
2235
+ <span class='type'>(<tt>Enumerator</tt>)</span>
2236
+
2237
+
2238
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2239
+
2240
+
2241
+ &mdash;
2242
+ <div class='inline'>
2243
+ <p>(nil) Algorithm to use: sha256 (default), sha1, md5.</p>
1958
2244
  </div>
1959
2245
 
1960
2246
  </li>
@@ -1981,17 +2267,17 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
1981
2267
  <pre class="lines">
1982
2268
 
1983
2269
 
1984
- 47
1985
- 48
1986
- 49
1987
- 50</pre>
2270
+ 63
2271
+ 64
2272
+ 65
2273
+ 66</pre>
1988
2274
  </td>
1989
2275
  <td>
1990
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 47</span>
2276
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 63</span>
1991
2277
 
1992
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_output_uuid'>output_uuid</span> <span class='id identifier rubyid_data'>data</span>
2278
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_output_uuid'>output_uuid</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_uuid_algorithm'>uuid_algorithm</span> <span class='op'>=</span> <span class='kw'>nil</span>
1993
2279
  <span class='id identifier rubyid_seed'>seed</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^[^_]</span><span class='regexp_end'>/</span></span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span>
1994
- <span class='id identifier rubyid_fake_uuid'>fake_uuid</span> <span class='id identifier rubyid_seed'>seed</span>
2280
+ <span class='id identifier rubyid_fake_uuid'>fake_uuid</span> <span class='id identifier rubyid_seed'>seed</span><span class='comma'>,</span> <span class='id identifier rubyid_uuid_algorithm'>uuid_algorithm</span>
1995
2281
  <span class='kw'>end</span></pre>
1996
2282
  </td>
1997
2283
  </tr>
@@ -2059,17 +2345,17 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2059
2345
  <pre class="lines">
2060
2346
 
2061
2347
 
2062
- 160
2063
- 161
2064
- 162
2065
- 163</pre>
2348
+ 257
2349
+ 258
2350
+ 259
2351
+ 260</pre>
2066
2352
  </td>
2067
2353
  <td>
2068
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 160</span>
2354
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 257</span>
2069
2355
 
2070
2356
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_time_stamp'>time_stamp</span> <span class='id identifier rubyid_time'>time</span> <span class='op'>=</span> <span class='kw'>nil</span>
2071
2357
  <span class='id identifier rubyid_time'>time</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_time'>time</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2072
- <span class='id identifier rubyid_time'>time</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='period'>.</span><span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%Y-%m-%dT%H:%M:%SZ</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
2358
+ <span class='id identifier rubyid_time'>time</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='period'>.</span><span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%FT%T.%6N</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>[0.]+\Z</span><span class='regexp_end'>/</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Z</span><span class='tstring_end'>&quot;</span></span>
2073
2359
  <span class='kw'>end</span></pre>
2074
2360
  </td>
2075
2361
  </tr>
@@ -2129,12 +2415,12 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2129
2415
  <pre class="lines">
2130
2416
 
2131
2417
 
2132
- 252
2133
- 253
2134
- 254</pre>
2418
+ 364
2419
+ 365
2420
+ 366</pre>
2135
2421
  </td>
2136
2422
  <td>
2137
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 252</span>
2423
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 364</span>
2138
2424
 
2139
2425
  <span class='kw'>def</span> <span class='id identifier rubyid_allow_job_id_override?'>allow_job_id_override?</span>
2140
2426
  <span class='ivar'>@allow_job_id_override</span> <span class='op'>||=</span> <span class='kw'>false</span>
@@ -2191,12 +2477,12 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2191
2477
  <pre class="lines">
2192
2478
 
2193
2479
 
2194
- 234
2195
- 235
2196
- 236</pre>
2480
+ 346
2481
+ 347
2482
+ 348</pre>
2197
2483
  </td>
2198
2484
  <td>
2199
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 234</span>
2485
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 346</span>
2200
2486
 
2201
2487
  <span class='kw'>def</span> <span class='id identifier rubyid_allow_page_gid_override?'>allow_page_gid_override?</span>
2202
2488
  <span class='ivar'>@allow_page_gid_override</span> <span class='op'>||=</span> <span class='kw'>false</span>
@@ -2232,12 +2518,12 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2232
2518
  <pre class="lines">
2233
2519
 
2234
2520
 
2235
- 244
2236
- 245
2237
- 246</pre>
2521
+ 356
2522
+ 357
2523
+ 358</pre>
2238
2524
  </td>
2239
2525
  <td>
2240
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 244</span>
2526
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 356</span>
2241
2527
 
2242
2528
  <span class='kw'>def</span> <span class='id identifier rubyid_disable_job_id_override'>disable_job_id_override</span>
2243
2529
  <span class='ivar'>@allow_job_id_override</span> <span class='op'>=</span> <span class='kw'>false</span>
@@ -2273,12 +2559,12 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2273
2559
  <pre class="lines">
2274
2560
 
2275
2561
 
2276
- 226
2277
- 227
2278
- 228</pre>
2562
+ 338
2563
+ 339
2564
+ 340</pre>
2279
2565
  </td>
2280
2566
  <td>
2281
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 226</span>
2567
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 338</span>
2282
2568
 
2283
2569
  <span class='kw'>def</span> <span class='id identifier rubyid_disable_page_gid_override'>disable_page_gid_override</span>
2284
2570
  <span class='ivar'>@allow_page_gid_override</span> <span class='op'>=</span> <span class='kw'>false</span>
@@ -2314,12 +2600,12 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2314
2600
  <pre class="lines">
2315
2601
 
2316
2602
 
2317
- 239
2318
- 240
2319
- 241</pre>
2603
+ 351
2604
+ 352
2605
+ 353</pre>
2320
2606
  </td>
2321
2607
  <td>
2322
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 239</span>
2608
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 351</span>
2323
2609
 
2324
2610
  <span class='kw'>def</span> <span class='id identifier rubyid_enable_job_id_override'>enable_job_id_override</span>
2325
2611
  <span class='ivar'>@allow_job_id_override</span> <span class='op'>=</span> <span class='kw'>true</span>
@@ -2355,12 +2641,12 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2355
2641
  <pre class="lines">
2356
2642
 
2357
2643
 
2358
- 221
2359
- 222
2360
- 223</pre>
2644
+ 333
2645
+ 334
2646
+ 335</pre>
2361
2647
  </td>
2362
2648
  <td>
2363
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 221</span>
2649
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 333</span>
2364
2650
 
2365
2651
  <span class='kw'>def</span> <span class='id identifier rubyid_enable_page_gid_override'>enable_page_gid_override</span>
2366
2652
  <span class='ivar'>@allow_page_gid_override</span> <span class='op'>=</span> <span class='kw'>true</span>
@@ -2431,21 +2717,21 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2431
2717
  <pre class="lines">
2432
2718
 
2433
2719
 
2434
- 170
2435
- 171
2436
- 172
2437
- 173
2438
- 174
2439
- 175
2440
- 176
2441
- 177
2442
- 178
2443
- 179
2444
- 180
2445
- 181</pre>
2720
+ 267
2721
+ 268
2722
+ 269
2723
+ 270
2724
+ 271
2725
+ 272
2726
+ 273
2727
+ 274
2728
+ 275
2729
+ 276
2730
+ 277
2731
+ 278</pre>
2446
2732
  </td>
2447
2733
  <td>
2448
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 170</span>
2734
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 267</span>
2449
2735
 
2450
2736
  <span class='kw'>def</span> <span class='id identifier rubyid_ensure_job'>ensure_job</span> <span class='id identifier rubyid_target_job_id'>target_job_id</span> <span class='op'>=</span> <span class='kw'>nil</span>
2451
2737
  <span class='id identifier rubyid_target_job_id'>target_job_id</span> <span class='op'>=</span> <span class='id identifier rubyid_job_id'>job_id</span> <span class='kw'>if</span> <span class='id identifier rubyid_target_job_id'>target_job_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
@@ -2462,6 +2748,82 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2462
2748
  </td>
2463
2749
  </tr>
2464
2750
  </table>
2751
+ </div>
2752
+
2753
+ <div class="method_details ">
2754
+ <h3 class="signature " id="fake_uuid-instance_method">
2755
+
2756
+ #<strong>fake_uuid</strong>(seed = nil) &#x21d2; <tt>String</tt>
2757
+
2758
+
2759
+
2760
+
2761
+
2762
+ </h3><div class="docstring">
2763
+ <div class="discussion">
2764
+
2765
+ <p>Generate a fake UUID using the configured uuid algorithm.</p>
2766
+
2767
+
2768
+ </div>
2769
+ </div>
2770
+ <div class="tags">
2771
+ <p class="tag_title">Parameters:</p>
2772
+ <ul class="param">
2773
+
2774
+ <li>
2775
+
2776
+ <span class='name'>seed</span>
2777
+
2778
+
2779
+ <span class='type'>(<tt>nil</tt>)</span>
2780
+
2781
+
2782
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2783
+
2784
+
2785
+ &mdash;
2786
+ <div class='inline'>
2787
+ <p>Object to use as seed for uuid.</p>
2788
+ </div>
2789
+
2790
+ </li>
2791
+
2792
+ </ul>
2793
+
2794
+ <p class="tag_title">Returns:</p>
2795
+ <ul class="return">
2796
+
2797
+ <li>
2798
+
2799
+
2800
+ <span class='type'>(<tt>String</tt>)</span>
2801
+
2802
+
2803
+
2804
+ </li>
2805
+
2806
+ </ul>
2807
+
2808
+ </div><table class="source_code">
2809
+ <tr>
2810
+ <td>
2811
+ <pre class="lines">
2812
+
2813
+
2814
+ 394
2815
+ 395
2816
+ 396</pre>
2817
+ </td>
2818
+ <td>
2819
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 394</span>
2820
+
2821
+ <span class='kw'>def</span> <span class='id identifier rubyid_fake_uuid'>fake_uuid</span> <span class='id identifier rubyid_seed'>seed</span> <span class='op'>=</span> <span class='kw'>nil</span>
2822
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_fake_uuid'>fake_uuid</span> <span class='id identifier rubyid_seed'>seed</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_uuid_algorithm'>uuid_algorithm</span>
2823
+ <span class='kw'>end</span></pre>
2824
+ </td>
2825
+ </tr>
2826
+ </table>
2465
2827
  </div>
2466
2828
 
2467
2829
  <div class="method_details ">
@@ -2503,12 +2865,12 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2503
2865
  <pre class="lines">
2504
2866
 
2505
2867
 
2506
- 284
2507
- 285
2508
- 286</pre>
2868
+ 408
2869
+ 409
2870
+ 410</pre>
2509
2871
  </td>
2510
2872
  <td>
2511
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 284</span>
2873
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 408</span>
2512
2874
 
2513
2875
  <span class='kw'>def</span> <span class='id identifier rubyid_generate_job_id'>generate_job_id</span>
2514
2876
  <span class='id identifier rubyid_jobs'>jobs</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'>&lt;</span> <span class='int'>1</span> <span class='op'>?</span> <span class='int'>1</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='id identifier rubyid_jobs'>jobs</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span><span class='id identifier rubyid_b'>b</span><span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>job_id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>&lt;=&gt;</span> <span class='id identifier rubyid_b'>b</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>job_id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>job_id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='int'>1</span><span class='rparen'>)</span>
@@ -2577,17 +2939,17 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2577
2939
  <pre class="lines">
2578
2940
 
2579
2941
 
2580
- 407
2581
- 408
2582
- 409
2583
- 410</pre>
2942
+ 600
2943
+ 601
2944
+ 602
2945
+ 603</pre>
2584
2946
  </td>
2585
2947
  <td>
2586
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 407</span>
2948
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 600</span>
2587
2949
 
2588
2950
  <span class='kw'>def</span> <span class='id identifier rubyid_generate_output_id'>generate_output_id</span> <span class='id identifier rubyid_data'>data</span>
2589
2951
  <span class='comment'># Generate random UUID to match Datahen behavior
2590
- </span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_fake_uuid'>fake_uuid</span>
2952
+ </span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fake_uuid'>fake_uuid</span>
2591
2953
  <span class='kw'>end</span></pre>
2592
2954
  </td>
2593
2955
  </tr>
@@ -2663,47 +3025,85 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2663
3025
  <pre class="lines">
2664
3026
 
2665
3027
 
2666
- 331
2667
- 332
2668
- 333
2669
- 334
2670
- 335
2671
- 336
2672
- 337
2673
- 338
2674
- 339
2675
- 340
2676
- 341
2677
- 342
2678
- 343
2679
- 344
2680
- 345
2681
- 346
2682
- 347
2683
- 348
2684
- 349</pre>
3028
+ 455
3029
+ 456
3030
+ 457
3031
+ 458
3032
+ 459
3033
+ 460
3034
+ 461
3035
+ 462
3036
+ 463
3037
+ 464
3038
+ 465
3039
+ 466
3040
+ 467
3041
+ 468
3042
+ 469
3043
+ 470
3044
+ 471
3045
+ 472
3046
+ 473
3047
+ 474
3048
+ 475
3049
+ 476
3050
+ 477
3051
+ 478
3052
+ 479
3053
+ 480
3054
+ 481
3055
+ 482
3056
+ 483
3057
+ 484
3058
+ 485
3059
+ 486
3060
+ 487
3061
+ 488
3062
+ 489
3063
+ 490
3064
+ 491
3065
+ 492</pre>
2685
3066
  </td>
2686
3067
  <td>
2687
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 331</span>
3068
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 455</span>
2688
3069
 
2689
3070
  <span class='kw'>def</span> <span class='id identifier rubyid_generate_page_gid'>generate_page_gid</span> <span class='id identifier rubyid_page_data'>page_data</span>
2690
- <span class='id identifier rubyid_fields'>fields</span> <span class='op'>=</span> <span class='lbracket'>[</span>
2691
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2692
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>method</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2693
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>headers</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2694
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>fetch_type</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2695
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>cookie</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2696
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>no_redirect</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2697
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>body</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2698
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ua_type</span><span class='tstring_end'>&#39;</span></span>
2699
- <span class='rbracket'>]</span>
2700
- <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span><span class='id identifier rubyid_fields'>fields</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_k'>k</span><span class='rbrace'>}</span>
2701
- <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_clean_uri'>clean_uri</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
2702
- <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>headers</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_format_headers'>format_headers</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>headers</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
2703
- <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>cookie</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../DhEasy.html" title="DhEasy (module)">DhEasy</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Core.html" title="DhEasy::Core (module)">Core</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Helper.html" title="DhEasy::Core::Helper (module)">Helper</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Helper/Cookie.html" title="DhEasy::Core::Helper::Cookie (class)">Cookie</a></span></span><span class='period'>.</span><span class='id identifier rubyid_parse_from_request'><span class='object_link'><a href="../Helper/Cookie.html#parse_from_request-class_method" title="DhEasy::Core::Helper::Cookie.parse_from_request (method)">parse_from_request</a></span></span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>cookie</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>cookie</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2704
- <span class='id identifier rubyid_seed'>seed</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span><span class='id identifier rubyid_fields'>fields</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_k'>k</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span>
2705
- <span class='id identifier rubyid_checksum'>checksum</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_fake_uuid'>fake_uuid</span> <span class='id identifier rubyid_seed'>seed</span>
2706
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_hostname'>hostname</span><span class='embexpr_end'>}</span><span class='tstring_content'>-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_checksum'>checksum</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3071
+ <span class='comment'># ensure page url
3072
+ </span> <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span> <span class='op'>===</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
3073
+
3074
+ <span class='comment'># calculate extra fields, keep field order to match datahen
3075
+ </span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
3076
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>method:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>method</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3077
+ <span class='id identifier rubyid_no_url_encode'>no_url_encode</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='op'>!</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>no_url_encode</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>no_url_encode</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
3078
+ <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_clean_uri_obj'>clean_uri_obj</span><span class='lparen'>(</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
3079
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_no_url_encode'>no_url_encode</span> <span class='op'>?</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_lstrip'>lstrip</span> <span class='op'>:</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
3080
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>url:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3081
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_format_headers'>format_headers</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>headers</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3082
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>headers:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_headers'>headers</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3083
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>body:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>body</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3084
+ <span class='id identifier rubyid_no_redirect'>no_redirect</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='op'>!</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>no_redirect</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>no_redirect</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
3085
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>no_redirect:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_no_redirect'>no_redirect</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3086
+ <span class='id identifier rubyid_ua_type'>ua_type</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ua_type</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>===</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>desktop</span><span class='tstring_end'>&#39;</span></span> <span class='op'>:</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ua_type</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3087
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ua_type:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ua_type'>ua_type</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3088
+
3089
+ <span class='comment'># complex fields
3090
+ </span> <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>fetch_type:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>fetch_type</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_is_default_fetch_type?'>is_default_fetch_type?</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>fetch_type</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3091
+ <span class='comment'># keep this cookie logic to match datahen
3092
+ </span> <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cookie:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>cookie</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>;\s*</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>cookie</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
3093
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>http2:true</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>http2</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>http2</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>http2</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3094
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>driverName:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>driver</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>name</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_is_driver_empty?'>is_driver_empty?</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>driver</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3095
+ <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_is_display_empty?'>is_display_empty?</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3096
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>display:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>width</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>x</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>height</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3097
+ <span class='kw'>end</span>
3098
+ <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_is_screenshot_empty?'>is_screenshot_empty?</span> <span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>screenshot</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3099
+ <span class='id identifier rubyid_checksum'>checksum</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fake_uuid'>fake_uuid</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_generate'>generate</span><span class='lparen'>(</span><span class='id identifier rubyid_page_data'>page_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>screenshot</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
3100
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>screenshot:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_checksum'>checksum</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3101
+ <span class='kw'>end</span>
3102
+
3103
+ <span class='comment'># generate GID
3104
+ </span> <span class='id identifier rubyid_seed'>seed</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>|</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
3105
+ <span class='id identifier rubyid_checksum'>checksum</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fake_uuid'>fake_uuid</span> <span class='id identifier rubyid_seed'>seed</span>
3106
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_hostname'>hostname</span><span class='embexpr_end'>}</span><span class='tstring_content'>-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_checksum'>checksum</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
2707
3107
  <span class='kw'>end</span></pre>
2708
3108
  </td>
2709
3109
  </tr>
@@ -2749,12 +3149,12 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2749
3149
  <pre class="lines">
2750
3150
 
2751
3151
 
2752
- 277
2753
- 278
2754
- 279</pre>
3152
+ 401
3153
+ 402
3154
+ 403</pre>
2755
3155
  </td>
2756
3156
  <td>
2757
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 277</span>
3157
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 401</span>
2758
3158
 
2759
3159
  <span class='kw'>def</span> <span class='id identifier rubyid_generate_scraper_name'>generate_scraper_name</span>
2760
3160
  <span class='const'>Faker</span><span class='op'>::</span><span class='const'>Internet</span><span class='period'>.</span><span class='id identifier rubyid_unique'>unique</span><span class='period'>.</span><span class='id identifier rubyid_slug'>slug</span>
@@ -2803,12 +3203,12 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2803
3203
  <pre class="lines">
2804
3204
 
2805
3205
 
2806
- 198
2807
- 199
2808
- 200</pre>
3206
+ 295
3207
+ 296
3208
+ 297</pre>
2809
3209
  </td>
2810
3210
  <td>
2811
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 198</span>
3211
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 295</span>
2812
3212
 
2813
3213
  <span class='kw'>def</span> <span class='id identifier rubyid_job_id'>job_id</span>
2814
3214
  <span class='ivar'>@job_id</span> <span class='op'>||=</span> <span class='id identifier rubyid_generate_job_id'>generate_job_id</span>
@@ -2844,14 +3244,14 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2844
3244
  <pre class="lines">
2845
3245
 
2846
3246
 
2847
- 203
2848
- 204
2849
- 205
2850
- 206
2851
- 207</pre>
3247
+ 300
3248
+ 301
3249
+ 302
3250
+ 303
3251
+ 304</pre>
2852
3252
  </td>
2853
3253
  <td>
2854
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 203</span>
3254
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 300</span>
2855
3255
 
2856
3256
  <span class='kw'>def</span> <span class='id identifier rubyid_job_id='>job_id=</span> <span class='id identifier rubyid_value'>value</span>
2857
3257
  <span class='ivar'>@job_id</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
@@ -2902,22 +3302,22 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2902
3302
  <pre class="lines">
2903
3303
 
2904
3304
 
2905
- 304
2906
- 305
2907
- 306
2908
- 307
2909
- 308
2910
- 309
2911
- 310
2912
- 311
2913
- 312
2914
- 313
2915
- 314
2916
- 315
2917
- 316</pre>
3305
+ 428
3306
+ 429
3307
+ 430
3308
+ 431
3309
+ 432
3310
+ 433
3311
+ 434
3312
+ 435
3313
+ 436
3314
+ 437
3315
+ 438
3316
+ 439
3317
+ 440</pre>
2918
3318
  </td>
2919
3319
  <td>
2920
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 304</span>
3320
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 428</span>
2921
3321
 
2922
3322
  <span class='kw'>def</span> <span class='id identifier rubyid_jobs'>jobs</span>
2923
3323
  <span class='kw'>return</span> <span class='ivar'>@jobs</span> <span class='kw'>unless</span> <span class='ivar'>@jobs</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
@@ -2976,28 +3376,28 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
2976
3376
  <pre class="lines">
2977
3377
 
2978
3378
 
2979
- 428
2980
- 429
2981
- 430
2982
- 431
2983
- 432
2984
- 433
2985
- 434
2986
- 435
2987
- 436
2988
- 437
2989
- 438
2990
- 439
2991
- 440
2992
- 441
2993
- 442
2994
- 443
2995
- 444
2996
- 445
2997
- 446</pre>
3379
+ 621
3380
+ 622
3381
+ 623
3382
+ 624
3383
+ 625
3384
+ 626
3385
+ 627
3386
+ 628
3387
+ 629
3388
+ 630
3389
+ 631
3390
+ 632
3391
+ 633
3392
+ 634
3393
+ 635
3394
+ 636
3395
+ 637
3396
+ 638
3397
+ 639</pre>
2998
3398
  </td>
2999
3399
  <td>
3000
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 428</span>
3400
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 621</span>
3001
3401
 
3002
3402
  <span class='kw'>def</span> <span class='id identifier rubyid_outputs'>outputs</span>
3003
3403
  <span class='kw'>return</span> <span class='ivar'>@outputs</span> <span class='kw'>unless</span> <span class='ivar'>@outputs</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
@@ -3062,15 +3462,15 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
3062
3462
  <pre class="lines">
3063
3463
 
3064
3464
 
3065
- 211
3066
- 212
3067
- 213</pre>
3465
+ 308
3466
+ 309
3467
+ 310</pre>
3068
3468
  </td>
3069
3469
  <td>
3070
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 211</span>
3470
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 308</span>
3071
3471
 
3072
3472
  <span class='kw'>def</span> <span class='id identifier rubyid_page_gid'>page_gid</span>
3073
- <span class='ivar'>@page_gid</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_fake_uuid'>fake_uuid</span>
3473
+ <span class='ivar'>@page_gid</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fake_uuid'>fake_uuid</span>
3074
3474
  <span class='kw'>end</span></pre>
3075
3475
  </td>
3076
3476
  </tr>
@@ -3103,12 +3503,12 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
3103
3503
  <pre class="lines">
3104
3504
 
3105
3505
 
3106
- 216
3107
- 217
3108
- 218</pre>
3506
+ 313
3507
+ 314
3508
+ 315</pre>
3109
3509
  </td>
3110
3510
  <td>
3111
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 216</span>
3511
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 313</span>
3112
3512
 
3113
3513
  <span class='kw'>def</span> <span class='id identifier rubyid_page_gid='>page_gid=</span> <span class='id identifier rubyid_value'>value</span>
3114
3514
  <span class='ivar'>@page_gid</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
@@ -3133,8 +3533,7 @@ fetch_type * cookie * no_redirect * body * ua_type.</p>
3133
3533
  <div class="note notetag">
3134
3534
  <strong>Note:</strong>
3135
3535
  <div class='inline'>
3136
- <p>Page gid will be replaced on insert by an auto generated uuid unless page
3137
- gid overriding is enabled (see #allow_page_gid_override?)</p>
3536
+ <p>Page gid will be replaced on insert by an auto generated uuid unless page gid overriding is enabled (see #allow_page_gid_override?)</p>
3138
3537
  </div>
3139
3538
  </div>
3140
3539
 
@@ -3166,45 +3565,91 @@ gid overriding is enabled (see #allow_page_gid_override?)</p>
3166
3565
  <pre class="lines">
3167
3566
 
3168
3567
 
3169
- 380
3170
- 381
3171
- 382
3172
- 383
3173
- 384
3174
- 385
3175
- 386
3176
- 387
3177
- 388
3178
- 389
3179
- 390
3180
- 391
3181
- 392
3182
- 393
3183
- 394
3184
- 395
3185
- 396
3186
- 397
3187
- 398
3188
- 399
3189
- 400</pre>
3568
+ 550
3569
+ 551
3570
+ 552
3571
+ 553
3572
+ 554
3573
+ 555
3574
+ 556
3575
+ 557
3576
+ 558
3577
+ 559
3578
+ 560
3579
+ 561
3580
+ 562
3581
+ 563
3582
+ 564
3583
+ 565
3584
+ 566
3585
+ 567
3586
+ 568
3587
+ 569
3588
+ 570
3589
+ 571
3590
+ 572
3591
+ 573
3592
+ 574
3593
+ 575
3594
+ 576
3595
+ 577
3596
+ 578
3597
+ 579
3598
+ 580
3599
+ 581
3600
+ 582
3601
+ 583
3602
+ 584
3603
+ 585
3604
+ 586
3605
+ 587
3606
+ 588
3607
+ 589
3608
+ 590
3609
+ 591
3610
+ 592
3611
+ 593</pre>
3190
3612
  </td>
3191
3613
  <td>
3192
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 380</span>
3614
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 550</span>
3193
3615
 
3194
3616
  <span class='kw'>def</span> <span class='id identifier rubyid_pages'>pages</span>
3195
3617
  <span class='kw'>return</span> <span class='ivar'>@pages</span> <span class='kw'>unless</span> <span class='ivar'>@page</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
3196
3618
 
3619
+ <span class='id identifier rubyid_defaults'>defaults</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_page_defaults'>page_defaults</span>
3197
3620
  <span class='id identifier rubyid_collection'>collection</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_new_collection'>new_collection</span> <span class='const'><span class='object_link'><a href="#PAGE_KEYS-constant" title="DhEasy::Core::Mock::FakeDb::PAGE_KEYS (constant)">PAGE_KEYS</a></span></span><span class='comma'>,</span>
3198
- <span class='label'>defaults:</span> <span class='id identifier rubyid_page_defaults'>page_defaults</span>
3621
+ <span class='label'>defaults:</span> <span class='id identifier rubyid_defaults'>defaults</span>
3199
3622
  <span class='id identifier rubyid_collection'>collection</span><span class='period'>.</span><span class='id identifier rubyid_bind_event'>bind_event</span><span class='lparen'>(</span><span class='symbol'>:before_defaults</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_collection'>collection</span><span class='comma'>,</span> <span class='id identifier rubyid_raw_item'>raw_item</span><span class='op'>|</span>
3200
3623
  <span class='id identifier rubyid_item'>item</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../DhEasy.html" title="DhEasy (module)">DhEasy</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Core.html" title="DhEasy::Core (module)">Core</a></span></span><span class='period'>.</span><span class='id identifier rubyid_deep_stringify_keys'><span class='object_link'><a href="../../Core.html#deep_stringify_keys-class_method" title="DhEasy::Core.deep_stringify_keys (method)">deep_stringify_keys</a></span></span> <span class='id identifier rubyid_raw_item'>raw_item</span>
3624
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>driver</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>driver</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
3625
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>driver</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_defaults'>defaults</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>driver</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>driver</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3626
+ <span class='kw'>end</span>
3627
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
3628
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_defaults'>defaults</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3629
+ <span class='kw'>end</span>
3630
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>screenshot</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>screenshot</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
3631
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>screenshot</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_defaults'>defaults</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>screenshot</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>screenshot</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3632
+ <span class='kw'>end</span>
3201
3633
  <span class='id identifier rubyid_item'>item</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>job_id</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_allow_job_id_override?'>allow_job_id_override?</span>
3202
3634
  <span class='id identifier rubyid_item'>item</span>
3203
3635
  <span class='kw'>end</span>
3204
3636
  <span class='id identifier rubyid_collection'>collection</span><span class='period'>.</span><span class='id identifier rubyid_bind_event'>bind_event</span><span class='lparen'>(</span><span class='symbol'>:before_insert</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_collection'>collection</span><span class='comma'>,</span> <span class='id identifier rubyid_item'>item</span><span class='comma'>,</span> <span class='id identifier rubyid_match'>match</span><span class='op'>|</span>
3637
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>driver</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_is_driver_empty?'>is_driver_empty?</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>driver</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3638
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_is_display_empty?'>is_display_empty?</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3639
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>screenshot</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_is_screenshot_empty?'>is_screenshot_empty?</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>screenshot</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3640
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>headers</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_is_hash_empty?'>is_hash_empty?</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>headers</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3641
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>vars</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_is_hash_empty?'>is_hash_empty?</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>vars</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
3642
+ <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_clean_uri_obj'>clean_uri_obj</span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
3643
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>hostname</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_hostname'>hostname</span>
3644
+ <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='kw'>nil</span>
3205
3645
  <span class='kw'>if</span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>gid</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='op'>!</span><span class='id identifier rubyid_allow_page_gid_override?'>allow_page_gid_override?</span>
3206
3646
  <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>gid</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_generate_page_gid'>generate_page_gid</span> <span class='id identifier rubyid_item'>item</span>
3207
3647
  <span class='kw'>end</span>
3648
+
3649
+ <span class='comment'># 30 days = 60 * 60 * 24 * 30 = 2592000
3650
+ </span> <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>freshness</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_time_stamp'>time_stamp</span> <span class='lparen'>(</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span> <span class='op'>-</span> <span class='int'>2592000</span><span class='rparen'>)</span>
3651
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>to_fetch</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_time_stamp'>time_stamp</span>
3652
+ <span class='id identifier rubyid_item'>item</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>created_at</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_time_stamp'>time_stamp</span>
3208
3653
  <span class='id identifier rubyid_item'>item</span>
3209
3654
  <span class='kw'>end</span>
3210
3655
  <span class='id identifier rubyid_collection'>collection</span><span class='period'>.</span><span class='id identifier rubyid_bind_event'>bind_event</span><span class='lparen'>(</span><span class='symbol'>:after_insert</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_collection'>collection</span><span class='comma'>,</span> <span class='id identifier rubyid_item'>item</span><span class='op'>|</span>
@@ -3232,8 +3677,7 @@ gid overriding is enabled (see #allow_page_gid_override?)</p>
3232
3677
  <div class="note notetag">
3233
3678
  <strong>Note:</strong>
3234
3679
  <div class='inline'>
3235
- <p><em>Warning:</em> It uses table scan to filter and should be used on test
3236
- suites only.</p>
3680
+ <p><em>Warning:</em> It uses table scan to filter and should be used on test suites only.</p>
3237
3681
  </div>
3238
3682
  </div>
3239
3683
 
@@ -3342,39 +3786,39 @@ suites only.</p>
3342
3786
  <pre class="lines">
3343
3787
 
3344
3788
 
3345
- 475
3346
- 476
3347
- 477
3348
- 478
3349
- 479
3350
- 480
3351
- 481
3352
- 482
3353
- 483
3354
- 484
3355
- 485
3356
- 486
3357
- 487
3358
- 488
3359
- 489
3360
- 490
3361
- 491
3362
- 492
3363
- 493
3364
- 494
3365
- 495
3366
- 496
3367
- 497
3368
- 498
3369
- 499
3370
- 500
3371
- 501
3372
- 502
3373
- 503
3374
- 504</pre>
3375
- </td>
3376
- <td>
3377
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 475</span>
3789
+ 668
3790
+ 669
3791
+ 670
3792
+ 671
3793
+ 672
3794
+ 673
3795
+ 674
3796
+ 675
3797
+ 676
3798
+ 677
3799
+ 678
3800
+ 679
3801
+ 680
3802
+ 681
3803
+ 682
3804
+ 683
3805
+ 684
3806
+ 685
3807
+ 686
3808
+ 687
3809
+ 688
3810
+ 689
3811
+ 690
3812
+ 691
3813
+ 692
3814
+ 693
3815
+ 694
3816
+ 695
3817
+ 696
3818
+ 697</pre>
3819
+ </td>
3820
+ <td>
3821
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 668</span>
3378
3822
 
3379
3823
  <span class='kw'>def</span> <span class='id identifier rubyid_query'>query</span> <span class='id identifier rubyid_collection'>collection</span><span class='comma'>,</span> <span class='id identifier rubyid_filter'>filter</span><span class='comma'>,</span> <span class='id identifier rubyid_offset'>offset</span> <span class='op'>=</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_limit'>limit</span> <span class='op'>=</span> <span class='kw'>nil</span>
3380
3824
  <span class='kw'>return</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_limit'>limit</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_limit'>limit</span> <span class='op'>&gt;</span> <span class='int'>0</span>
@@ -3486,41 +3930,41 @@ suites only.</p>
3486
3930
  <pre class="lines">
3487
3931
 
3488
3932
 
3489
- 510
3490
- 511
3491
- 512
3492
- 513
3493
- 514
3494
- 515
3495
- 516
3496
- 517
3497
- 518
3498
- 519
3499
- 520
3500
- 521
3501
- 522
3502
- 523
3503
- 524
3504
- 525
3505
- 526
3506
- 527
3507
- 528
3508
- 529
3509
- 530
3510
- 531
3511
- 532
3512
- 533
3513
- 534
3514
- 535
3515
- 536
3516
- 537
3517
- 538
3518
- 539
3519
- 540
3520
- 541</pre>
3521
- </td>
3522
- <td>
3523
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 510</span>
3933
+ 703
3934
+ 704
3935
+ 705
3936
+ 706
3937
+ 707
3938
+ 708
3939
+ 709
3940
+ 710
3941
+ 711
3942
+ 712
3943
+ 713
3944
+ 714
3945
+ 715
3946
+ 716
3947
+ 717
3948
+ 718
3949
+ 719
3950
+ 720
3951
+ 721
3952
+ 722
3953
+ 723
3954
+ 724
3955
+ 725
3956
+ 726
3957
+ 727
3958
+ 728
3959
+ 729
3960
+ 730
3961
+ 731
3962
+ 732
3963
+ 733
3964
+ 734</pre>
3965
+ </td>
3966
+ <td>
3967
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 703</span>
3524
3968
 
3525
3969
  <span class='kw'>def</span> <span class='id identifier rubyid_refetch'>refetch</span> <span class='id identifier rubyid_job_id'>job_id</span><span class='comma'>,</span> <span class='id identifier rubyid_gid'>gid</span>
3526
3970
  <span class='id identifier rubyid_page'>page</span> <span class='op'>=</span> <span class='id identifier rubyid_pages'>pages</span><span class='period'>.</span><span class='id identifier rubyid_find_match'>find_match</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>gid</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_gid'>gid</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>job_id</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_job_id'>job_id</span><span class='rparen'>)</span>
@@ -3634,20 +4078,20 @@ suites only.</p>
3634
4078
  <pre class="lines">
3635
4079
 
3636
4080
 
3637
- 547
3638
- 548
3639
- 549
3640
- 550
3641
- 551
3642
- 552
3643
- 553
3644
- 554
3645
- 555
3646
- 556
3647
- 557</pre>
4081
+ 740
4082
+ 741
4083
+ 742
4084
+ 743
4085
+ 744
4086
+ 745
4087
+ 746
4088
+ 747
4089
+ 748
4090
+ 749
4091
+ 750</pre>
3648
4092
  </td>
3649
4093
  <td>
3650
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 547</span>
4094
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 740</span>
3651
4095
 
3652
4096
  <span class='kw'>def</span> <span class='id identifier rubyid_reparse'>reparse</span> <span class='id identifier rubyid_job_id'>job_id</span><span class='comma'>,</span> <span class='id identifier rubyid_gid'>gid</span>
3653
4097
  <span class='id identifier rubyid_page'>page</span> <span class='op'>=</span> <span class='id identifier rubyid_pages'>pages</span><span class='period'>.</span><span class='id identifier rubyid_find_match'>find_match</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>gid</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_gid'>gid</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>job_id</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_job_id'>job_id</span><span class='rparen'>)</span>
@@ -3704,12 +4148,12 @@ suites only.</p>
3704
4148
  <pre class="lines">
3705
4149
 
3706
4150
 
3707
- 185
3708
- 186
3709
- 187</pre>
4151
+ 282
4152
+ 283
4153
+ 284</pre>
3710
4154
  </td>
3711
4155
  <td>
3712
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 185</span>
4156
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 282</span>
3713
4157
 
3714
4158
  <span class='kw'>def</span> <span class='id identifier rubyid_scraper_name'>scraper_name</span>
3715
4159
  <span class='ivar'>@scraper_name</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>my_scraper</span><span class='tstring_end'>&#39;</span></span>
@@ -3745,14 +4189,14 @@ suites only.</p>
3745
4189
  <pre class="lines">
3746
4190
 
3747
4191
 
3748
- 190
3749
- 191
3750
- 192
3751
- 193
3752
- 194</pre>
4192
+ 287
4193
+ 288
4194
+ 289
4195
+ 290
4196
+ 291</pre>
3753
4197
  </td>
3754
4198
  <td>
3755
- <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 190</span>
4199
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 287</span>
3756
4200
 
3757
4201
  <span class='kw'>def</span> <span class='id identifier rubyid_scraper_name='>scraper_name=</span> <span class='id identifier rubyid_value'>value</span>
3758
4202
  <span class='id identifier rubyid_job'>job</span> <span class='op'>=</span> <span class='id identifier rubyid_ensure_job'>ensure_job</span>
@@ -3762,6 +4206,125 @@ suites only.</p>
3762
4206
  </td>
3763
4207
  </tr>
3764
4208
  </table>
4209
+ </div>
4210
+
4211
+ <div class="method_details ">
4212
+ <h3 class="signature " id="uuid_algorithm-instance_method">
4213
+
4214
+ #<strong>uuid_algorithm</strong> &#x21d2; <tt>Enumerator</tt><sup>?</sup>
4215
+
4216
+
4217
+
4218
+
4219
+
4220
+ </h3><div class="docstring">
4221
+ <div class="discussion">
4222
+
4223
+ <p>Current UUID algorithm.</p>
4224
+
4225
+
4226
+ </div>
4227
+ </div>
4228
+ <div class="tags">
4229
+
4230
+ <p class="tag_title">Returns:</p>
4231
+ <ul class="return">
4232
+
4233
+ <li>
4234
+
4235
+
4236
+ <span class='type'>(<tt>Enumerator</tt>, <tt>nil</tt>)</span>
4237
+
4238
+
4239
+
4240
+ </li>
4241
+
4242
+ </ul>
4243
+
4244
+ </div><table class="source_code">
4245
+ <tr>
4246
+ <td>
4247
+ <pre class="lines">
4248
+
4249
+
4250
+ 319
4251
+ 320
4252
+ 321</pre>
4253
+ </td>
4254
+ <td>
4255
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 319</span>
4256
+
4257
+ <span class='kw'>def</span> <span class='id identifier rubyid_uuid_algorithm'>uuid_algorithm</span>
4258
+ <span class='ivar'>@uuid_algorithm</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="#DEFAULT_UUID_ALGORITHM-constant" title="DhEasy::Core::Mock::FakeDb::DEFAULT_UUID_ALGORITHM (constant)">DEFAULT_UUID_ALGORITHM</a></span></span>
4259
+ <span class='kw'>end</span></pre>
4260
+ </td>
4261
+ </tr>
4262
+ </table>
4263
+ </div>
4264
+
4265
+ <div class="method_details ">
4266
+ <h3 class="signature " id="uuid_algorithm=-instance_method">
4267
+
4268
+ #<strong>uuid_algorithm=</strong>(value) &#x21d2; <tt>Object</tt>
4269
+
4270
+
4271
+
4272
+
4273
+
4274
+ </h3><div class="docstring">
4275
+ <div class="discussion">
4276
+
4277
+ <p>Set current UUID algorithm value.</p>
4278
+
4279
+
4280
+ </div>
4281
+ </div>
4282
+ <div class="tags">
4283
+
4284
+ <p class="tag_title">Raises:</p>
4285
+ <ul class="raise">
4286
+
4287
+ <li>
4288
+
4289
+
4290
+ <span class='type'>(<tt>ArgumentError</tt>)</span>
4291
+
4292
+
4293
+
4294
+ &mdash;
4295
+ <div class='inline'>
4296
+ <p>Whenever an invalid algorithm is provided</p>
4297
+ </div>
4298
+
4299
+ </li>
4300
+
4301
+ </ul>
4302
+
4303
+ </div><table class="source_code">
4304
+ <tr>
4305
+ <td>
4306
+ <pre class="lines">
4307
+
4308
+
4309
+ 325
4310
+ 326
4311
+ 327
4312
+ 328
4313
+ 329
4314
+ 330</pre>
4315
+ </td>
4316
+ <td>
4317
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/core/mock/fake_db.rb', line 325</span>
4318
+
4319
+ <span class='kw'>def</span> <span class='id identifier rubyid_uuid_algorithm='>uuid_algorithm=</span> <span class='id identifier rubyid_value'>value</span>
4320
+ <span class='kw'>unless</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="#VALID_UUID_ALGORITHMS-constant" title="DhEasy::Core::Mock::FakeDb::VALID_UUID_ALGORITHMS (constant)">VALID_UUID_ALGORITHMS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
4321
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Invalid UUID algorithm, valid values are :md5, :sha1, :sha256</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
4322
+ <span class='kw'>end</span>
4323
+ <span class='ivar'>@uuid_algorithm</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
4324
+ <span class='kw'>end</span></pre>
4325
+ </td>
4326
+ </tr>
4327
+ </table>
3765
4328
  </div>
3766
4329
 
3767
4330
  </div>
@@ -3769,9 +4332,9 @@ suites only.</p>
3769
4332
  </div>
3770
4333
 
3771
4334
  <div id="footer">
3772
- Generated on Wed Dec 4 23:00:02 2019 by
4335
+ Generated on Sun May 23 08:36:55 2021 by
3773
4336
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
3774
- 0.9.20 (ruby-2.5.3).
4337
+ 0.9.24 (ruby-2.6.5).
3775
4338
  </div>
3776
4339
 
3777
4340
  </div>