repo_manager 0.7.1

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.
Files changed (116) hide show
  1. data/.gemfiles +115 -0
  2. data/.gitattributes +1 -0
  3. data/.gitignore +7 -0
  4. data/.rspec +3 -0
  5. data/.yardopts +11 -0
  6. data/Gemfile +11 -0
  7. data/Gemfile.lock +99 -0
  8. data/Guardfile +63 -0
  9. data/HISTORY.markdown +12 -0
  10. data/LICENSE +20 -0
  11. data/README.markdown +192 -0
  12. data/Rakefile +94 -0
  13. data/TODO.markdown +15 -0
  14. data/VERSION +1 -0
  15. data/bin/repo +151 -0
  16. data/cucumber.yml +28 -0
  17. data/examples/pc_saved_game_backup/.gitignore +2 -0
  18. data/examples/pc_saved_game_backup/INSTALL.markdown +420 -0
  19. data/examples/pc_saved_game_backup/README.markdown +108 -0
  20. data/examples/pc_saved_game_backup/remote/.gitignore +2 -0
  21. data/examples/pc_saved_game_backup/repo_manager/Gemfile +12 -0
  22. data/examples/pc_saved_game_backup/repo_manager/Gemfile.lock +66 -0
  23. data/examples/pc_saved_game_backup/repo_manager/assets/.gitignore +2 -0
  24. data/examples/pc_saved_game_backup/repo_manager/features/support/aruba.rb +15 -0
  25. data/examples/pc_saved_game_backup/repo_manager/features/support/env.rb +11 -0
  26. data/examples/pc_saved_game_backup/repo_manager/features/support/steps.rb +3 -0
  27. data/examples/pc_saved_game_backup/repo_manager/features/tasks/update.feature +144 -0
  28. data/examples/pc_saved_game_backup/repo_manager/global/default/asset.conf +2 -0
  29. data/examples/pc_saved_game_backup/repo_manager/repo.conf +64 -0
  30. data/examples/pc_saved_game_backup/repo_manager/tasks/.gitignore +0 -0
  31. data/examples/pc_saved_game_backup/repo_manager/tasks/remote.rb +57 -0
  32. data/examples/pc_saved_game_backup/repo_manager/tasks/update.rb +65 -0
  33. data/examples/pc_saved_game_backup/saved_games/hearts/save1 +1 -0
  34. data/examples/pc_saved_game_backup/saved_games/hearts/save2 +1 -0
  35. data/examples/pc_saved_game_backup/saved_games/mines/my_profile.ini +1 -0
  36. data/examples/pc_saved_game_backup/saved_games/mines/saves/save1 +1 -0
  37. data/examples/pc_saved_game_backup/saved_games/mines/saves/save2 +1 -0
  38. data/features/actions/git.feature +296 -0
  39. data/features/actions/help.feature +53 -0
  40. data/features/actions/list.feature +624 -0
  41. data/features/actions/path.feature +195 -0
  42. data/features/actions/status.feature +261 -0
  43. data/features/actions/task.feature +127 -0
  44. data/features/assets/configuration.feature +204 -0
  45. data/features/assets/rendering.feature +42 -0
  46. data/features/assets/user_attributes.feature +98 -0
  47. data/features/bin.feature +42 -0
  48. data/features/logger.feature +218 -0
  49. data/features/settings.feature +240 -0
  50. data/features/support/aruba.rb +15 -0
  51. data/features/support/env.rb +11 -0
  52. data/features/support/steps.rb +3 -0
  53. data/features/tasks/add/asset.feature +178 -0
  54. data/features/tasks/generate/init.feature +56 -0
  55. data/lib/repo_manager.rb +36 -0
  56. data/lib/repo_manager/actions.rb +8 -0
  57. data/lib/repo_manager/actions/action_helper.rb +39 -0
  58. data/lib/repo_manager/actions/app_action.rb +30 -0
  59. data/lib/repo_manager/actions/base_action.rb +296 -0
  60. data/lib/repo_manager/actions/git_action.rb +113 -0
  61. data/lib/repo_manager/actions/help_action.rb +52 -0
  62. data/lib/repo_manager/actions/list_action.rb +123 -0
  63. data/lib/repo_manager/actions/path_action.rb +22 -0
  64. data/lib/repo_manager/actions/status_action.rb +192 -0
  65. data/lib/repo_manager/actions/task_action.rb +71 -0
  66. data/lib/repo_manager/app.rb +116 -0
  67. data/lib/repo_manager/assets.rb +3 -0
  68. data/lib/repo_manager/assets/app_asset.rb +15 -0
  69. data/lib/repo_manager/assets/asset_accessors.rb +67 -0
  70. data/lib/repo_manager/assets/asset_configuration.rb +137 -0
  71. data/lib/repo_manager/assets/asset_manager.rb +72 -0
  72. data/lib/repo_manager/assets/base_asset.rb +199 -0
  73. data/lib/repo_manager/assets/repo_asset.rb +30 -0
  74. data/lib/repo_manager/core.rb +2 -0
  75. data/lib/repo_manager/core/array.rb +21 -0
  76. data/lib/repo_manager/core/hash.rb +83 -0
  77. data/lib/repo_manager/errors.rb +10 -0
  78. data/lib/repo_manager/extensions/hash.rb +86 -0
  79. data/lib/repo_manager/git.rb +2 -0
  80. data/lib/repo_manager/git/lib.rb +69 -0
  81. data/lib/repo_manager/git/status.rb +196 -0
  82. data/lib/repo_manager/logger.rb +39 -0
  83. data/lib/repo_manager/settings.rb +98 -0
  84. data/lib/repo_manager/tasks.rb +3 -0
  85. data/lib/repo_manager/tasks/add/asset.rb +213 -0
  86. data/lib/repo_manager/tasks/generate/init.rb +42 -0
  87. data/lib/repo_manager/tasks/generate/templates/config/repo.conf.tt +61 -0
  88. data/lib/repo_manager/tasks/generate/templates/init/assets/.gitignore +0 -0
  89. data/lib/repo_manager/tasks/generate/templates/init/global/default/asset.conf +2 -0
  90. data/lib/repo_manager/tasks/generate/templates/init/tasks/.gitignore +0 -0
  91. data/lib/repo_manager/tasks/task_manager.rb +166 -0
  92. data/lib/repo_manager/tasks/thor_helper.rb +29 -0
  93. data/lib/repo_manager/test/asset_steps.rb +19 -0
  94. data/lib/repo_manager/test/base_steps.rb +152 -0
  95. data/lib/repo_manager/test/repo_api.rb +41 -0
  96. data/lib/repo_manager/test/repo_steps.rb +83 -0
  97. data/lib/repo_manager/test/test_api.rb +88 -0
  98. data/lib/repo_manager/views.rb +2 -0
  99. data/lib/repo_manager/views/app_view.rb +15 -0
  100. data/lib/repo_manager/views/base_view.rb +137 -0
  101. data/lib/repo_manager/views/templates/css/basic.css +26 -0
  102. data/lib/repo_manager/views/templates/default.erb +40 -0
  103. data/lib/repo_manager/views/templates/default.slim +37 -0
  104. data/lib/repo_manager/views/view_helper.rb +55 -0
  105. data/repo_manager.gemspec +75 -0
  106. data/spec/basic_app/actions/action_helper_spec.rb +54 -0
  107. data/spec/basic_app/assets/base_asset_spec.rb +210 -0
  108. data/spec/basic_app/core_spec.rb +78 -0
  109. data/spec/basic_app/settings_spec.rb +64 -0
  110. data/spec/basic_app/views/view_helper_spec.rb +28 -0
  111. data/spec/basic_gem/aruba_helper_spec.rb +33 -0
  112. data/spec/basic_gem/basic_gem_spec.rb +84 -0
  113. data/spec/basic_gem/gemspec_spec.rb +68 -0
  114. data/spec/repo_manager/git_spec.rb +31 -0
  115. data/spec/spec_helper.rb +25 -0
  116. metadata +472 -0
