specfactor 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.idea/workspace.xml +86 -113
- data/Gemfile.lock +1 -1
- data/README.md +9 -1
- data/lib/specfac.rb +23 -11
- data/lib/specfac/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e83d1b11d199a22a9ca3d4369dec7ad8ef1c25c9a13162ba3f4ff22856f9f661
|
4
|
+
data.tar.gz: fed5e156f4cdc25a3849e167e9a55e22a1f89cac1b263e70335e792afffefe7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90d2e9538f2a8cf7909a4abb70a994ed0cd5db3fb9f8e3c8487cbefbae1ab8c447da76b96aba042ef3d5a412c1b81efe7b59bd2aab2140ab293756a8b0456b28
|
7
|
+
data.tar.gz: 1367297e0a4db252810ed8253826832aedec98281e58d0338fd8c55e1af299325577409a2ecc06012b7354f8f9777f635b874cb5829456ce87af7893ddd6c675
|
data/.gitignore
CHANGED
data/.idea/workspace.xml
CHANGED
@@ -2,12 +2,7 @@
|
|
2
2
|
<project version="4">
|
3
3
|
<component name="ChangeListManager">
|
4
4
|
<list default="true" id="9c170d0c-08bf-4830-a863-b6dfc3a02d09" name="Default" comment="">
|
5
|
-
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
6
|
-
<change beforePath="$PROJECT_DIR$/Gemfile.lock" beforeDir="false" afterPath="$PROJECT_DIR$/Gemfile.lock" afterDir="false" />
|
7
5
|
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
|
8
|
-
<change beforePath="$PROJECT_DIR$/lib/specfac.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/specfac.rb" afterDir="false" />
|
9
|
-
<change beforePath="$PROJECT_DIR$/lib/specfac/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/specfac/version.rb" afterDir="false" />
|
10
|
-
<change beforePath="$PROJECT_DIR$/specfac.gemspec" beforeDir="false" afterPath="$PROJECT_DIR$/specfac.gemspec" afterDir="false" />
|
11
6
|
</list>
|
12
7
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
13
8
|
<option name="TRACKING_ENABLED" value="true" />
|
@@ -18,10 +13,10 @@
|
|
18
13
|
</component>
|
19
14
|
<component name="FileEditorManager">
|
20
15
|
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
21
|
-
<file leaf-file-name="specfac.gemspec" pinned="false" current-in-tab="
|
16
|
+
<file leaf-file-name="specfac.gemspec" pinned="false" current-in-tab="false">
|
22
17
|
<entry file="file://$PROJECT_DIR$/specfac.gemspec">
|
23
18
|
<provider selected="true" editor-type-id="text-editor">
|
24
|
-
<state relative-caret-position="
|
19
|
+
<state relative-caret-position="32">
|
25
20
|
<caret line="11" column="124" selection-start-line="11" selection-start-column="124" selection-end-line="11" selection-end-column="124" />
|
26
21
|
</state>
|
27
22
|
</provider>
|
@@ -30,33 +25,28 @@
|
|
30
25
|
<file leaf-file-name="specfac.rb" pinned="false" current-in-tab="false">
|
31
26
|
<entry file="file://$PROJECT_DIR$/lib/specfac.rb">
|
32
27
|
<provider selected="true" editor-type-id="text-editor">
|
33
|
-
<state relative-caret-position="
|
34
|
-
<caret line="
|
28
|
+
<state relative-caret-position="-98">
|
29
|
+
<caret line="67" column="67" selection-start-line="67" selection-start-column="67" selection-end-line="67" selection-end-column="67" />
|
35
30
|
</state>
|
36
31
|
</provider>
|
37
32
|
</entry>
|
38
33
|
</file>
|
39
|
-
<file leaf-file-name="
|
40
|
-
<entry file="file://$PROJECT_DIR$/spec/
|
34
|
+
<file leaf-file-name="rockets_spec.rb" pinned="false" current-in-tab="false">
|
35
|
+
<entry file="file://$PROJECT_DIR$/spec/factories/rockets_spec.rb">
|
41
36
|
<provider selected="true" editor-type-id="text-editor" />
|
42
37
|
</entry>
|
43
38
|
</file>
|
44
|
-
<file leaf-file-name="
|
45
|
-
<entry file="file://$PROJECT_DIR$/spec/controllers/
|
39
|
+
<file leaf-file-name="rockets_controller_spec.rb" pinned="false" current-in-tab="false">
|
40
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/rockets_controller_spec.rb">
|
46
41
|
<provider selected="true" editor-type-id="text-editor" />
|
47
42
|
</entry>
|
48
43
|
</file>
|
49
|
-
<file leaf-file-name="
|
50
|
-
<entry file="file://$PROJECT_DIR$/spec/factories/dogs_spec.rb">
|
51
|
-
<provider selected="true" editor-type-id="text-editor" />
|
52
|
-
</entry>
|
53
|
-
</file>
|
54
|
-
<file leaf-file-name="README.md" pinned="false" current-in-tab="false">
|
44
|
+
<file leaf-file-name="README.md" pinned="false" current-in-tab="true">
|
55
45
|
<entry file="file://$PROJECT_DIR$/README.md">
|
56
46
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
57
47
|
<state split_layout="SPLIT">
|
58
|
-
<first_editor relative-caret-position="
|
59
|
-
<caret line="
|
48
|
+
<first_editor relative-caret-position="176">
|
49
|
+
<caret line="52" lean-forward="true" selection-start-line="52" selection-end-line="52" />
|
60
50
|
</first_editor>
|
61
51
|
<second_editor />
|
62
52
|
</state>
|
@@ -72,29 +62,25 @@
|
|
72
62
|
</provider>
|
73
63
|
</entry>
|
74
64
|
</file>
|
75
|
-
<file leaf-file-name="
|
76
|
-
<entry file="file://$PROJECT_DIR$/lib/
|
65
|
+
<file leaf-file-name="specfac_utils.rb" pinned="false" current-in-tab="false">
|
66
|
+
<entry file="file://$PROJECT_DIR$/lib/specfac_utils.rb">
|
77
67
|
<provider selected="true" editor-type-id="text-editor">
|
78
|
-
<state relative-caret-position="
|
79
|
-
<caret line="
|
68
|
+
<state relative-caret-position="392">
|
69
|
+
<caret line="30" column="3" selection-start-line="30" selection-start-column="3" selection-end-line="30" selection-end-column="3" />
|
80
70
|
</state>
|
81
71
|
</provider>
|
82
72
|
</entry>
|
83
73
|
</file>
|
84
|
-
<file leaf-file-name="
|
85
|
-
<entry file="file://$PROJECT_DIR$/
|
86
|
-
<provider selected="true" editor-type-id="text-editor"
|
87
|
-
<state relative-caret-position="60">
|
88
|
-
<caret line="4" lean-forward="true" selection-start-line="4" selection-end-line="4" />
|
89
|
-
</state>
|
90
|
-
</provider>
|
74
|
+
<file leaf-file-name="dreamcasts_spec.rb" pinned="false" current-in-tab="false">
|
75
|
+
<entry file="file://$PROJECT_DIR$/spec/factories/dreamcasts_spec.rb">
|
76
|
+
<provider selected="true" editor-type-id="text-editor" />
|
91
77
|
</entry>
|
92
78
|
</file>
|
93
|
-
<file leaf-file-name="
|
94
|
-
<entry file="file://$PROJECT_DIR
|
79
|
+
<file leaf-file-name=".gitignore" pinned="false" current-in-tab="false">
|
80
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
95
81
|
<provider selected="true" editor-type-id="text-editor">
|
96
|
-
<state relative-caret-position="
|
97
|
-
<caret line="
|
82
|
+
<state relative-caret-position="120">
|
83
|
+
<caret line="8" column="7" selection-start-line="8" selection-start-column="7" selection-end-line="8" selection-end-column="7" />
|
98
84
|
</state>
|
99
85
|
</provider>
|
100
86
|
</entry>
|
@@ -120,15 +106,15 @@
|
|
120
106
|
<option name="CHANGED_PATHS">
|
121
107
|
<list>
|
122
108
|
<option value="$PROJECT_DIR$/exe/specfac" />
|
123
|
-
<option value="$PROJECT_DIR$/.gitignore" />
|
124
109
|
<option value="$PROJECT_DIR$/lib/factory/spec_module.rb" />
|
125
110
|
<option value="$PROJECT_DIR$/lib/specfac_utils.rb" />
|
126
111
|
<option value="$PROJECT_DIR$/lib/factory_module.rb" />
|
127
112
|
<option value="$PROJECT_DIR$/lib/spec_module.rb" />
|
113
|
+
<option value="$PROJECT_DIR$/specfac.gemspec" />
|
114
|
+
<option value="$PROJECT_DIR$/.gitignore" />
|
128
115
|
<option value="$PROJECT_DIR$/lib/specfac/version.rb" />
|
129
116
|
<option value="$PROJECT_DIR$/lib/specfac.rb" />
|
130
117
|
<option value="$PROJECT_DIR$/README.md" />
|
131
|
-
<option value="$PROJECT_DIR$/specfac.gemspec" />
|
132
118
|
</list>
|
133
119
|
</option>
|
134
120
|
</component>
|
@@ -243,31 +229,43 @@
|
|
243
229
|
<servers />
|
244
230
|
</component>
|
245
231
|
<component name="TimeTrackingManager">
|
246
|
-
<option name="totallyTimeSpent" value="
|
232
|
+
<option name="totallyTimeSpent" value="17223000" />
|
247
233
|
</component>
|
248
234
|
<component name="ToolWindowManager">
|
249
235
|
<frame x="0" y="23" width="1440" height="797" extended-state="0" />
|
250
236
|
<editor active="true" />
|
251
237
|
<layout>
|
252
|
-
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.
|
238
|
+
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.27110156" />
|
253
239
|
<window_info anchor="bottom" id="TODO" order="6" />
|
254
240
|
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
|
255
241
|
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
|
256
242
|
<window_info anchor="right" id="Database" order="3" />
|
257
243
|
<window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
|
258
|
-
<window_info anchor="bottom" id="Run" order="2" />
|
259
244
|
<window_info anchor="bottom" id="Version Control" order="7" />
|
245
|
+
<window_info anchor="bottom" id="Run" order="2" />
|
260
246
|
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
261
247
|
<window_info anchor="bottom" id="Terminal" order="7" visible="true" />
|
262
|
-
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
263
248
|
<window_info id="Favorites" order="2" side_tool="true" />
|
249
|
+
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
264
250
|
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
251
|
+
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
|
265
252
|
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
253
|
+
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.26752505" />
|
254
|
+
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
266
255
|
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
267
256
|
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
257
|
+
<window_info anchor="bottom" id="TODO" order="6" />
|
258
|
+
<window_info anchor="bottom" id="Version Control" order="7" />
|
259
|
+
<window_info anchor="bottom" id="Run" order="2" />
|
260
|
+
<window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
|
261
|
+
<window_info anchor="right" id="Database" order="3" />
|
268
262
|
<window_info anchor="bottom" id="Message" order="0" />
|
263
|
+
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
|
269
264
|
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
265
|
+
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
270
266
|
<window_info anchor="bottom" id="Find" order="1" />
|
267
|
+
<window_info anchor="bottom" id="Terminal" order="7" visible="true" />
|
268
|
+
<window_info id="Favorites" order="2" side_tool="true" />
|
271
269
|
</layout>
|
272
270
|
</component>
|
273
271
|
<component name="TypeScriptGeneratedFilesManager">
|
@@ -277,40 +275,6 @@
|
|
277
275
|
<option name="myLimit" value="2678400000" />
|
278
276
|
</component>
|
279
277
|
<component name="editorHistoryManager">
|
280
|
-
<entry file="file://$PROJECT_DIR$/.gitignore">
|
281
|
-
<provider selected="true" editor-type-id="text-editor">
|
282
|
-
<state relative-caret-position="120">
|
283
|
-
<caret line="8" column="18" selection-start-line="8" selection-start-column="18" selection-end-line="8" selection-end-column="18" />
|
284
|
-
</state>
|
285
|
-
</provider>
|
286
|
-
</entry>
|
287
|
-
<entry file="file://$PROJECT_DIR$/spec/controllers/yammos_controller_spec.rb">
|
288
|
-
<provider selected="true" editor-type-id="text-editor" />
|
289
|
-
</entry>
|
290
|
-
<entry file="file://$PROJECT_DIR$/README.md">
|
291
|
-
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
292
|
-
<state split_layout="SPLIT">
|
293
|
-
<first_editor relative-caret-position="765">
|
294
|
-
<caret line="51" column="94" selection-start-line="51" selection-start-column="94" selection-end-line="51" selection-end-column="94" />
|
295
|
-
</first_editor>
|
296
|
-
<second_editor />
|
297
|
-
</state>
|
298
|
-
</provider>
|
299
|
-
</entry>
|
300
|
-
<entry file="file://$PROJECT_DIR$/lib/specfac/version.rb">
|
301
|
-
<provider selected="true" editor-type-id="text-editor">
|
302
|
-
<state relative-caret-position="15">
|
303
|
-
<caret line="1" column="18" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
|
304
|
-
</state>
|
305
|
-
</provider>
|
306
|
-
</entry>
|
307
|
-
<entry file="file://$PROJECT_DIR$/lib/spec_module.rb">
|
308
|
-
<provider selected="true" editor-type-id="text-editor">
|
309
|
-
<state relative-caret-position="555">
|
310
|
-
<caret line="37" column="29" selection-start-line="37" selection-start-column="29" selection-end-line="37" selection-end-column="29" />
|
311
|
-
</state>
|
312
|
-
</provider>
|
313
|
-
</entry>
|
314
278
|
<entry file="file://$PROJECT_DIR$/lib/specfac.rb">
|
315
279
|
<provider selected="true" editor-type-id="text-editor">
|
316
280
|
<state relative-caret-position="570">
|
@@ -456,41 +420,66 @@
|
|
456
420
|
</state>
|
457
421
|
</provider>
|
458
422
|
</entry>
|
459
|
-
<entry file="file://$PROJECT_DIR
|
423
|
+
<entry file="file://$PROJECT_DIR$/spec/spec_helper.rb" />
|
424
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/rabbits_controller_spec.rb" />
|
425
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/robots_controller_spec.rb" />
|
426
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/yoddels_controller_spec.rb" />
|
427
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/yammos_controller_spec.rb" />
|
428
|
+
<entry file="file://$PROJECT_DIR$/lib/factory_module.rb">
|
429
|
+
<provider selected="true" editor-type-id="text-editor">
|
430
|
+
<state relative-caret-position="60">
|
431
|
+
<caret line="4" selection-start-line="4" selection-end-line="4" />
|
432
|
+
</state>
|
433
|
+
</provider>
|
434
|
+
</entry>
|
435
|
+
<entry file="file://$PROJECT_DIR$/lib/spec_module.rb">
|
460
436
|
<provider selected="true" editor-type-id="text-editor">
|
461
437
|
<state relative-caret-position="120">
|
462
|
-
<caret line="8" column="
|
438
|
+
<caret line="8" column="21" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="21" />
|
463
439
|
</state>
|
464
440
|
</provider>
|
465
441
|
</entry>
|
466
|
-
<entry file="file://$PROJECT_DIR$/spec/
|
467
|
-
<entry file="file://$PROJECT_DIR$/spec/controllers/
|
468
|
-
<entry file="file://$PROJECT_DIR$/spec/controllers/
|
469
|
-
<entry file="file://$PROJECT_DIR$/spec/controllers/yoddels_controller_spec.rb" />
|
470
|
-
<entry file="file://$PROJECT_DIR$/spec/controllers/yammos_controller_spec.rb">
|
442
|
+
<entry file="file://$PROJECT_DIR$/spec/factories/static_spec.rb" />
|
443
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/rog_controller_spec.rb" />
|
444
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/dogs_controller_spec.rb">
|
471
445
|
<provider selected="true" editor-type-id="text-editor" />
|
472
446
|
</entry>
|
473
|
-
<entry file="file://$PROJECT_DIR$/
|
447
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/tests_controller_spec.rb">
|
448
|
+
<provider selected="true" editor-type-id="text-editor" />
|
449
|
+
</entry>
|
450
|
+
<entry file="file://$PROJECT_DIR$/spec/factories/dogs_spec.rb">
|
451
|
+
<provider selected="true" editor-type-id="text-editor" />
|
452
|
+
</entry>
|
453
|
+
<entry file="file://$PROJECT_DIR$/specfac.gemspec">
|
474
454
|
<provider selected="true" editor-type-id="text-editor">
|
475
|
-
<state relative-caret-position="
|
476
|
-
<caret line="
|
455
|
+
<state relative-caret-position="32">
|
456
|
+
<caret line="11" column="124" selection-start-line="11" selection-start-column="124" selection-end-line="11" selection-end-column="124" />
|
477
457
|
</state>
|
478
458
|
</provider>
|
479
459
|
</entry>
|
480
|
-
<entry file="file://$PROJECT_DIR$/lib/
|
460
|
+
<entry file="file://$PROJECT_DIR$/lib/specfac_utils.rb">
|
481
461
|
<provider selected="true" editor-type-id="text-editor">
|
482
|
-
<state relative-caret-position="
|
483
|
-
<caret line="
|
462
|
+
<state relative-caret-position="392">
|
463
|
+
<caret line="30" column="3" selection-start-line="30" selection-start-column="3" selection-end-line="30" selection-end-column="3" />
|
484
464
|
</state>
|
485
465
|
</provider>
|
486
466
|
</entry>
|
487
|
-
<entry file="file://$PROJECT_DIR$/
|
467
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/dreamcasts_controller_spec.rb">
|
468
|
+
<provider selected="true" editor-type-id="text-editor" />
|
469
|
+
</entry>
|
470
|
+
<entry file="file://$PROJECT_DIR$/spec/factories/dreamcasts_spec.rb">
|
471
|
+
<provider selected="true" editor-type-id="text-editor" />
|
472
|
+
</entry>
|
473
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
488
474
|
<provider selected="true" editor-type-id="text-editor">
|
489
475
|
<state relative-caret-position="120">
|
490
|
-
<caret line="8" column="
|
476
|
+
<caret line="8" column="7" selection-start-line="8" selection-start-column="7" selection-end-line="8" selection-end-column="7" />
|
491
477
|
</state>
|
492
478
|
</provider>
|
493
479
|
</entry>
|
480
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/participants_controller_spec.rb">
|
481
|
+
<provider selected="true" editor-type-id="text-editor" />
|
482
|
+
</entry>
|
494
483
|
<entry file="file://$PROJECT_DIR$/lib/specfac/version.rb">
|
495
484
|
<provider selected="true" editor-type-id="text-editor">
|
496
485
|
<state relative-caret-position="15">
|
@@ -498,44 +487,28 @@
|
|
498
487
|
</state>
|
499
488
|
</provider>
|
500
489
|
</entry>
|
501
|
-
<entry file="file://$PROJECT_DIR$/spec/
|
490
|
+
<entry file="file://$PROJECT_DIR$/spec/controllers/rockets_controller_spec.rb">
|
502
491
|
<provider selected="true" editor-type-id="text-editor" />
|
503
492
|
</entry>
|
504
|
-
<entry file="file://$PROJECT_DIR$/spec/
|
493
|
+
<entry file="file://$PROJECT_DIR$/spec/factories/rockets_spec.rb">
|
505
494
|
<provider selected="true" editor-type-id="text-editor" />
|
506
495
|
</entry>
|
507
496
|
<entry file="file://$PROJECT_DIR$/lib/specfac.rb">
|
508
497
|
<provider selected="true" editor-type-id="text-editor">
|
509
|
-
<state relative-caret-position="
|
510
|
-
<caret line="
|
498
|
+
<state relative-caret-position="-98">
|
499
|
+
<caret line="67" column="67" selection-start-line="67" selection-start-column="67" selection-end-line="67" selection-end-column="67" />
|
511
500
|
</state>
|
512
501
|
</provider>
|
513
502
|
</entry>
|
514
|
-
<entry file="file://$PROJECT_DIR$/spec/controllers/dogs_controller_spec.rb">
|
515
|
-
<provider selected="true" editor-type-id="text-editor" />
|
516
|
-
</entry>
|
517
|
-
<entry file="file://$PROJECT_DIR$/spec/controllers/tests_controller_spec.rb">
|
518
|
-
<provider selected="true" editor-type-id="text-editor" />
|
519
|
-
</entry>
|
520
|
-
<entry file="file://$PROJECT_DIR$/spec/factories/dogs_spec.rb">
|
521
|
-
<provider selected="true" editor-type-id="text-editor" />
|
522
|
-
</entry>
|
523
503
|
<entry file="file://$PROJECT_DIR$/README.md">
|
524
504
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
525
505
|
<state split_layout="SPLIT">
|
526
|
-
<first_editor relative-caret-position="
|
527
|
-
<caret line="
|
506
|
+
<first_editor relative-caret-position="176">
|
507
|
+
<caret line="52" lean-forward="true" selection-start-line="52" selection-end-line="52" />
|
528
508
|
</first_editor>
|
529
509
|
<second_editor />
|
530
510
|
</state>
|
531
511
|
</provider>
|
532
512
|
</entry>
|
533
|
-
<entry file="file://$PROJECT_DIR$/specfac.gemspec">
|
534
|
-
<provider selected="true" editor-type-id="text-editor">
|
535
|
-
<state relative-caret-position="165">
|
536
|
-
<caret line="11" column="124" selection-start-line="11" selection-start-column="124" selection-end-line="11" selection-end-column="124" />
|
537
|
-
</state>
|
538
|
-
</provider>
|
539
|
-
</entry>
|
540
513
|
</component>
|
541
514
|
</project>
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -41,13 +41,21 @@ An example usage for specific tests:
|
|
41
41
|
|
42
42
|
specfac generate participants index show
|
43
43
|
|
44
|
+
_This generates spec/controllers/participants_controller_spec.rb with tests for :index and :show_
|
45
|
+
|
44
46
|
An example for all available tests:
|
45
47
|
|
46
48
|
specfac generate participants ALL
|
47
49
|
|
50
|
+
_This generates spec/controllers/participants_controller_spec.rb with tests for all available methods._
|
51
|
+
|
52
|
+
You can also use the command alias "g" and flags such as -f, which tells specfactor to generate the factory for this spec.
|
53
|
+
|
48
54
|
An example generating a FactoryBot factory for the controller:
|
49
55
|
|
50
|
-
specfac
|
56
|
+
specfac g -f dogs ALL
|
57
|
+
|
58
|
+
_This generates spec/controllers/dogs_controller_spec.rb with tests for all available methods AND generates spec/factories/dogs_spec.rb_
|
51
59
|
|
52
60
|
Currently, tests can be generated for :index, :show, :new, :create, :edit, :update, and :destroy.
|
53
61
|
|
data/lib/specfac.rb
CHANGED
@@ -10,7 +10,8 @@ module SpecFac
|
|
10
10
|
attr_accessor :dir_controllers, :dir_factories, :working_dirs, :working_file, :protected_methods, :available_methods, :found_methods
|
11
11
|
|
12
12
|
######### AVAILABLE COMMANDS
|
13
|
-
desc "generate [controller] [actions]", "
|
13
|
+
desc "generate [controller] [actions]", "Generates tests for specified actions. Separate actions with spaces."
|
14
|
+
method_option :aliases => "g"
|
14
15
|
option :f, :type => :boolean
|
15
16
|
def generate(*args)
|
16
17
|
@working_dirs = ["spec", "controllers", "factories"]
|
@@ -28,18 +29,13 @@ module SpecFac
|
|
28
29
|
|
29
30
|
|
30
31
|
if controller
|
31
|
-
sanitize(controller, actions)
|
32
|
+
sanitize(controller, actions, options[:f])
|
32
33
|
else
|
33
34
|
puts "Please provide a controller name."
|
34
35
|
exit
|
35
36
|
end
|
36
37
|
|
37
|
-
# Factories
|
38
38
|
|
39
|
-
if options[:f]
|
40
|
-
controller != nil ? @working_file = "#{@dir_factories}/#{controller.downcase}_spec.rb" : @working_file = "#{@dir_factories}/sample_spec.rb"
|
41
|
-
opener("factory", FactoryModule.create)
|
42
|
-
end
|
43
39
|
end
|
44
40
|
|
45
41
|
######## UTILITY METHODS
|
@@ -51,7 +47,7 @@ module SpecFac
|
|
51
47
|
|
52
48
|
end
|
53
49
|
|
54
|
-
def pull_src(controller, actions)
|
50
|
+
def pull_src(controller, actions, options=nil)
|
55
51
|
create_directories(@working_dirs[0], @dir_controllers, @dir_factories)
|
56
52
|
@working_file = "#{@dir_controllers}/#{controller.downcase}_controller_spec.rb"
|
57
53
|
# Spec tests
|
@@ -65,23 +61,39 @@ module SpecFac
|
|
65
61
|
actions != nil ? actions.each {|action| opener("body", SpecModule.public_send(action.to_sym))} : nil
|
66
62
|
opener("end", "end")
|
67
63
|
|
64
|
+
# Factories
|
68
65
|
|
66
|
+
if options
|
67
|
+
puts
|
68
|
+
@working_file = "#{@dir_factories}/#{controller.downcase}_spec.rb"
|
69
|
+
opener("factory", FactoryModule.create)
|
70
|
+
opener("end", nil)
|
71
|
+
end
|
69
72
|
|
70
73
|
end
|
71
74
|
|
72
75
|
def opener(mode, lines)
|
73
|
-
filer = lambda
|
76
|
+
filer = lambda do |type, output|
|
77
|
+
File.open(@working_file, type) { |handle| handle.puts output}
|
78
|
+
end
|
74
79
|
if mode == "header"
|
80
|
+
puts "Creating spec: #{@working_file}."
|
75
81
|
filer.call("w", nil)
|
76
82
|
lines.each do |item|
|
77
83
|
filer.call("a", item)
|
78
84
|
end
|
85
|
+
elsif mode == "factory"
|
86
|
+
puts "Creating factory: #{@working_file}."
|
87
|
+
filer.call("w", lines)
|
88
|
+
elsif mode == "end"
|
89
|
+
puts "> completed"
|
90
|
+
filer.call("a", lines)
|
79
91
|
else
|
80
92
|
filer.call("a", lines)
|
81
93
|
end
|
82
94
|
end
|
83
95
|
|
84
|
-
def sanitize(controller, actions)
|
96
|
+
def sanitize(controller, actions, options)
|
85
97
|
|
86
98
|
rem = "_controller"
|
87
99
|
if controller.include? "_controller"
|
@@ -96,7 +108,7 @@ module SpecFac
|
|
96
108
|
end
|
97
109
|
|
98
110
|
# p matched_actions
|
99
|
-
pull_src(controller, matched_actions)
|
111
|
+
pull_src(controller, matched_actions, options)
|
100
112
|
end
|
101
113
|
end
|
102
114
|
|
data/lib/specfac/version.rb
CHANGED