dh_easy-test 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.travis.yml +7 -0
- data/.yardopts +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE +21 -0
- data/README.md +20 -0
- data/Rakefile +22 -0
- data/dh_easy-test.gemspec +49 -0
- data/doc/DhEasy.html +117 -0
- data/doc/DhEasy/Core.html +117 -0
- data/doc/DhEasy/Core/Mock.html +115 -0
- data/doc/DhEasy/Core/Mock/FakeExecutor.html +2114 -0
- data/doc/DhEasy/Core/Modk.html +105 -0
- data/doc/DhEasy/Core/Plugin.html +117 -0
- data/doc/DhEasy/Core/Plugin/ExecutorBehavior.html +196 -0
- data/doc/DhEasy/Test.html +616 -0
- data/doc/DhEasy/Test/Helper.html +1710 -0
- data/doc/DhEasy/Test/RecordTask.html +2493 -0
- data/doc/_index.html +237 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +91 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +91 -0
- data/doc/js/app.js +303 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +427 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/dh_easy/test.rb +52 -0
- data/lib/dh_easy/test/helper.rb +225 -0
- data/lib/dh_easy/test/rake.rb +335 -0
- data/lib/dh_easy/test/version.rb +6 -0
- data/lib/dh_easy_override/core.rb +7 -0
- data/lib/dh_easy_override/core/mock.rb +8 -0
- data/lib/dh_easy_override/core/mock/fake_executor.rb +338 -0
- data/lib/dh_easy_override/core/plugin.rb +8 -0
- data/lib/dh_easy_override/core/plugin/executor_behavior.rb +11 -0
- metadata +200 -0
@@ -0,0 +1,115 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: DhEasy::Core::Mock
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.20
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "DhEasy::Core::Mock";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (M)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../DhEasy.html" title="DhEasy (module)">DhEasy</a></span></span> » <span class='title'><span class='object_link'><a href="../Core.html" title="DhEasy::Core (module)">Core</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Mock</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: DhEasy::Core::Mock
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/dh_easy_override/core/mock/fake_executor.rb</dd>
|
82
|
+
</dl>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
<h2>Defined Under Namespace</h2>
|
87
|
+
<p class="children">
|
88
|
+
|
89
|
+
|
90
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Mock/FakeExecutor.html" title="DhEasy::Core::Mock::FakeExecutor (module)">FakeExecutor</a></span>
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
</p>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div id="footer">
|
108
|
+
Generated on Wed Dec 4 23:16:05 2019 by
|
109
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
110
|
+
0.9.20 (ruby-2.5.3).
|
111
|
+
</div>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
</body>
|
115
|
+
</html>
|
@@ -0,0 +1,2114 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: DhEasy::Core::Mock::FakeExecutor
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.20
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "DhEasy::Core::Mock::FakeExecutor";
|
19
|
+
relpath = '../../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../../_index.html">Index (F)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../DhEasy.html" title="DhEasy (module)">DhEasy</a></span></span> » <span class='title'><span class='object_link'><a href="../../Core.html" title="DhEasy::Core (module)">Core</a></span></span> » <span class='title'><span class='object_link'><a href="../Mock.html" title="DhEasy::Core::Mock (module)">Mock</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">FakeExecutor</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: DhEasy::Core::Mock::FakeExecutor
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/dh_easy_override/core/mock/fake_executor.rb</dd>
|
82
|
+
</dl>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
91
|
+
<ul class="summary">
|
92
|
+
|
93
|
+
<li class="public ">
|
94
|
+
<span class="summary_signature">
|
95
|
+
|
96
|
+
<a href="#input_dir-instance_method" title="#input_dir (instance method)">#<strong>input_dir</strong> ⇒ Object </a>
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
</span>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
<span class="summary_desc"><div class='inline'>
|
114
|
+
<p>Current assigned input directory.</p>
|
115
|
+
</div></span>
|
116
|
+
|
117
|
+
</li>
|
118
|
+
|
119
|
+
|
120
|
+
<li class="public ">
|
121
|
+
<span class="summary_signature">
|
122
|
+
|
123
|
+
<a href="#root_input_dir-instance_method" title="#root_input_dir (instance method)">#<strong>root_input_dir</strong> ⇒ Object </a>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
</span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<span class="summary_desc"><div class='inline'>
|
141
|
+
<p>Root input directory.</p>
|
142
|
+
</div></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<h2>
|
154
|
+
Instance Method Summary
|
155
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
156
|
+
</h2>
|
157
|
+
|
158
|
+
<ul class="summary">
|
159
|
+
|
160
|
+
<li class="public ">
|
161
|
+
<span class="summary_signature">
|
162
|
+
|
163
|
+
<a href="#expand_relative_input-instance_method" title="#expand_relative_input (instance method)">#<strong>expand_relative_input</strong>(dir) ⇒ String </a>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
</span>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<span class="summary_desc"><div class='inline'>
|
178
|
+
<p>Expand a relative input directory.</p>
|
179
|
+
</div></span>
|
180
|
+
|
181
|
+
</li>
|
182
|
+
|
183
|
+
|
184
|
+
<li class="public ">
|
185
|
+
<span class="summary_signature">
|
186
|
+
|
187
|
+
<a href="#load_expected_outputs-instance_method" title="#load_expected_outputs (instance method)">#<strong>load_expected_outputs</strong>(opts = {}) ⇒ FakeExecutor </a>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</span>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
<span class="summary_desc"><div class='inline'>
|
202
|
+
<p>Load expected outputs into executor from options or input files.</p>
|
203
|
+
</div></span>
|
204
|
+
|
205
|
+
</li>
|
206
|
+
|
207
|
+
|
208
|
+
<li class="public ">
|
209
|
+
<span class="summary_signature">
|
210
|
+
|
211
|
+
<a href="#load_expected_pages-instance_method" title="#load_expected_pages (instance method)">#<strong>load_expected_pages</strong>(opts = {}) ⇒ FakeExecutor </a>
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
</span>
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
<span class="summary_desc"><div class='inline'>
|
226
|
+
<p>Load expected pages into executor from options or input files.</p>
|
227
|
+
</div></span>
|
228
|
+
|
229
|
+
</li>
|
230
|
+
|
231
|
+
|
232
|
+
<li class="public ">
|
233
|
+
<span class="summary_signature">
|
234
|
+
|
235
|
+
<a href="#load_failed_content-instance_method" title="#load_failed_content (instance method)">#<strong>load_failed_content</strong>(opts = {}) ⇒ FakeExecutor </a>
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
</span>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<span class="summary_desc"><div class='inline'>
|
250
|
+
<p>Load failed content into executor from options or input files.</p>
|
251
|
+
</div></span>
|
252
|
+
|
253
|
+
</li>
|
254
|
+
|
255
|
+
|
256
|
+
<li class="public ">
|
257
|
+
<span class="summary_signature">
|
258
|
+
|
259
|
+
<a href="#load_input-instance_method" title="#load_input (instance method)">#<strong>load_input</strong>(opts = {}) ⇒ FakeExecutor </a>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
</span>
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
<span class="summary_desc"><div class='inline'>
|
274
|
+
<p>Load data into executor from options or input files.</p>
|
275
|
+
</div></span>
|
276
|
+
|
277
|
+
</li>
|
278
|
+
|
279
|
+
|
280
|
+
<li class="public ">
|
281
|
+
<span class="summary_signature">
|
282
|
+
|
283
|
+
<a href="#match_expected_outputs-instance_method" title="#match_expected_outputs (instance method)">#<strong>match_expected_outputs</strong>(opts = {}) ⇒ Hash </a>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
</span>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
<span class="summary_desc"><div class='inline'>
|
298
|
+
<p>Match expected outputs.</p>
|
299
|
+
</div></span>
|
300
|
+
|
301
|
+
</li>
|
302
|
+
|
303
|
+
|
304
|
+
<li class="public ">
|
305
|
+
<span class="summary_signature">
|
306
|
+
|
307
|
+
<a href="#match_expected_pages-instance_method" title="#match_expected_pages (instance method)">#<strong>match_expected_pages</strong>(opts = {}) ⇒ Hash </a>
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
</span>
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
<span class="summary_desc"><div class='inline'>
|
322
|
+
<p>Match expected pages.</p>
|
323
|
+
</div></span>
|
324
|
+
|
325
|
+
</li>
|
326
|
+
|
327
|
+
|
328
|
+
<li class="public ">
|
329
|
+
<span class="summary_signature">
|
330
|
+
|
331
|
+
<a href="#new_executor-instance_method" title="#new_executor (instance method)">#<strong>new_executor</strong> ⇒ DhEasy::Core::Mock::FakeExecutor </a>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
</span>
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
<span class="summary_desc"><div class='inline'>
|
346
|
+
<p>Create an executor based on the current executor type.</p>
|
347
|
+
</div></span>
|
348
|
+
|
349
|
+
</li>
|
350
|
+
|
351
|
+
|
352
|
+
<li class="public ">
|
353
|
+
<span class="summary_signature">
|
354
|
+
|
355
|
+
<a href="#should_match_outputs-instance_method" title="#should_match_outputs (instance method)">#<strong>should_match_outputs</strong>(opts = {}) ⇒ Boolean </a>
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
</span>
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
<span class="summary_desc"><div class='inline'>
|
370
|
+
<p>Match saved outputs with expected and verbose diff.</p>
|
371
|
+
</div></span>
|
372
|
+
|
373
|
+
</li>
|
374
|
+
|
375
|
+
|
376
|
+
<li class="public ">
|
377
|
+
<span class="summary_signature">
|
378
|
+
|
379
|
+
<a href="#should_match_pages-instance_method" title="#should_match_pages (instance method)">#<strong>should_match_pages</strong>(opts = {}) ⇒ Boolean </a>
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
</span>
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
<span class="summary_desc"><div class='inline'>
|
394
|
+
<p>Match saved pages with expected and verbose diff.</p>
|
395
|
+
</div></span>
|
396
|
+
|
397
|
+
</li>
|
398
|
+
|
399
|
+
|
400
|
+
</ul>
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
<div id="instance_attr_details" class="attr_details">
|
405
|
+
<h2>Instance Attribute Details</h2>
|
406
|
+
|
407
|
+
|
408
|
+
<span id="input_dir=-instance_method"></span>
|
409
|
+
<div class="method_details first">
|
410
|
+
<h3 class="signature first" id="input_dir-instance_method">
|
411
|
+
|
412
|
+
#<strong>input_dir</strong> ⇒ <tt>Object</tt>
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
</h3><div class="docstring">
|
419
|
+
<div class="discussion">
|
420
|
+
|
421
|
+
<p>Current assigned input directory.</p>
|
422
|
+
|
423
|
+
|
424
|
+
</div>
|
425
|
+
</div>
|
426
|
+
<div class="tags">
|
427
|
+
|
428
|
+
|
429
|
+
</div><table class="source_code">
|
430
|
+
<tr>
|
431
|
+
<td>
|
432
|
+
<pre class="lines">
|
433
|
+
|
434
|
+
|
435
|
+
9
|
436
|
+
10
|
437
|
+
11</pre>
|
438
|
+
</td>
|
439
|
+
<td>
|
440
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 9</span>
|
441
|
+
|
442
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_input_dir'>input_dir</span>
|
443
|
+
<span class='ivar'>@input_dir</span>
|
444
|
+
<span class='kw'>end</span></pre>
|
445
|
+
</td>
|
446
|
+
</tr>
|
447
|
+
</table>
|
448
|
+
</div>
|
449
|
+
|
450
|
+
|
451
|
+
<span id="root_input_dir=-instance_method"></span>
|
452
|
+
<div class="method_details ">
|
453
|
+
<h3 class="signature " id="root_input_dir-instance_method">
|
454
|
+
|
455
|
+
#<strong>root_input_dir</strong> ⇒ <tt>Object</tt>
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
</h3><div class="docstring">
|
462
|
+
<div class="discussion">
|
463
|
+
|
464
|
+
<p>Root input directory.</p>
|
465
|
+
|
466
|
+
|
467
|
+
</div>
|
468
|
+
</div>
|
469
|
+
<div class="tags">
|
470
|
+
|
471
|
+
|
472
|
+
</div><table class="source_code">
|
473
|
+
<tr>
|
474
|
+
<td>
|
475
|
+
<pre class="lines">
|
476
|
+
|
477
|
+
|
478
|
+
6
|
479
|
+
7
|
480
|
+
8</pre>
|
481
|
+
</td>
|
482
|
+
<td>
|
483
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 6</span>
|
484
|
+
|
485
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_root_input_dir'>root_input_dir</span>
|
486
|
+
<span class='ivar'>@root_input_dir</span>
|
487
|
+
<span class='kw'>end</span></pre>
|
488
|
+
</td>
|
489
|
+
</tr>
|
490
|
+
</table>
|
491
|
+
</div>
|
492
|
+
|
493
|
+
</div>
|
494
|
+
|
495
|
+
|
496
|
+
<div id="instance_method_details" class="method_details_list">
|
497
|
+
<h2>Instance Method Details</h2>
|
498
|
+
|
499
|
+
|
500
|
+
<div class="method_details first">
|
501
|
+
<h3 class="signature first" id="expand_relative_input-instance_method">
|
502
|
+
|
503
|
+
#<strong>expand_relative_input</strong>(dir) ⇒ <tt>String</tt>
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
</h3><div class="docstring">
|
510
|
+
<div class="discussion">
|
511
|
+
|
512
|
+
<p>Expand a relative input directory.</p>
|
513
|
+
|
514
|
+
|
515
|
+
</div>
|
516
|
+
</div>
|
517
|
+
<div class="tags">
|
518
|
+
<p class="tag_title">Parameters:</p>
|
519
|
+
<ul class="param">
|
520
|
+
|
521
|
+
<li>
|
522
|
+
|
523
|
+
<span class='name'>dir</span>
|
524
|
+
|
525
|
+
|
526
|
+
<span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
—
|
531
|
+
<div class='inline'>
|
532
|
+
<p>Relative input directory</p>
|
533
|
+
</div>
|
534
|
+
|
535
|
+
</li>
|
536
|
+
|
537
|
+
</ul>
|
538
|
+
|
539
|
+
<p class="tag_title">Returns:</p>
|
540
|
+
<ul class="return">
|
541
|
+
|
542
|
+
<li>
|
543
|
+
|
544
|
+
|
545
|
+
<span class='type'>(<tt>String</tt>)</span>
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
—
|
550
|
+
<div class='inline'>
|
551
|
+
<p>Absolute path</p>
|
552
|
+
</div>
|
553
|
+
|
554
|
+
</li>
|
555
|
+
|
556
|
+
</ul>
|
557
|
+
|
558
|
+
</div><table class="source_code">
|
559
|
+
<tr>
|
560
|
+
<td>
|
561
|
+
<pre class="lines">
|
562
|
+
|
563
|
+
|
564
|
+
16
|
565
|
+
17
|
566
|
+
18
|
567
|
+
19</pre>
|
568
|
+
</td>
|
569
|
+
<td>
|
570
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 16</span>
|
571
|
+
|
572
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_expand_relative_input'>expand_relative_input</span> <span class='id identifier rubyid_dir'>dir</span>
|
573
|
+
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_dir'>dir</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
574
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_root_input_dir'>root_input_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_dir'>dir</span><span class='rparen'>)</span>
|
575
|
+
<span class='kw'>end</span></pre>
|
576
|
+
</td>
|
577
|
+
</tr>
|
578
|
+
</table>
|
579
|
+
</div>
|
580
|
+
|
581
|
+
<div class="method_details ">
|
582
|
+
<h3 class="signature " id="load_expected_outputs-instance_method">
|
583
|
+
|
584
|
+
#<strong>load_expected_outputs</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeExecutor (module)">FakeExecutor</a></span></tt>
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
</h3><div class="docstring">
|
591
|
+
<div class="discussion">
|
592
|
+
|
593
|
+
<p>Load expected outputs into executor from options or input files.</p>
|
594
|
+
|
595
|
+
|
596
|
+
</div>
|
597
|
+
</div>
|
598
|
+
<div class="tags">
|
599
|
+
<p class="tag_title">Parameters:</p>
|
600
|
+
<ul class="param">
|
601
|
+
|
602
|
+
<li>
|
603
|
+
|
604
|
+
<span class='name'>opts</span>
|
605
|
+
|
606
|
+
|
607
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
608
|
+
|
609
|
+
|
610
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
611
|
+
|
612
|
+
|
613
|
+
—
|
614
|
+
<div class='inline'>
|
615
|
+
<p>({}) Configuration options.</p>
|
616
|
+
</div>
|
617
|
+
|
618
|
+
</li>
|
619
|
+
|
620
|
+
</ul>
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
626
|
+
<ul class="option">
|
627
|
+
|
628
|
+
<li>
|
629
|
+
<span class="name">:input_dir</span>
|
630
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
631
|
+
<span class="default">
|
632
|
+
|
633
|
+
— default:
|
634
|
+
<tt>nil</tt>
|
635
|
+
|
636
|
+
</span>
|
637
|
+
|
638
|
+
— <div class='inline'>
|
639
|
+
<p>Will load files from this directory. The files map as follows (file_name
|
640
|
+
-> variable): “` expected_outputs.json -> saved_outputs “`</p>
|
641
|
+
</div>
|
642
|
+
|
643
|
+
</li>
|
644
|
+
|
645
|
+
<li>
|
646
|
+
<span class="name">:rel_dir</span>
|
647
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
648
|
+
<span class="default">
|
649
|
+
|
650
|
+
— default:
|
651
|
+
<tt>nil</tt>
|
652
|
+
|
653
|
+
</span>
|
654
|
+
|
655
|
+
— <div class='inline'>
|
656
|
+
<p>Same as <code>:input_dir</code> option but relative to root input directory
|
657
|
+
(see #root_input_dir).</p>
|
658
|
+
</div>
|
659
|
+
|
660
|
+
</li>
|
661
|
+
|
662
|
+
<li>
|
663
|
+
<span class="name">:outputs</span>
|
664
|
+
<span class="type">(<tt>Hash</tt>, <tt>nil</tt>)</span>
|
665
|
+
<span class="default">
|
666
|
+
|
667
|
+
</span>
|
668
|
+
|
669
|
+
— <div class='inline'>
|
670
|
+
<p>Outputs to load. It will override `expected_outputs.json` from input
|
671
|
+
directory.</p>
|
672
|
+
</div>
|
673
|
+
|
674
|
+
</li>
|
675
|
+
|
676
|
+
</ul>
|
677
|
+
|
678
|
+
|
679
|
+
<p class="tag_title">Returns:</p>
|
680
|
+
<ul class="return">
|
681
|
+
|
682
|
+
<li>
|
683
|
+
|
684
|
+
|
685
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeExecutor (module)">FakeExecutor</a></span></tt>)</span>
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
</li>
|
690
|
+
|
691
|
+
</ul>
|
692
|
+
|
693
|
+
</div><table class="source_code">
|
694
|
+
<tr>
|
695
|
+
<td>
|
696
|
+
<pre class="lines">
|
697
|
+
|
698
|
+
|
699
|
+
166
|
700
|
+
167
|
701
|
+
168
|
702
|
+
169
|
703
|
+
170
|
704
|
+
171
|
705
|
+
172
|
706
|
+
173
|
707
|
+
174
|
708
|
+
175
|
709
|
+
176
|
710
|
+
177
|
711
|
+
178
|
712
|
+
179
|
713
|
+
180
|
714
|
+
181
|
715
|
+
182
|
716
|
+
183
|
717
|
+
184</pre>
|
718
|
+
</td>
|
719
|
+
<td>
|
720
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 166</span>
|
721
|
+
|
722
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_expected_outputs'>load_expected_outputs</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
723
|
+
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
724
|
+
<span class='label'>rel_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
725
|
+
<span class='label'>input_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
726
|
+
<span class='label'>outputs:</span> <span class='kw'>nil</span>
|
727
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
|
728
|
+
<span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:input_dir</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_expand_relative_input'>expand_relative_input</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:rel_dir</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_input_dir'>input_dir</span>
|
729
|
+
|
730
|
+
<span class='comment'># Load overrides
|
731
|
+
</span> <span class='id identifier rubyid_save_outputs'>save_outputs</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:outputs</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:outputs</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
732
|
+
|
733
|
+
<span class='comment'># Load input files
|
734
|
+
</span> <span class='kw'>unless</span> <span class='id identifier rubyid_dir'>dir</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
735
|
+
<span class='id identifier rubyid_expected_outputs'>expected_outputs</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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Test/Helper.html" title="DhEasy::Test::Helper (module)">Helper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_load_json_file'><span class='object_link'><a href="../../Test/Helper.html#load_json_file-class_method" title="DhEasy::Test::Helper.load_json_file (method)">load_json_file</a></span></span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>expected_outputs.json</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
736
|
+
<span class='id identifier rubyid_save_outputs'>save_outputs</span> <span class='id identifier rubyid_expected_outputs'>expected_outputs</span> <span class='kw'>unless</span> <span class='id identifier rubyid_expected_outputs'>expected_outputs</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
737
|
+
<span class='kw'>end</span>
|
738
|
+
|
739
|
+
<span class='kw'>self</span>
|
740
|
+
<span class='kw'>end</span></pre>
|
741
|
+
</td>
|
742
|
+
</tr>
|
743
|
+
</table>
|
744
|
+
</div>
|
745
|
+
|
746
|
+
<div class="method_details ">
|
747
|
+
<h3 class="signature " id="load_expected_pages-instance_method">
|
748
|
+
|
749
|
+
#<strong>load_expected_pages</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeExecutor (module)">FakeExecutor</a></span></tt>
|
750
|
+
|
751
|
+
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
</h3><div class="docstring">
|
756
|
+
<div class="discussion">
|
757
|
+
|
758
|
+
<p>Load expected pages into executor from options or input files.</p>
|
759
|
+
|
760
|
+
|
761
|
+
</div>
|
762
|
+
</div>
|
763
|
+
<div class="tags">
|
764
|
+
<p class="tag_title">Parameters:</p>
|
765
|
+
<ul class="param">
|
766
|
+
|
767
|
+
<li>
|
768
|
+
|
769
|
+
<span class='name'>opts</span>
|
770
|
+
|
771
|
+
|
772
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
773
|
+
|
774
|
+
|
775
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
776
|
+
|
777
|
+
|
778
|
+
—
|
779
|
+
<div class='inline'>
|
780
|
+
<p>({}) Configuration options.</p>
|
781
|
+
</div>
|
782
|
+
|
783
|
+
</li>
|
784
|
+
|
785
|
+
</ul>
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
|
790
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
791
|
+
<ul class="option">
|
792
|
+
|
793
|
+
<li>
|
794
|
+
<span class="name">:input_dir</span>
|
795
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
796
|
+
<span class="default">
|
797
|
+
|
798
|
+
— default:
|
799
|
+
<tt>nil</tt>
|
800
|
+
|
801
|
+
</span>
|
802
|
+
|
803
|
+
— <div class='inline'>
|
804
|
+
<p>Will load files from this directory. The files map as follows (file_name
|
805
|
+
-> variable): “` expected_pages.json -> saved_pages “`</p>
|
806
|
+
</div>
|
807
|
+
|
808
|
+
</li>
|
809
|
+
|
810
|
+
<li>
|
811
|
+
<span class="name">:rel_dir</span>
|
812
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
813
|
+
<span class="default">
|
814
|
+
|
815
|
+
— default:
|
816
|
+
<tt>nil</tt>
|
817
|
+
|
818
|
+
</span>
|
819
|
+
|
820
|
+
— <div class='inline'>
|
821
|
+
<p>Same as <code>:input_dir</code> option but relative to root input directory
|
822
|
+
(see #root_input_dir).</p>
|
823
|
+
</div>
|
824
|
+
|
825
|
+
</li>
|
826
|
+
|
827
|
+
<li>
|
828
|
+
<span class="name">:pages</span>
|
829
|
+
<span class="type">(<tt>Hash</tt>, <tt>nil</tt>)</span>
|
830
|
+
<span class="default">
|
831
|
+
|
832
|
+
</span>
|
833
|
+
|
834
|
+
— <div class='inline'>
|
835
|
+
<p>Pages to load. It will override `expected_pages.json` from input directory.</p>
|
836
|
+
</div>
|
837
|
+
|
838
|
+
</li>
|
839
|
+
|
840
|
+
</ul>
|
841
|
+
|
842
|
+
|
843
|
+
<p class="tag_title">Returns:</p>
|
844
|
+
<ul class="return">
|
845
|
+
|
846
|
+
<li>
|
847
|
+
|
848
|
+
|
849
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeExecutor (module)">FakeExecutor</a></span></tt>)</span>
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
</li>
|
854
|
+
|
855
|
+
</ul>
|
856
|
+
|
857
|
+
</div><table class="source_code">
|
858
|
+
<tr>
|
859
|
+
<td>
|
860
|
+
<pre class="lines">
|
861
|
+
|
862
|
+
|
863
|
+
132
|
864
|
+
133
|
865
|
+
134
|
866
|
+
135
|
867
|
+
136
|
868
|
+
137
|
869
|
+
138
|
870
|
+
139
|
871
|
+
140
|
872
|
+
141
|
873
|
+
142
|
874
|
+
143
|
875
|
+
144
|
876
|
+
145
|
877
|
+
146
|
878
|
+
147
|
879
|
+
148
|
880
|
+
149
|
881
|
+
150</pre>
|
882
|
+
</td>
|
883
|
+
<td>
|
884
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 132</span>
|
885
|
+
|
886
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_expected_pages'>load_expected_pages</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
887
|
+
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
888
|
+
<span class='label'>rel_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
889
|
+
<span class='label'>input_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
890
|
+
<span class='label'>pages:</span> <span class='kw'>nil</span>
|
891
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
|
892
|
+
<span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:input_dir</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_expand_relative_input'>expand_relative_input</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:rel_dir</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_input_dir'>input_dir</span>
|
893
|
+
|
894
|
+
<span class='comment'># Load overrides
|
895
|
+
</span> <span class='id identifier rubyid_save_pages'>save_pages</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:pages</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:pages</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
896
|
+
|
897
|
+
<span class='comment'># Load input files
|
898
|
+
</span> <span class='kw'>unless</span> <span class='id identifier rubyid_dir'>dir</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
899
|
+
<span class='id identifier rubyid_expected_pages'>expected_pages</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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Test/Helper.html" title="DhEasy::Test::Helper (module)">Helper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_load_json_file'><span class='object_link'><a href="../../Test/Helper.html#load_json_file-class_method" title="DhEasy::Test::Helper.load_json_file (method)">load_json_file</a></span></span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>expected_pages.json</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
900
|
+
<span class='id identifier rubyid_save_pages'>save_pages</span> <span class='id identifier rubyid_expected_pages'>expected_pages</span> <span class='kw'>unless</span> <span class='id identifier rubyid_expected_pages'>expected_pages</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
901
|
+
<span class='kw'>end</span>
|
902
|
+
|
903
|
+
<span class='kw'>self</span>
|
904
|
+
<span class='kw'>end</span></pre>
|
905
|
+
</td>
|
906
|
+
</tr>
|
907
|
+
</table>
|
908
|
+
</div>
|
909
|
+
|
910
|
+
<div class="method_details ">
|
911
|
+
<h3 class="signature " id="load_failed_content-instance_method">
|
912
|
+
|
913
|
+
#<strong>load_failed_content</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeExecutor (module)">FakeExecutor</a></span></tt>
|
914
|
+
|
915
|
+
|
916
|
+
|
917
|
+
|
918
|
+
|
919
|
+
</h3><div class="docstring">
|
920
|
+
<div class="discussion">
|
921
|
+
|
922
|
+
<p>Load failed content into executor from options or input files.</p>
|
923
|
+
|
924
|
+
|
925
|
+
</div>
|
926
|
+
</div>
|
927
|
+
<div class="tags">
|
928
|
+
<p class="tag_title">Parameters:</p>
|
929
|
+
<ul class="param">
|
930
|
+
|
931
|
+
<li>
|
932
|
+
|
933
|
+
<span class='name'>opts</span>
|
934
|
+
|
935
|
+
|
936
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
937
|
+
|
938
|
+
|
939
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
940
|
+
|
941
|
+
|
942
|
+
—
|
943
|
+
<div class='inline'>
|
944
|
+
<p>({}) Configuration options.</p>
|
945
|
+
</div>
|
946
|
+
|
947
|
+
</li>
|
948
|
+
|
949
|
+
</ul>
|
950
|
+
|
951
|
+
|
952
|
+
|
953
|
+
|
954
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
955
|
+
<ul class="option">
|
956
|
+
|
957
|
+
<li>
|
958
|
+
<span class="name">:input_dir</span>
|
959
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
960
|
+
<span class="default">
|
961
|
+
|
962
|
+
— default:
|
963
|
+
<tt>nil</tt>
|
964
|
+
|
965
|
+
</span>
|
966
|
+
|
967
|
+
— <div class='inline'>
|
968
|
+
<p>Will load files from this directory. The files map as follows (file_name
|
969
|
+
-> variable): “` failed_content.json -> failed_content “`</p>
|
970
|
+
</div>
|
971
|
+
|
972
|
+
</li>
|
973
|
+
|
974
|
+
<li>
|
975
|
+
<span class="name">:rel_dir</span>
|
976
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
977
|
+
<span class="default">
|
978
|
+
|
979
|
+
— default:
|
980
|
+
<tt>nil</tt>
|
981
|
+
|
982
|
+
</span>
|
983
|
+
|
984
|
+
— <div class='inline'>
|
985
|
+
<p>Same as <code>:input_dir</code> option but relative to root input directory
|
986
|
+
(see #root_input_dir).</p>
|
987
|
+
</div>
|
988
|
+
|
989
|
+
</li>
|
990
|
+
|
991
|
+
<li>
|
992
|
+
<span class="name">:failed_content</span>
|
993
|
+
<span class="type">(<tt>Hash</tt>, <tt>nil</tt>)</span>
|
994
|
+
<span class="default">
|
995
|
+
|
996
|
+
</span>
|
997
|
+
|
998
|
+
— <div class='inline'>
|
999
|
+
<p>Failed content to load. It will override `failed_content.json` from input
|
1000
|
+
directory.</p>
|
1001
|
+
</div>
|
1002
|
+
|
1003
|
+
</li>
|
1004
|
+
|
1005
|
+
</ul>
|
1006
|
+
|
1007
|
+
|
1008
|
+
<p class="tag_title">Returns:</p>
|
1009
|
+
<ul class="return">
|
1010
|
+
|
1011
|
+
<li>
|
1012
|
+
|
1013
|
+
|
1014
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeExecutor (module)">FakeExecutor</a></span></tt>)</span>
|
1015
|
+
|
1016
|
+
|
1017
|
+
|
1018
|
+
</li>
|
1019
|
+
|
1020
|
+
</ul>
|
1021
|
+
|
1022
|
+
</div><table class="source_code">
|
1023
|
+
<tr>
|
1024
|
+
<td>
|
1025
|
+
<pre class="lines">
|
1026
|
+
|
1027
|
+
|
1028
|
+
99
|
1029
|
+
100
|
1030
|
+
101
|
1031
|
+
102
|
1032
|
+
103
|
1033
|
+
104
|
1034
|
+
105
|
1035
|
+
106
|
1036
|
+
107
|
1037
|
+
108
|
1038
|
+
109
|
1039
|
+
110
|
1040
|
+
111
|
1041
|
+
112
|
1042
|
+
113
|
1043
|
+
114
|
1044
|
+
115
|
1045
|
+
116</pre>
|
1046
|
+
</td>
|
1047
|
+
<td>
|
1048
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 99</span>
|
1049
|
+
|
1050
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_failed_content'>load_failed_content</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
1051
|
+
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1052
|
+
<span class='label'>rel_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1053
|
+
<span class='label'>input_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1054
|
+
<span class='label'>failed_content:</span> <span class='kw'>nil</span>
|
1055
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
|
1056
|
+
<span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:input_dir</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_expand_relative_input'>expand_relative_input</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:rel_dir</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_input_dir'>input_dir</span>
|
1057
|
+
|
1058
|
+
<span class='comment'># Load overrides
|
1059
|
+
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_failed_content'>failed_content</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:failed_content</span><span class='rbracket'>]</span>
|
1060
|
+
|
1061
|
+
<span class='comment'># Load input files
|
1062
|
+
</span> <span class='kw'>unless</span> <span class='id identifier rubyid_dir'>dir</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1063
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_failed_content'>failed_content</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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Test/Helper.html" title="DhEasy::Test::Helper (module)">Helper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_load_file'><span class='object_link'><a href="../../Test/Helper.html#load_file-class_method" title="DhEasy::Test::Helper.load_file (method)">load_file</a></span></span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>failed_content.json</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1064
|
+
<span class='kw'>end</span>
|
1065
|
+
|
1066
|
+
<span class='kw'>self</span>
|
1067
|
+
<span class='kw'>end</span></pre>
|
1068
|
+
</td>
|
1069
|
+
</tr>
|
1070
|
+
</table>
|
1071
|
+
</div>
|
1072
|
+
|
1073
|
+
<div class="method_details ">
|
1074
|
+
<h3 class="signature " id="load_input-instance_method">
|
1075
|
+
|
1076
|
+
#<strong>load_input</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeExecutor (module)">FakeExecutor</a></span></tt>
|
1077
|
+
|
1078
|
+
|
1079
|
+
|
1080
|
+
|
1081
|
+
|
1082
|
+
</h3><div class="docstring">
|
1083
|
+
<div class="discussion">
|
1084
|
+
|
1085
|
+
<p>Load data into executor from options or input files.</p>
|
1086
|
+
|
1087
|
+
|
1088
|
+
</div>
|
1089
|
+
</div>
|
1090
|
+
<div class="tags">
|
1091
|
+
<p class="tag_title">Parameters:</p>
|
1092
|
+
<ul class="param">
|
1093
|
+
|
1094
|
+
<li>
|
1095
|
+
|
1096
|
+
<span class='name'>opts</span>
|
1097
|
+
|
1098
|
+
|
1099
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1100
|
+
|
1101
|
+
|
1102
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1103
|
+
|
1104
|
+
|
1105
|
+
—
|
1106
|
+
<div class='inline'>
|
1107
|
+
<p>({}) Configuration options.</p>
|
1108
|
+
</div>
|
1109
|
+
|
1110
|
+
</li>
|
1111
|
+
|
1112
|
+
</ul>
|
1113
|
+
|
1114
|
+
|
1115
|
+
|
1116
|
+
|
1117
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
1118
|
+
<ul class="option">
|
1119
|
+
|
1120
|
+
<li>
|
1121
|
+
<span class="name">:input_dir</span>
|
1122
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
1123
|
+
<span class="default">
|
1124
|
+
|
1125
|
+
— default:
|
1126
|
+
<tt>nil</tt>
|
1127
|
+
|
1128
|
+
</span>
|
1129
|
+
|
1130
|
+
— <div class='inline'>
|
1131
|
+
<p>Will load files from this directory. The files map as follows (file_name
|
1132
|
+
-> variable): “` content -> content page.json -> page vars.json
|
1133
|
+
-> <a href="'vars'">page</a> pages.json -> saved_pages outputs.json
|
1134
|
+
-> saved_outputs “`</p>
|
1135
|
+
</div>
|
1136
|
+
|
1137
|
+
</li>
|
1138
|
+
|
1139
|
+
<li>
|
1140
|
+
<span class="name">:rel_dir</span>
|
1141
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
1142
|
+
<span class="default">
|
1143
|
+
|
1144
|
+
— default:
|
1145
|
+
<tt>nil</tt>
|
1146
|
+
|
1147
|
+
</span>
|
1148
|
+
|
1149
|
+
— <div class='inline'>
|
1150
|
+
<p>Same as <code>:input_dir</code> option but relative to root input directory
|
1151
|
+
(see #root_input_dir).</p>
|
1152
|
+
</div>
|
1153
|
+
|
1154
|
+
</li>
|
1155
|
+
|
1156
|
+
<li>
|
1157
|
+
<span class="name">:content</span>
|
1158
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
1159
|
+
<span class="default">
|
1160
|
+
|
1161
|
+
</span>
|
1162
|
+
|
1163
|
+
— <div class='inline'>
|
1164
|
+
<p>Content to load. It will override `content` file from input directory.</p>
|
1165
|
+
</div>
|
1166
|
+
|
1167
|
+
</li>
|
1168
|
+
|
1169
|
+
<li>
|
1170
|
+
<span class="name">:page</span>
|
1171
|
+
<span class="type">(<tt>Hash</tt>, <tt>nil</tt>)</span>
|
1172
|
+
<span class="default">
|
1173
|
+
|
1174
|
+
</span>
|
1175
|
+
|
1176
|
+
— <div class='inline'>
|
1177
|
+
<p>Page to load. It will override `page.json` from input directory.</p>
|
1178
|
+
</div>
|
1179
|
+
|
1180
|
+
</li>
|
1181
|
+
|
1182
|
+
<li>
|
1183
|
+
<span class="name">:vars</span>
|
1184
|
+
<span class="type">(<tt>Hash</tt>, <tt>nil</tt>)</span>
|
1185
|
+
<span class="default">
|
1186
|
+
|
1187
|
+
</span>
|
1188
|
+
|
1189
|
+
— <div class='inline'>
|
1190
|
+
<p>Variables to load. It will override `vars.json` from input directory.</p>
|
1191
|
+
</div>
|
1192
|
+
|
1193
|
+
</li>
|
1194
|
+
|
1195
|
+
<li>
|
1196
|
+
<span class="name">:pages</span>
|
1197
|
+
<span class="type">(<tt>Hash</tt>, <tt>nil</tt>)</span>
|
1198
|
+
<span class="default">
|
1199
|
+
|
1200
|
+
</span>
|
1201
|
+
|
1202
|
+
— <div class='inline'>
|
1203
|
+
<p>Pages to load. It will override `pages.json` from input directory.</p>
|
1204
|
+
</div>
|
1205
|
+
|
1206
|
+
</li>
|
1207
|
+
|
1208
|
+
<li>
|
1209
|
+
<span class="name">:outputs</span>
|
1210
|
+
<span class="type">(<tt>Hash</tt>, <tt>nil</tt>)</span>
|
1211
|
+
<span class="default">
|
1212
|
+
|
1213
|
+
</span>
|
1214
|
+
|
1215
|
+
— <div class='inline'>
|
1216
|
+
<p>Outputs to load. It will override `outputs.json` from input directory.</p>
|
1217
|
+
</div>
|
1218
|
+
|
1219
|
+
</li>
|
1220
|
+
|
1221
|
+
</ul>
|
1222
|
+
|
1223
|
+
|
1224
|
+
<p class="tag_title">Returns:</p>
|
1225
|
+
<ul class="return">
|
1226
|
+
|
1227
|
+
<li>
|
1228
|
+
|
1229
|
+
|
1230
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeExecutor (module)">FakeExecutor</a></span></tt>)</span>
|
1231
|
+
|
1232
|
+
|
1233
|
+
|
1234
|
+
</li>
|
1235
|
+
|
1236
|
+
</ul>
|
1237
|
+
|
1238
|
+
</div><table class="source_code">
|
1239
|
+
<tr>
|
1240
|
+
<td>
|
1241
|
+
<pre class="lines">
|
1242
|
+
|
1243
|
+
|
1244
|
+
47
|
1245
|
+
48
|
1246
|
+
49
|
1247
|
+
50
|
1248
|
+
51
|
1249
|
+
52
|
1250
|
+
53
|
1251
|
+
54
|
1252
|
+
55
|
1253
|
+
56
|
1254
|
+
57
|
1255
|
+
58
|
1256
|
+
59
|
1257
|
+
60
|
1258
|
+
61
|
1259
|
+
62
|
1260
|
+
63
|
1261
|
+
64
|
1262
|
+
65
|
1263
|
+
66
|
1264
|
+
67
|
1265
|
+
68
|
1266
|
+
69
|
1267
|
+
70
|
1268
|
+
71
|
1269
|
+
72
|
1270
|
+
73
|
1271
|
+
74
|
1272
|
+
75
|
1273
|
+
76
|
1274
|
+
77
|
1275
|
+
78
|
1276
|
+
79
|
1277
|
+
80
|
1278
|
+
81
|
1279
|
+
82
|
1280
|
+
83</pre>
|
1281
|
+
</td>
|
1282
|
+
<td>
|
1283
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 47</span>
|
1284
|
+
|
1285
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_input'>load_input</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
1286
|
+
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1287
|
+
<span class='label'>rel_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1288
|
+
<span class='label'>input_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1289
|
+
<span class='label'>content:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1290
|
+
<span class='label'>page:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1291
|
+
<span class='label'>vars:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1292
|
+
<span class='label'>pages:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1293
|
+
<span class='label'>outputs:</span> <span class='kw'>nil</span>
|
1294
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
|
1295
|
+
<span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_input_dir'>input_dir</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:input_dir</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_expand_relative_input'>expand_relative_input</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:rel_dir</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_input_dir'>input_dir</span>
|
1296
|
+
|
1297
|
+
<span class='comment'># Load overrides
|
1298
|
+
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:content</span><span class='rbracket'>]</span>
|
1299
|
+
<span class='id identifier rubyid_new_page'>new_page</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'>deep_stringify_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:page</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:page</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1300
|
+
<span class='id identifier rubyid_save_pages'>save_pages</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:pages</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:pages</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1301
|
+
<span class='id identifier rubyid_save_outputs'>save_outputs</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:outputs</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:outputs</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1302
|
+
<span class='id identifier rubyid_vars'>vars</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
1303
|
+
<span class='id identifier rubyid_vars'>vars</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'>deep_stringify_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:vars</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:vars</span><span class='rbracket'>]</span>
|
1304
|
+
|
1305
|
+
<span class='comment'># Load input files
|
1306
|
+
</span> <span class='kw'>unless</span> <span class='id identifier rubyid_dir'>dir</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1307
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Test/Helper.html" title="DhEasy::Test::Helper (module)">Helper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_load_file'><span class='object_link'><a href="../../Test/Helper.html#load_file-class_method" title="DhEasy::Test::Helper.load_file (method)">load_file</a></span></span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>content</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1308
|
+
<span class='id identifier rubyid_new_page'>new_page</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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Test/Helper.html" title="DhEasy::Test::Helper (module)">Helper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_load_json_file'><span class='object_link'><a href="../../Test/Helper.html#load_json_file-class_method" title="DhEasy::Test::Helper.load_json_file (method)">load_json_file</a></span></span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>page.json</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1309
|
+
<span class='id identifier rubyid_input_pages'>input_pages</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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Test/Helper.html" title="DhEasy::Test::Helper (module)">Helper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_load_json_file'><span class='object_link'><a href="../../Test/Helper.html#load_json_file-class_method" title="DhEasy::Test::Helper.load_json_file (method)">load_json_file</a></span></span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>pages.json</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1310
|
+
<span class='id identifier rubyid_save_pages'>save_pages</span> <span class='id identifier rubyid_input_pages'>input_pages</span> <span class='kw'>unless</span> <span class='id identifier rubyid_input_pages'>input_pages</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1311
|
+
<span class='id identifier rubyid_input_outputs'>input_outputs</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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Test/Helper.html" title="DhEasy::Test::Helper (module)">Helper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_load_json_file'><span class='object_link'><a href="../../Test/Helper.html#load_json_file-class_method" title="DhEasy::Test::Helper.load_json_file (method)">load_json_file</a></span></span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>outputs.json</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1312
|
+
<span class='id identifier rubyid_save_outputs'>save_outputs</span> <span class='id identifier rubyid_input_outputs'>input_outputs</span> <span class='kw'>unless</span> <span class='id identifier rubyid_input_outputs'>input_outputs</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1313
|
+
<span class='id identifier rubyid_input_vars'>input_vars</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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Test/Helper.html" title="DhEasy::Test::Helper (module)">Helper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_load_json_file'><span class='object_link'><a href="../../Test/Helper.html#load_json_file-class_method" title="DhEasy::Test::Helper.load_json_file (method)">load_json_file</a></span></span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_dir'>dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>vars.json</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1314
|
+
<span class='id identifier rubyid_vars'>vars</span> <span class='op'>||=</span> <span class='id identifier rubyid_input_vars'>input_vars</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:page</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1315
|
+
<span class='kw'>end</span>
|
1316
|
+
|
1317
|
+
<span class='comment'># Load vars only when no page override and not nil
|
1318
|
+
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_page'>page</span> <span class='op'>=</span> <span class='id identifier rubyid_new_page'>new_page</span> <span class='kw'>unless</span> <span class='id identifier rubyid_new_page'>new_page</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1319
|
+
<span class='id identifier rubyid_page'>page</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>vars</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_vars'>vars</span> <span class='kw'>unless</span> <span class='id identifier rubyid_vars'>vars</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1320
|
+
<span class='kw'>self</span>
|
1321
|
+
<span class='kw'>end</span></pre>
|
1322
|
+
</td>
|
1323
|
+
</tr>
|
1324
|
+
</table>
|
1325
|
+
</div>
|
1326
|
+
|
1327
|
+
<div class="method_details ">
|
1328
|
+
<h3 class="signature " id="match_expected_outputs-instance_method">
|
1329
|
+
|
1330
|
+
#<strong>match_expected_outputs</strong>(opts = {}) ⇒ <tt>Hash</tt>
|
1331
|
+
|
1332
|
+
|
1333
|
+
|
1334
|
+
|
1335
|
+
|
1336
|
+
</h3><div class="docstring">
|
1337
|
+
<div class="discussion">
|
1338
|
+
|
1339
|
+
<p>Match expected outputs.</p>
|
1340
|
+
|
1341
|
+
|
1342
|
+
</div>
|
1343
|
+
</div>
|
1344
|
+
<div class="tags">
|
1345
|
+
<p class="tag_title">Parameters:</p>
|
1346
|
+
<ul class="param">
|
1347
|
+
|
1348
|
+
<li>
|
1349
|
+
|
1350
|
+
<span class='name'>opts</span>
|
1351
|
+
|
1352
|
+
|
1353
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1354
|
+
|
1355
|
+
|
1356
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1357
|
+
|
1358
|
+
|
1359
|
+
—
|
1360
|
+
<div class='inline'>
|
1361
|
+
<p>({}) Configuration options.</p>
|
1362
|
+
</div>
|
1363
|
+
|
1364
|
+
</li>
|
1365
|
+
|
1366
|
+
</ul>
|
1367
|
+
|
1368
|
+
|
1369
|
+
|
1370
|
+
|
1371
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
1372
|
+
<ul class="option">
|
1373
|
+
|
1374
|
+
<li>
|
1375
|
+
<span class="name">:input_dir</span>
|
1376
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
1377
|
+
<span class="default">
|
1378
|
+
|
1379
|
+
— default:
|
1380
|
+
<tt>nil</tt>
|
1381
|
+
|
1382
|
+
</span>
|
1383
|
+
|
1384
|
+
— <div class='inline'>
|
1385
|
+
<p>Will load files from this directory. The files map as follows (file_name
|
1386
|
+
-> description): “` expected_outputs.json -> expected outputs to
|
1387
|
+
compare with saved_outputs. “`</p>
|
1388
|
+
</div>
|
1389
|
+
|
1390
|
+
</li>
|
1391
|
+
|
1392
|
+
<li>
|
1393
|
+
<span class="name">:rel_dir</span>
|
1394
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
1395
|
+
<span class="default">
|
1396
|
+
|
1397
|
+
— default:
|
1398
|
+
<tt>nil</tt>
|
1399
|
+
|
1400
|
+
</span>
|
1401
|
+
|
1402
|
+
— <div class='inline'>
|
1403
|
+
<p>Same as <code>:input_dir</code> option but relative to root input directory
|
1404
|
+
(see #root_input_dir).</p>
|
1405
|
+
</div>
|
1406
|
+
|
1407
|
+
</li>
|
1408
|
+
|
1409
|
+
<li>
|
1410
|
+
<span class="name">:outputs</span>
|
1411
|
+
<span class="type">(<tt>Hash</tt>, <tt>nil</tt>)</span>
|
1412
|
+
<span class="default">
|
1413
|
+
|
1414
|
+
</span>
|
1415
|
+
|
1416
|
+
— <div class='inline'>
|
1417
|
+
<p>Expected outputs to load. It will override `expected_outputs.json` from
|
1418
|
+
input directory.</p>
|
1419
|
+
</div>
|
1420
|
+
|
1421
|
+
</li>
|
1422
|
+
|
1423
|
+
<li>
|
1424
|
+
<span class="name">:skip_fields</span>
|
1425
|
+
<span class="type">(<tt>Array</tt>)</span>
|
1426
|
+
<span class="default">
|
1427
|
+
|
1428
|
+
— default:
|
1429
|
+
<tt>nil</tt>
|
1430
|
+
|
1431
|
+
</span>
|
1432
|
+
|
1433
|
+
— <div class='inline'>
|
1434
|
+
<p>Fields to skip on match.</p>
|
1435
|
+
</div>
|
1436
|
+
|
1437
|
+
</li>
|
1438
|
+
|
1439
|
+
<li>
|
1440
|
+
<span class="name">:default_skip_fields</span>
|
1441
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
1442
|
+
<span class="default">
|
1443
|
+
|
1444
|
+
— default:
|
1445
|
+
<tt>true</tt>
|
1446
|
+
|
1447
|
+
</span>
|
1448
|
+
|
1449
|
+
— <div class='inline'>
|
1450
|
+
<p>Add `_gid`, `_job_id` and `_created_at` to the `:skip_fields` list when
|
1451
|
+
`true`.</p>
|
1452
|
+
</div>
|
1453
|
+
|
1454
|
+
</li>
|
1455
|
+
|
1456
|
+
</ul>
|
1457
|
+
|
1458
|
+
|
1459
|
+
<p class="tag_title">Returns:</p>
|
1460
|
+
<ul class="return">
|
1461
|
+
|
1462
|
+
<li>
|
1463
|
+
|
1464
|
+
|
1465
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1466
|
+
|
1467
|
+
|
1468
|
+
|
1469
|
+
—
|
1470
|
+
<div class='inline'>
|
1471
|
+
<p>A hash with the following structure:</p>
|
1472
|
+
<ul><li>
|
1473
|
+
<p>`[Boolean] match` `true` when match, `false` when diff.</p>
|
1474
|
+
</li><li>
|
1475
|
+
<p>`[Hash] expected` Non matching expected outputs.</p>
|
1476
|
+
</li><li>
|
1477
|
+
<p>`[Hash] saved` Non matching saved outputs.</p>
|
1478
|
+
</li></ul>
|
1479
|
+
</div>
|
1480
|
+
|
1481
|
+
</li>
|
1482
|
+
|
1483
|
+
</ul>
|
1484
|
+
|
1485
|
+
</div><table class="source_code">
|
1486
|
+
<tr>
|
1487
|
+
<td>
|
1488
|
+
<pre class="lines">
|
1489
|
+
|
1490
|
+
|
1491
|
+
285
|
1492
|
+
286
|
1493
|
+
287
|
1494
|
+
288
|
1495
|
+
289
|
1496
|
+
290
|
1497
|
+
291
|
1498
|
+
292
|
1499
|
+
293
|
1500
|
+
294
|
1501
|
+
295
|
1502
|
+
296
|
1503
|
+
297
|
1504
|
+
298
|
1505
|
+
299
|
1506
|
+
300
|
1507
|
+
301
|
1508
|
+
302
|
1509
|
+
303
|
1510
|
+
304
|
1511
|
+
305
|
1512
|
+
306
|
1513
|
+
307
|
1514
|
+
308
|
1515
|
+
309
|
1516
|
+
310
|
1517
|
+
311
|
1518
|
+
312
|
1519
|
+
313
|
1520
|
+
314
|
1521
|
+
315
|
1522
|
+
316
|
1523
|
+
317
|
1524
|
+
318</pre>
|
1525
|
+
</td>
|
1526
|
+
<td>
|
1527
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 285</span>
|
1528
|
+
|
1529
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_match_expected_outputs'>match_expected_outputs</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
1530
|
+
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1531
|
+
<span class='label'>rel_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1532
|
+
<span class='label'>input_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1533
|
+
<span class='label'>outputs:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1534
|
+
<span class='label'>skip_fields:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1535
|
+
<span class='label'>default_skip_fields:</span> <span class='kw'>true</span><span class='comma'>,</span>
|
1536
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
|
1537
|
+
|
1538
|
+
<span class='comment'># Expected context
|
1539
|
+
</span> <span class='id identifier rubyid_expected_opts'>expected_opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
|
1540
|
+
<span class='id identifier rubyid_expected_opts'>expected_opts</span><span class='lbracket'>[</span><span class='symbol'>:input_dir</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='id identifier rubyid_input_dir'>input_dir</span>
|
1541
|
+
<span class='id identifier rubyid_expected'>expected</span> <span class='op'>=</span> <span class='id identifier rubyid_new_executor'>new_executor</span>
|
1542
|
+
<span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_root_input_dir'>root_input_dir</span> <span class='op'>=</span> <span class='id identifier rubyid_root_input_dir'>root_input_dir</span>
|
1543
|
+
<span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_load_expected_outputs'>load_expected_outputs</span> <span class='id identifier rubyid_expected_opts'>expected_opts</span>
|
1544
|
+
|
1545
|
+
<span class='comment'># Config skip fields
|
1546
|
+
</span> <span class='id identifier rubyid_skip_fields'>skip_fields</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:skip_fields</span><span class='rbracket'>]</span>
|
1547
|
+
<span class='id identifier rubyid_skip_fields'>skip_fields</span> <span class='op'>+=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_created_at</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_gid</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_job_id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:default_skip_fields</span><span class='rbracket'>]</span>
|
1548
|
+
<span class='id identifier rubyid_skip_fields'>skip_fields</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span>
|
1549
|
+
|
1550
|
+
<span class='comment'># Diff
|
1551
|
+
</span> <span class='id identifier rubyid_diff'>diff</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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Test/Helper.html" title="DhEasy::Test::Helper (module)">Helper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_match_collections'><span class='object_link'><a href="../../Test/Helper.html#match_collections-class_method" title="DhEasy::Test::Helper.match_collections (method)">match_collections</a></span></span><span class='lparen'>(</span>
|
1552
|
+
<span class='id identifier rubyid_saved_outputs'>saved_outputs</span><span class='comma'>,</span>
|
1553
|
+
<span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_saved_outputs'>saved_outputs</span><span class='comma'>,</span>
|
1554
|
+
<span class='label'>skip:</span> <span class='id identifier rubyid_skip_fields'>skip_fields</span><span class='comma'>,</span>
|
1555
|
+
<span class='label'>compare_way:</span> <span class='symbol'>:left</span>
|
1556
|
+
<span class='rparen'>)</span>
|
1557
|
+
<span class='lbrace'>{</span>
|
1558
|
+
<span class='label'>match:</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:match</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1559
|
+
<span class='label'>saved:</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:diff</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:items_a</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1560
|
+
<span class='label'>expected:</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:diff</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:items_b</span><span class='rbracket'>]</span>
|
1561
|
+
<span class='rbrace'>}</span>
|
1562
|
+
<span class='kw'>end</span></pre>
|
1563
|
+
</td>
|
1564
|
+
</tr>
|
1565
|
+
</table>
|
1566
|
+
</div>
|
1567
|
+
|
1568
|
+
<div class="method_details ">
|
1569
|
+
<h3 class="signature " id="match_expected_pages-instance_method">
|
1570
|
+
|
1571
|
+
#<strong>match_expected_pages</strong>(opts = {}) ⇒ <tt>Hash</tt>
|
1572
|
+
|
1573
|
+
|
1574
|
+
|
1575
|
+
|
1576
|
+
|
1577
|
+
</h3><div class="docstring">
|
1578
|
+
<div class="discussion">
|
1579
|
+
|
1580
|
+
<p>Match expected pages.</p>
|
1581
|
+
|
1582
|
+
|
1583
|
+
</div>
|
1584
|
+
</div>
|
1585
|
+
<div class="tags">
|
1586
|
+
<p class="tag_title">Parameters:</p>
|
1587
|
+
<ul class="param">
|
1588
|
+
|
1589
|
+
<li>
|
1590
|
+
|
1591
|
+
<span class='name'>opts</span>
|
1592
|
+
|
1593
|
+
|
1594
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1595
|
+
|
1596
|
+
|
1597
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1598
|
+
|
1599
|
+
|
1600
|
+
—
|
1601
|
+
<div class='inline'>
|
1602
|
+
<p>({}) Configuration options.</p>
|
1603
|
+
</div>
|
1604
|
+
|
1605
|
+
</li>
|
1606
|
+
|
1607
|
+
</ul>
|
1608
|
+
|
1609
|
+
|
1610
|
+
|
1611
|
+
|
1612
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
1613
|
+
<ul class="option">
|
1614
|
+
|
1615
|
+
<li>
|
1616
|
+
<span class="name">:input_dir</span>
|
1617
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
1618
|
+
<span class="default">
|
1619
|
+
|
1620
|
+
— default:
|
1621
|
+
<tt>nil</tt>
|
1622
|
+
|
1623
|
+
</span>
|
1624
|
+
|
1625
|
+
— <div class='inline'>
|
1626
|
+
<p>Will load files from this directory. The files map as follows (file_name
|
1627
|
+
-> description): “` expected_pages.json -> expected pages to compare
|
1628
|
+
with saved_pages. “`</p>
|
1629
|
+
</div>
|
1630
|
+
|
1631
|
+
</li>
|
1632
|
+
|
1633
|
+
<li>
|
1634
|
+
<span class="name">:rel_dir</span>
|
1635
|
+
<span class="type">(<tt>String</tt>, <tt>nil</tt>)</span>
|
1636
|
+
<span class="default">
|
1637
|
+
|
1638
|
+
— default:
|
1639
|
+
<tt>nil</tt>
|
1640
|
+
|
1641
|
+
</span>
|
1642
|
+
|
1643
|
+
— <div class='inline'>
|
1644
|
+
<p>Same as <code>:input_dir</code> option but relative to root input directory
|
1645
|
+
(see #root_input_dir).</p>
|
1646
|
+
</div>
|
1647
|
+
|
1648
|
+
</li>
|
1649
|
+
|
1650
|
+
<li>
|
1651
|
+
<span class="name">:pages</span>
|
1652
|
+
<span class="type">(<tt>Hash</tt>, <tt>nil</tt>)</span>
|
1653
|
+
<span class="default">
|
1654
|
+
|
1655
|
+
</span>
|
1656
|
+
|
1657
|
+
— <div class='inline'>
|
1658
|
+
<p>Expected pages to load. It will override `expected_pages.json` from input
|
1659
|
+
directory.</p>
|
1660
|
+
</div>
|
1661
|
+
|
1662
|
+
</li>
|
1663
|
+
|
1664
|
+
<li>
|
1665
|
+
<span class="name">:skip_fields</span>
|
1666
|
+
<span class="type">(<tt>Array</tt>)</span>
|
1667
|
+
<span class="default">
|
1668
|
+
|
1669
|
+
— default:
|
1670
|
+
<tt>nil</tt>
|
1671
|
+
|
1672
|
+
</span>
|
1673
|
+
|
1674
|
+
— <div class='inline'>
|
1675
|
+
<p>Fields to skip on match.</p>
|
1676
|
+
</div>
|
1677
|
+
|
1678
|
+
</li>
|
1679
|
+
|
1680
|
+
<li>
|
1681
|
+
<span class="name">:default_skip_fields</span>
|
1682
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
1683
|
+
<span class="default">
|
1684
|
+
|
1685
|
+
— default:
|
1686
|
+
<tt>true</tt>
|
1687
|
+
|
1688
|
+
</span>
|
1689
|
+
|
1690
|
+
— <div class='inline'>
|
1691
|
+
<p>Add `gid` and `job_id` to the `:skip_fields` list when `true`.</p>
|
1692
|
+
</div>
|
1693
|
+
|
1694
|
+
</li>
|
1695
|
+
|
1696
|
+
</ul>
|
1697
|
+
|
1698
|
+
|
1699
|
+
<p class="tag_title">Returns:</p>
|
1700
|
+
<ul class="return">
|
1701
|
+
|
1702
|
+
<li>
|
1703
|
+
|
1704
|
+
|
1705
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1706
|
+
|
1707
|
+
|
1708
|
+
|
1709
|
+
—
|
1710
|
+
<div class='inline'>
|
1711
|
+
<p>A hash with the following fields:</p>
|
1712
|
+
<ul><li>
|
1713
|
+
<p>`[Boolean] match` `true` when match, `false` when diff.</p>
|
1714
|
+
</li><li>
|
1715
|
+
<p>`[Hash] saved` Non matching saved pages.</p>
|
1716
|
+
</li><li>
|
1717
|
+
<p>`[Hash] expected` Non matching expected pages.</p>
|
1718
|
+
</li></ul>
|
1719
|
+
</div>
|
1720
|
+
|
1721
|
+
</li>
|
1722
|
+
|
1723
|
+
</ul>
|
1724
|
+
|
1725
|
+
</div><table class="source_code">
|
1726
|
+
<tr>
|
1727
|
+
<td>
|
1728
|
+
<pre class="lines">
|
1729
|
+
|
1730
|
+
|
1731
|
+
213
|
1732
|
+
214
|
1733
|
+
215
|
1734
|
+
216
|
1735
|
+
217
|
1736
|
+
218
|
1737
|
+
219
|
1738
|
+
220
|
1739
|
+
221
|
1740
|
+
222
|
1741
|
+
223
|
1742
|
+
224
|
1743
|
+
225
|
1744
|
+
226
|
1745
|
+
227
|
1746
|
+
228
|
1747
|
+
229
|
1748
|
+
230
|
1749
|
+
231
|
1750
|
+
232
|
1751
|
+
233
|
1752
|
+
234
|
1753
|
+
235
|
1754
|
+
236
|
1755
|
+
237
|
1756
|
+
238
|
1757
|
+
239
|
1758
|
+
240
|
1759
|
+
241
|
1760
|
+
242
|
1761
|
+
243
|
1762
|
+
244
|
1763
|
+
245
|
1764
|
+
246
|
1765
|
+
247</pre>
|
1766
|
+
</td>
|
1767
|
+
<td>
|
1768
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 213</span>
|
1769
|
+
|
1770
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_match_expected_pages'>match_expected_pages</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
1771
|
+
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1772
|
+
<span class='label'>rel_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1773
|
+
<span class='label'>input_dir:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1774
|
+
<span class='label'>pages:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1775
|
+
<span class='label'>skip_fields:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1776
|
+
<span class='label'>default_skip_fields:</span> <span class='kw'>true</span><span class='comma'>,</span>
|
1777
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
|
1778
|
+
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:input_dir</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='id identifier rubyid_input_dir'>input_dir</span>
|
1779
|
+
|
1780
|
+
<span class='comment'># Expected context
|
1781
|
+
</span> <span class='id identifier rubyid_expected_opts'>expected_opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span> <span class='id identifier rubyid_opts'>opts</span>
|
1782
|
+
<span class='id identifier rubyid_expected_opts'>expected_opts</span><span class='lbracket'>[</span><span class='symbol'>:input_dir</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='id identifier rubyid_input_dir'>input_dir</span>
|
1783
|
+
<span class='id identifier rubyid_expected'>expected</span> <span class='op'>=</span> <span class='id identifier rubyid_new_executor'>new_executor</span>
|
1784
|
+
<span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_root_input_dir'>root_input_dir</span> <span class='op'>=</span> <span class='id identifier rubyid_root_input_dir'>root_input_dir</span>
|
1785
|
+
<span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_load_expected_pages'>load_expected_pages</span> <span class='id identifier rubyid_expected_opts'>expected_opts</span>
|
1786
|
+
|
1787
|
+
<span class='comment'># Config skip fields
|
1788
|
+
</span> <span class='id identifier rubyid_skip_fields'>skip_fields</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:skip_fields</span><span class='rbracket'>]</span>
|
1789
|
+
<span class='id identifier rubyid_skip_fields'>skip_fields</span> <span class='op'>+=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>gid</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>job_id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:default_skip_fields</span><span class='rbracket'>]</span>
|
1790
|
+
<span class='id identifier rubyid_skip_fields'>skip_fields</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span>
|
1791
|
+
|
1792
|
+
<span class='comment'># Diff
|
1793
|
+
</span> <span class='id identifier rubyid_diff'>diff</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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Test/Helper.html" title="DhEasy::Test::Helper (module)">Helper</a></span></span><span class='period'>.</span><span class='id identifier rubyid_match_collections'><span class='object_link'><a href="../../Test/Helper.html#match_collections-class_method" title="DhEasy::Test::Helper.match_collections (method)">match_collections</a></span></span><span class='lparen'>(</span>
|
1794
|
+
<span class='id identifier rubyid_saved_pages'>saved_pages</span><span class='comma'>,</span>
|
1795
|
+
<span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_saved_pages'>saved_pages</span><span class='comma'>,</span>
|
1796
|
+
<span class='label'>skip:</span> <span class='id identifier rubyid_skip_fields'>skip_fields</span><span class='comma'>,</span>
|
1797
|
+
<span class='label'>compare_way:</span> <span class='symbol'>:left</span>
|
1798
|
+
<span class='rparen'>)</span>
|
1799
|
+
<span class='lbrace'>{</span>
|
1800
|
+
<span class='label'>match:</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:match</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1801
|
+
<span class='label'>saved:</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:diff</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:items_a</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1802
|
+
<span class='label'>expected:</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:diff</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:items_b</span><span class='rbracket'>]</span>
|
1803
|
+
<span class='rbrace'>}</span>
|
1804
|
+
<span class='kw'>end</span></pre>
|
1805
|
+
</td>
|
1806
|
+
</tr>
|
1807
|
+
</table>
|
1808
|
+
</div>
|
1809
|
+
|
1810
|
+
<div class="method_details ">
|
1811
|
+
<h3 class="signature " id="new_executor-instance_method">
|
1812
|
+
|
1813
|
+
#<strong>new_executor</strong> ⇒ <tt><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeExecutor (module)">DhEasy::Core::Mock::FakeExecutor</a></span></tt>
|
1814
|
+
|
1815
|
+
|
1816
|
+
|
1817
|
+
|
1818
|
+
|
1819
|
+
</h3><div class="docstring">
|
1820
|
+
<div class="discussion">
|
1821
|
+
|
1822
|
+
<p>Create an executor based on the current executor type.</p>
|
1823
|
+
|
1824
|
+
|
1825
|
+
</div>
|
1826
|
+
</div>
|
1827
|
+
<div class="tags">
|
1828
|
+
|
1829
|
+
<p class="tag_title">Returns:</p>
|
1830
|
+
<ul class="return">
|
1831
|
+
|
1832
|
+
<li>
|
1833
|
+
|
1834
|
+
|
1835
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="DhEasy::Core::Mock::FakeExecutor (module)">DhEasy::Core::Mock::FakeExecutor</a></span></tt>)</span>
|
1836
|
+
|
1837
|
+
|
1838
|
+
|
1839
|
+
</li>
|
1840
|
+
|
1841
|
+
</ul>
|
1842
|
+
|
1843
|
+
</div><table class="source_code">
|
1844
|
+
<tr>
|
1845
|
+
<td>
|
1846
|
+
<pre class="lines">
|
1847
|
+
|
1848
|
+
|
1849
|
+
189
|
1850
|
+
190
|
1851
|
+
191</pre>
|
1852
|
+
</td>
|
1853
|
+
<td>
|
1854
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 189</span>
|
1855
|
+
|
1856
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_new_executor'>new_executor</span>
|
1857
|
+
<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'>new</span>
|
1858
|
+
<span class='kw'>end</span></pre>
|
1859
|
+
</td>
|
1860
|
+
</tr>
|
1861
|
+
</table>
|
1862
|
+
</div>
|
1863
|
+
|
1864
|
+
<div class="method_details ">
|
1865
|
+
<h3 class="signature " id="should_match_outputs-instance_method">
|
1866
|
+
|
1867
|
+
#<strong>should_match_outputs</strong>(opts = {}) ⇒ <tt>Boolean</tt>
|
1868
|
+
|
1869
|
+
|
1870
|
+
|
1871
|
+
|
1872
|
+
|
1873
|
+
</h3><div class="docstring">
|
1874
|
+
<div class="discussion">
|
1875
|
+
|
1876
|
+
<p>Match saved outputs with expected and verbose diff.
|
1877
|
+
Test::Helper#match_expected_outputs</p>
|
1878
|
+
|
1879
|
+
|
1880
|
+
</div>
|
1881
|
+
</div>
|
1882
|
+
<div class="tags">
|
1883
|
+
<p class="tag_title">Parameters:</p>
|
1884
|
+
<ul class="param">
|
1885
|
+
|
1886
|
+
<li>
|
1887
|
+
|
1888
|
+
<span class='name'>opts</span>
|
1889
|
+
|
1890
|
+
|
1891
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1892
|
+
|
1893
|
+
|
1894
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1895
|
+
|
1896
|
+
|
1897
|
+
—
|
1898
|
+
<div class='inline'>
|
1899
|
+
<p>a customizable set of options</p>
|
1900
|
+
</div>
|
1901
|
+
|
1902
|
+
</li>
|
1903
|
+
|
1904
|
+
</ul>
|
1905
|
+
|
1906
|
+
|
1907
|
+
|
1908
|
+
|
1909
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
1910
|
+
<ul class="option">
|
1911
|
+
|
1912
|
+
<li>
|
1913
|
+
<span class="name">:log_caller</span>
|
1914
|
+
<span class="type">(<tt>Array</tt>)</span>
|
1915
|
+
<span class="default">
|
1916
|
+
|
1917
|
+
— default:
|
1918
|
+
<tt>nil</tt>
|
1919
|
+
|
1920
|
+
</span>
|
1921
|
+
|
1922
|
+
— <div class='inline'>
|
1923
|
+
<p>Log caller. Defaults to method `caller`.</p>
|
1924
|
+
</div>
|
1925
|
+
|
1926
|
+
</li>
|
1927
|
+
|
1928
|
+
</ul>
|
1929
|
+
|
1930
|
+
|
1931
|
+
<p class="tag_title">Returns:</p>
|
1932
|
+
<ul class="return">
|
1933
|
+
|
1934
|
+
<li>
|
1935
|
+
|
1936
|
+
|
1937
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1938
|
+
|
1939
|
+
|
1940
|
+
|
1941
|
+
—
|
1942
|
+
<div class='inline'>
|
1943
|
+
<p>`true` when pass, else `false`.</p>
|
1944
|
+
</div>
|
1945
|
+
|
1946
|
+
</li>
|
1947
|
+
|
1948
|
+
</ul>
|
1949
|
+
|
1950
|
+
</div><table class="source_code">
|
1951
|
+
<tr>
|
1952
|
+
<td>
|
1953
|
+
<pre class="lines">
|
1954
|
+
|
1955
|
+
|
1956
|
+
326
|
1957
|
+
327
|
1958
|
+
328
|
1959
|
+
329
|
1960
|
+
330
|
1961
|
+
331
|
1962
|
+
332
|
1963
|
+
333
|
1964
|
+
334</pre>
|
1965
|
+
</td>
|
1966
|
+
<td>
|
1967
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 326</span>
|
1968
|
+
|
1969
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_should_match_outputs'>should_match_outputs</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
1970
|
+
<span class='id identifier rubyid_flush'>flush</span>
|
1971
|
+
<span class='id identifier rubyid_diff'>diff</span> <span class='op'>=</span> <span class='id identifier rubyid_match_expected_outputs'>match_expected_outputs</span> <span class='id identifier rubyid_opts'>opts</span>
|
1972
|
+
<span class='id identifier rubyid_log_caller'>log_caller</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:log_caller</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id identifier rubyid_caller'>caller</span><span class='rparen'>)</span>
|
1973
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:match</span><span class='rbracket'>]</span>
|
1974
|
+
<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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='period'>.</span><span class='id identifier rubyid_verbose_match_diff'><span class='object_link'><a href="../../Test.html#verbose_match_diff-class_method" title="DhEasy::Test.verbose_match_diff (method)">verbose_match_diff</a></span></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>outputs</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_diff'>diff</span><span class='comma'>,</span> <span class='id identifier rubyid_log_caller'>log_caller</span>
|
1975
|
+
<span class='kw'>end</span>
|
1976
|
+
<span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:match</span><span class='rbracket'>]</span>
|
1977
|
+
<span class='kw'>end</span></pre>
|
1978
|
+
</td>
|
1979
|
+
</tr>
|
1980
|
+
</table>
|
1981
|
+
</div>
|
1982
|
+
|
1983
|
+
<div class="method_details ">
|
1984
|
+
<h3 class="signature " id="should_match_pages-instance_method">
|
1985
|
+
|
1986
|
+
#<strong>should_match_pages</strong>(opts = {}) ⇒ <tt>Boolean</tt>
|
1987
|
+
|
1988
|
+
|
1989
|
+
|
1990
|
+
|
1991
|
+
|
1992
|
+
</h3><div class="docstring">
|
1993
|
+
<div class="discussion">
|
1994
|
+
|
1995
|
+
<p>Match saved pages with expected and verbose diff.
|
1996
|
+
Test::Helper#match_expected</p>
|
1997
|
+
|
1998
|
+
|
1999
|
+
</div>
|
2000
|
+
</div>
|
2001
|
+
<div class="tags">
|
2002
|
+
<p class="tag_title">Parameters:</p>
|
2003
|
+
<ul class="param">
|
2004
|
+
|
2005
|
+
<li>
|
2006
|
+
|
2007
|
+
<span class='name'>opts</span>
|
2008
|
+
|
2009
|
+
|
2010
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
2011
|
+
|
2012
|
+
|
2013
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
2014
|
+
|
2015
|
+
|
2016
|
+
—
|
2017
|
+
<div class='inline'>
|
2018
|
+
<p>a customizable set of options</p>
|
2019
|
+
</div>
|
2020
|
+
|
2021
|
+
</li>
|
2022
|
+
|
2023
|
+
</ul>
|
2024
|
+
|
2025
|
+
|
2026
|
+
|
2027
|
+
|
2028
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
2029
|
+
<ul class="option">
|
2030
|
+
|
2031
|
+
<li>
|
2032
|
+
<span class="name">:log_caller</span>
|
2033
|
+
<span class="type">(<tt>Array</tt>)</span>
|
2034
|
+
<span class="default">
|
2035
|
+
|
2036
|
+
— default:
|
2037
|
+
<tt>nil</tt>
|
2038
|
+
|
2039
|
+
</span>
|
2040
|
+
|
2041
|
+
— <div class='inline'>
|
2042
|
+
<p>Log caller. Defaults to method `caller`.</p>
|
2043
|
+
</div>
|
2044
|
+
|
2045
|
+
</li>
|
2046
|
+
|
2047
|
+
</ul>
|
2048
|
+
|
2049
|
+
|
2050
|
+
<p class="tag_title">Returns:</p>
|
2051
|
+
<ul class="return">
|
2052
|
+
|
2053
|
+
<li>
|
2054
|
+
|
2055
|
+
|
2056
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2057
|
+
|
2058
|
+
|
2059
|
+
|
2060
|
+
—
|
2061
|
+
<div class='inline'>
|
2062
|
+
<p>`true` when pass, else `false`.</p>
|
2063
|
+
</div>
|
2064
|
+
|
2065
|
+
</li>
|
2066
|
+
|
2067
|
+
</ul>
|
2068
|
+
|
2069
|
+
</div><table class="source_code">
|
2070
|
+
<tr>
|
2071
|
+
<td>
|
2072
|
+
<pre class="lines">
|
2073
|
+
|
2074
|
+
|
2075
|
+
255
|
2076
|
+
256
|
2077
|
+
257
|
2078
|
+
258
|
2079
|
+
259
|
2080
|
+
260
|
2081
|
+
261
|
2082
|
+
262
|
2083
|
+
263</pre>
|
2084
|
+
</td>
|
2085
|
+
<td>
|
2086
|
+
<pre class="code"><span class="info file"># File 'lib/dh_easy_override/core/mock/fake_executor.rb', line 255</span>
|
2087
|
+
|
2088
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_should_match_pages'>should_match_pages</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
2089
|
+
<span class='id identifier rubyid_flush'>flush</span>
|
2090
|
+
<span class='id identifier rubyid_diff'>diff</span> <span class='op'>=</span> <span class='id identifier rubyid_match_expected_pages'>match_expected_pages</span> <span class='id identifier rubyid_opts'>opts</span>
|
2091
|
+
<span class='id identifier rubyid_log_caller'>log_caller</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:log_caller</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id identifier rubyid_caller'>caller</span><span class='rparen'>)</span>
|
2092
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:match</span><span class='rbracket'>]</span>
|
2093
|
+
<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="../../Test.html" title="DhEasy::Test (module)">Test</a></span></span><span class='period'>.</span><span class='id identifier rubyid_verbose_match_diff'><span class='object_link'><a href="../../Test.html#verbose_match_diff-class_method" title="DhEasy::Test.verbose_match_diff (method)">verbose_match_diff</a></span></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>pages</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_diff'>diff</span><span class='comma'>,</span> <span class='id identifier rubyid_log_caller'>log_caller</span>
|
2094
|
+
<span class='kw'>end</span>
|
2095
|
+
<span class='id identifier rubyid_diff'>diff</span><span class='lbracket'>[</span><span class='symbol'>:match</span><span class='rbracket'>]</span>
|
2096
|
+
<span class='kw'>end</span></pre>
|
2097
|
+
</td>
|
2098
|
+
</tr>
|
2099
|
+
</table>
|
2100
|
+
</div>
|
2101
|
+
|
2102
|
+
</div>
|
2103
|
+
|
2104
|
+
</div>
|
2105
|
+
|
2106
|
+
<div id="footer">
|
2107
|
+
Generated on Wed Dec 4 23:16:05 2019 by
|
2108
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2109
|
+
0.9.20 (ruby-2.5.3).
|
2110
|
+
</div>
|
2111
|
+
|
2112
|
+
</div>
|
2113
|
+
</body>
|
2114
|
+
</html>
|