@@ -0,0 +1,624 @@
1
+ @announce
2
+ Feature: Listing repos
3
+
4
+ repo configurations listed to the screen or file with or without templates
5
+ using regular expression (regex) filtering.
6
+
7
+ Example usage:
8
+
9
+ repo list
10
+ repo list --list=NAME
11
+ repo list --type=repo_type
12
+ repo list --template ~/templates/myTemplate.slim
13
+
14
+ Example repo regex filtering:
15
+
16
+ repo list --filter=ass.t1,as.et2
17
+
18
+ Equivalent repo filtering:
19
+
20
+ repo list --filter=repo1,repo2
21
+ repo list --repo=repo1,repo2
22
+ repo list repo1 repo2
23
+
24
+ Equivalent usage, file writing using Slim templates:
25
+
26
+ repo list --template=default.slim --output=tmp/aruba/index.html
27
+ repo list --template=default.slim >> tmp/aruba/index.html
28
+
29
+ Equivalent usage, file writing using ERB templates:
30
+
31
+ repo list --template=default.erb --output=tmp/aruba/index.html
32
+ repo list --template=default.erb >> tmp/aruba/index.html
33
+
34
+ Example return just the first matching asset
35
+
36
+ repo list --match=FIRST
37
+
38
+ Example fail out if more than one matching asset
39
+
40
+ repo list --match=ONE
41
+
42
+ Example disable regex filter matching
43
+
44
+ repo list --match=EXACT
45
+
46
+ Example future usage (not implemented):
47
+
48
+ repo list --tags=adventure,favorites --group_by=tags --sort=ACQUIRED
49
+
50
+ Background: A master configuration file
51
+ Given a file named "repo.conf" with:
52
+ """
53
+ ---
54
+ options:
55
+ color : true
56
+ folders:
57
+ assets : data/assets
58
+ """
59
+
60
+ Scenario: Invalid asset type
61
+ When I run `repo list --type=invalid_asset_type`
62
+ Then the exit status should be 1
63
+ And the output should contain:
64
+ """
65
+ unknown asset type
66
+ """
67
+
68
+ Scenario: List all
69
+ Given the folder "data/assets" with the following asset configurations:
70
+ | name |
71
+ | asset1 |
72
+ | asset2 |
73
+ | asset3 |
74
+ When I run `repo list`
75
+ Then the exit status should be 0
76
+ And the output should contain:
77
+ """
78
+ asset1:
79
+ --- {}
80
+
81
+ asset2:
82
+ --- {}
83
+
84
+ asset3:
85
+ --- {}
86
+ """
87
+
88
+ Scenario: List just name
89
+ Given the folder "data/assets" with the following asset configurations:
90
+ | name |
91
+ | asset1 |
92
+ | asset2 |
93
+ | asset3 |
94
+ When I run `repo list --list=NAME`
95
+ Then the exit status should be 0
96
+ And the output should contain:
97
+ """
98
+ asset1
99
+ asset2
100
+ asset3
101
+ """
102
+
103
+ Scenario: List just name using '--filter' option
104
+ Given the folder "data/assets" with the following asset configurations:
105
+ | name |
106
+ | asset1 |
107
+ | asset2 |
108
+ | asset3 |
109
+ When I run `repo list --filter=asset1 --list=NAME`
110
+ Then the exit status should be 0
111
+ And the output should contain:
112
+ """
113
+ asset1
114
+ """
115
+ And the output should not contain:
116
+ """
117
+ asset2
118
+ """
119
+ And the output should not contain:
120
+ """
121
+ asset3
122
+ """
123
+
124
+ Scenario: List just name using '--repos' option
125
+ Given the folder "data/assets" with the following asset configurations:
126
+ | name |
127
+ | asset1 |
128
+ | asset2 |
129
+ | asset3 |
130
+ When I run `repo list --repos=asset1 --list=NAME`
131
+ Then the exit status should be 0
132
+ And the output should contain exactly:
133
+ """
134
+ asset1
135
+
136
+ """
137
+
138
+ Scenario: List just name using passing filters as args
139
+ Given the folder "data/assets" with the following asset configurations:
140
+ | name |
141
+ | asset1 |
142
+ | asset2 |
143
+ | asset3 |
144
+ When I run `repo list asset1 asset2 --list=NAME`
145
+ Then the exit status should be 0
146
+ And the output should contain:
147
+ """
148
+ asset1
149
+ asset2
150
+ """
151
+ And the output should not contain:
152
+ """
153
+ asset3
154
+ """
155
+
156
+ Scenario: List the first and only first matching asset with match mode '--match FIRST'
157
+ Given the folder "data/assets" with the following asset configurations:
158
+ | name |
159
+ | asset1 |
160
+ | asset2 |
161
+ | asset3 |
162
+ When I run `repo list --match=FIRST --list=NAME`
163
+ Then the exit status should be 0
164
+ And the output should contain exactly:
165
+ """
166
+ asset1
167
+
168
+ """
169
+
170
+ Scenario: List with invalid options in varying positions on the command line
171
+ When I run `repo list --bad-option1 --repos=asset1 --list=NAME`
172
+ Then the exit status should be 1
173
+ And its output should contain:
174
+ """
175
+ invalid option: --bad-option1
176
+ """
177
+ When I run `repo list arg1 arg2 --bad-option2 --repos=asset1 --list=NAME`
178
+ Then the exit status should be 1
179
+ And its output should contain:
180
+ """
181
+ invalid option: --bad-option2
182
+ """
183
+ When I run `repo --bad-option3 list arg1 arg2 --repos=asset1 --list=NAME`
184
+ Then the exit status should be 1
185
+ And its output should contain:
186
+ """
187
+ invalid option: --bad-option3
188
+ """
189
+
190
+ Scenario: Multiple matching assets fail hard with asset match mode '--match ONE'
191
+ Given the folder "data/assets" with the following asset configurations:
192
+ | name |
193
+ | asset1 |
194
+ | asset2 |
195
+ | asset3 |
196
+ When I run `repo list --match=ONE --list=NAME`
197
+ Then the exit status should be 1
198
+ And the output should contain:
199
+ """
200
+ multiple matching assets found
201
+ """
202
+
203
+ Scenario: Regex asset matching of any part of asset name is the default match mode
204
+ Given the folder "data/assets" with the following asset configurations:
205
+ | name |
206
+ | asset1 |
207
+ | asset2 |
208
+ | asset3 |
209
+ When I run `repo list a.s.t --list=NAME`
210
+ Then the exit status should be 0
211
+ And the output should contain:
212
+ """
213
+ asset1
214
+ asset2
215
+ asset3
216
+ """
217
+
218
+ Scenario: No regex asset matching with asset match mode '--match EXACT'
219
+ Given the folder "data/assets" with the following asset configurations:
220
+ | name |
221
+ | asset1 |
222
+ | asset2 |
223
+ | asset3 |
224
+ When I run `repo list a.s.t --match=EXACT --list=NAME`
225
+ Then the exit status should be 0
226
+ And the output should not contain:
227
+ """
228
+ asset1
229
+ """
230
+
231
+ Scenario: Matching only on the asset name, not the path
232
+ Given the folder "data/assets" with the following asset configurations:
233
+ | name |
234
+ | asset1 |
235
+ | asset2 |
236
+ | asset3 |
237
+ When I run `repo list assets --list=NAME --type=app_asset`
238
+ Then the exit status should be 0
239
+ And the output should not contain:
240
+ """
241
+ asset
242
+ """
243
+
244
+ Scenario: List to screen using the built in default template
245
+ Given the folder "data/assets" with the following asset configurations:
246
+ | name |
247
+ | asset1 |
248
+ | asset2 |
249
+ | asset3 |
250
+ When I run `repo list --template --verbose`
251
+ Then the exit status should be 0
252
+ And the normalized output should contain:
253
+ """
254
+ <!DOCTYPE html>
255
+ <html lang="en">
256
+ <head>
257
+ <title>Default View</title>
258
+ <meta charset="utf-8" />
259
+ <meta content="repo" name="keywords" />
260
+ <meta content="RepoManager default template" name="description" />
261
+ <meta content="Robert Wahler" name="author" />
262
+ <link href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css" rel="stylesheet" />
263
+ <style type="text/css">html, body {
264
+ background-color: #eee;
265
+ }
266
+ .container {
267
+ width: 820px;
268
+ }
269
+ .container > footer p {
270
+ text-align: center;
271
+ }
272
+ .page-header {
273
+ background-color: #f5f5f5;
274
+ padding: 20px 20px 10px;
275
+ margin: -20px -20px 20px;
276
+ }
277
+ /* The white background content wrapper */
278
+ .content {
279
+ background-color: #fff;
280
+ padding: 20px;
281
+ margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */
282
+ -webkit-border-radius: 0 0 6px 6px;
283
+ -moz-border-radius: 0 0 6px 6px;
284
+ border-radius: 0 0 6px 6px;
285
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
286
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
287
+ box-shadow: 0 1px 2px rgba(0,0,0,.15);
288
+ }
289
+ </style>
290
+ </head>
291
+ <body>
292
+ <div class="container">
293
+ <div class="content">
294
+ <div class="page-header">
295
+ <h1>Assets Report</h1>
296
+ </div>
297
+ <h2>Assets</h2>
298
+ <table class="condensed-table bordered-table zebra-striped">
299
+ <thead>
300
+ <tr>
301
+ <th>Name</th>
302
+ </tr>
303
+ </thead>
304
+ <tbody>
305
+ <tr>
306
+ <td>asset1</td>
307
+ </tr>
308
+ <tr>
309
+ <td>asset2</td>
310
+ </tr>
311
+ <tr>
312
+ <td>asset3</td>
313
+ </tr>
314
+ </tbody>
315
+ </table>
316
+ </div>
317
+ <footer>
318
+ <p>Copyright &copy; 2011 GearheadForHire, LLC</p>
319
+ </footer>
320
+ </div>
321
+ </body>
322
+ </html>
323
+ """
324
+
325
+ Scenario: List to file using the built in default template
326
+ Given the folder "data/assets" with the following asset configurations:
327
+ | name |
328
+ | asset1 |
329
+ | asset2 |
330
+ | asset3 |
331
+ When I run `repo list --template --output=data/output.html --verbose`
332
+ Then the exit status should be 0
333
+ And the file "data/output.html" should contain:
334
+ """
335
+ <!DOCTYPE html>
336
+ <html lang="en">
337
+ <head>
338
+ <title>Default View</title>
339
+ <meta charset="utf-8" />
340
+ <meta content="repo" name="keywords" />
341
+ <meta content="RepoManager default template" name="description" />
342
+ <meta content="Robert Wahler" name="author" />
343
+ <link href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css" rel="stylesheet" />
344
+ <style type="text/css">html, body {
345
+ background-color: #eee;
346
+ }
347
+ .container {
348
+ width: 820px;
349
+ }
350
+ .container > footer p {
351
+ text-align: center;
352
+ }
353
+ .page-header {
354
+ background-color: #f5f5f5;
355
+ padding: 20px 20px 10px;
356
+ margin: -20px -20px 20px;
357
+ }
358
+ /* The white background content wrapper */
359
+ .content {
360
+ background-color: #fff;
361
+ padding: 20px;
362
+ margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */
363
+ -webkit-border-radius: 0 0 6px 6px;
364
+ -moz-border-radius: 0 0 6px 6px;
365
+ border-radius: 0 0 6px 6px;
366
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
367
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
368
+ box-shadow: 0 1px 2px rgba(0,0,0,.15);
369
+ }
370
+ </style>
371
+ </head>
372
+ <body>
373
+ <div class="container">
374
+ <div class="content">
375
+ <div class="page-header">
376
+ <h1>Assets Report</h1>
377
+ </div>
378
+ <h2>Assets</h2>
379
+ <table class="condensed-table bordered-table zebra-striped">
380
+ <thead>
381
+ <tr>
382
+ <th>Name</th>
383
+ </tr>
384
+ </thead>
385
+ <tbody>
386
+ <tr>
387
+ <td>asset1</td>
388
+ </tr>
389
+ <tr>
390
+ <td>asset2</td>
391
+ </tr>
392
+ <tr>
393
+ <td>asset3</td>
394
+ </tr>
395
+ </tbody>
396
+ </table>
397
+ </div>
398
+ <footer>
399
+ <p>Copyright &copy; 2011 GearheadForHire, LLC</p>
400
+ </footer>
401
+ </div>
402
+ </body>
403
+ </html>
404
+ """
405
+
406
+ Scenario: No not overwrite existing output unless prompted 'Y/N' or given the '--force' option
407
+ Given the folder "data/assets" with the following asset configurations:
408
+ | name |
409
+ | asset1 |
410
+ | asset2 |
411
+ | asset3 |
412
+ And a file named "data/output.html" with:
413
+ """
414
+ this file was not overwritten
415
+ """
416
+ When I run `repo list --template --output=data/output.html --verbose`
417
+ Then the exit status should be 0
418
+ And the file "data/output.html" should contain:
419
+ """
420
+ this file was not overwritten
421
+ """
422
+ And the file "data/output.html" should not contain:
423
+ """
424
+ </html>
425
+ """
426
+
427
+ Scenario: Overwrite automatically for existing output using '--force'
428
+ Given the folder "data/assets" with the following asset configurations:
429
+ | name |
430
+ | asset1 |
431
+ | asset2 |
432
+ | asset3 |
433
+ And a file named "data/output.html" with:
434
+ """
435
+ this file was not overwritten
436
+ """
437
+ When I run `repo list --template --output=data/output.html --force --verbose`
438
+ Then the exit status should be 0
439
+ And the file "data/output.html" should not contain:
440
+ """
441
+ this file was not overwritten
442
+ """
443
+ And the file "data/output.html" should contain:
444
+ """
445
+ <body>
446
+ <div class="container">
447
+ <div class="content">
448
+ <div class="page-header">
449
+ <h1>Assets Report</h1>
450
+ </div>
451
+ <h2>Assets</h2>
452
+ <table class="condensed-table bordered-table zebra-striped">
453
+ <thead>
454
+ <tr>
455
+ <th>Name</th>
456
+ </tr>
457
+ </thead>
458
+ <tbody>
459
+ <tr>
460
+ <td>asset1</td>
461
+ </tr>
462
+ <tr>
463
+ <td>asset2</td>
464
+ </tr>
465
+ <tr>
466
+ <td>asset3</td>
467
+ </tr>
468
+ </tbody>
469
+ </table>
470
+ </div>
471
+ <footer>
472
+ <p>Copyright &copy; 2011 GearheadForHire, LLC</p>
473
+ </footer>
474
+ </div>
475
+ </body>
476
+ </html>
477
+ """
478
+
479
+
480
+ Scenario: Use built in ERB template instead of the default Slim template
481
+ Given the folder "data/assets" with the following asset configurations:
482
+ | name |
483
+ | asset1 |
484
+ | asset2 |
485
+ | asset3 |
486
+ When I run `repo list --template=default.erb --output=data/output.html --verbose`
487
+ Then the exit status should be 0
488
+ And the file "data/output.html" should contain:
489
+ """
490
+ <body>
491
+ <div class="container">
492
+ <div class="content">
493
+ <div class="page-header">
494
+ <h1>Assets Report</h1>
495
+ </div>
496
+ <h2>Assets</h2>
497
+ <table class="condensed-table bordered-table zebra-striped">
498
+ <thead>
499
+ <tr>
500
+ <th>Name</th>
501
+ </tr>
502
+ </thead>
503
+ <tbody>
504
+ <tr>
505
+ <td>asset1</td>
506
+ </tr>
507
+ <tr>
508
+ <td>asset2</td>
509
+ </tr>
510
+ <tr>
511
+ <td>asset3</td>
512
+ </tr>
513
+ </tbody>
514
+ </table>
515
+ </div>
516
+ <footer>
517
+ <p>Copyright &copy; 2011 GearheadForHire, LLC</p>
518
+ </footer>
519
+ </div>
520
+ </body>
521
+ </html>
522
+ """
523
+
524
+ Scenario: Unsupported template file extension
525
+ Given the folder "data/assets" with the following asset configurations:
526
+ | name |
527
+ | asset1 |
528
+ | asset2 |
529
+ | asset3 |
530
+ And a file named "template.fOO" with:
531
+ """
532
+ this file was not overwritten
533
+ """
534
+ When I run `repo list --template=template.fOO --output=data/output.html --verbose`
535
+ Then the exit status should be 1
536
+ And the output should contain:
537
+ """
538
+ unsupported template type based on file extension .foo
539
+ """
540
+
541
+ Scenario: Default action, no filter, --list==SHORT
542
+ Given the folder "data/assets" with the following asset configurations:
543
+ | name | path |
544
+ | test1 | test_path_1 |
545
+ | test2 | test_path_2 |
546
+ When I run `repo list --list=SHORT --verbose`
547
+ Then the exit status should be 0
548
+ And the output should contain:
549
+ """
550
+ test1: ./test_path_1
551
+ test2: ./test_path_2
552
+ """
553
+
554
+ Scenario: Default action, no filter, --list=NAME
555
+ Given the folder "data/assets" with the following asset configurations:
556
+ | name | path |
557
+ | test1 | test_path_1 |
558
+ | test2 | test_path_2 |
559
+ When I run `repo list --list=NAME`
560
+ Then the exit status should be 0
561
+ And the output should contain:
562
+ """
563
+ test1
564
+ test2
565
+ """
566
+
567
+ Scenario: Default action, no filter, --list=PATH
568
+ Given the folder "data/assets" with the following asset configurations:
569
+ | name | path |
570
+ | test1 | test_path_1 |
571
+ | test2 | test_path_2 |
572
+ When I run `repo list --list=PATH`
573
+ Then the exit status should be 0
574
+ And the output should match:
575
+ """
576
+ .+/test_path_1$
577
+ .+/test_path_2$
578
+ """
579
+
580
+ Scenario: Missing path defaults to repo name
581
+ Given the folder "data/assets" with the following asset configurations:
582
+ | name |
583
+ | test1 |
584
+ | test2 |
585
+ When I run `repo list --list=SHORT`
586
+ Then the exit status should be 0
587
+ And the output should contain:
588
+ """
589
+ test1: ./test1
590
+ test2: ./test2
591
+ """
592
+
593
+ Scenario: Missing repos is still valid
594
+ Given a file named "repo.conf" with:
595
+ """
596
+ ---
597
+ """
598
+ When I run `repo list --list=SHORT`
599
+ Then the exit status should be 0
600
+
601
+ Scenario: Short format with --filter repo
602
+ Given the folder "data/assets" with the following asset configurations:
603
+ | name |
604
+ | test1 |
605
+ | test2 |
606
+ When I run `repo list --filter=test1 --list=SHORT --no-verbose`
607
+ Then the exit status should be 0
608
+ And the output should contain exactly:
609
+ """
610
+ test1: ./test1
611
+
612
+ """
613
+
614
+ Scenario: Short format with arg repo
615
+ Given the folder "data/assets" with the following asset configurations:
616
+ | name |
617
+ | test1 |
618
+ | test2 |
619
+ When I run `repo list test1 --list=SHORT --no-verbose`
620
+ Then the output should contain exactly:
621
+ """
622
+ test1: ./test1
623
+
624
+ """