dsu 2.4.3 → 3.0.0.alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +12 -0
  3. data/CHANGELOG.md +181 -204
  4. data/Gemfile.lock +13 -13
  5. data/README.md +7 -8
  6. data/Rakefile +6 -0
  7. data/current_project.bak +4 -0
  8. data/lib/dsu/cli.rb +24 -6
  9. data/lib/dsu/crud/json_file.rb +3 -0
  10. data/lib/dsu/migration/version.rb +1 -1
  11. data/lib/dsu/models/color_theme.rb +7 -58
  12. data/lib/dsu/models/configuration.rb +18 -3
  13. data/lib/dsu/models/entry_group.rb +0 -7
  14. data/lib/dsu/models/migration_version.rb +0 -1
  15. data/lib/dsu/models/project.rb +295 -0
  16. data/lib/dsu/presenters/base_presenter_ex.rb +1 -12
  17. data/lib/dsu/presenters/export/all_presenter.rb +14 -19
  18. data/lib/dsu/presenters/export/dates_presenter.rb +17 -20
  19. data/lib/dsu/presenters/import/all_presenter.rb +20 -25
  20. data/lib/dsu/presenters/import/dates_presenter.rb +25 -27
  21. data/lib/dsu/presenters/import/import_entry.rb +22 -0
  22. data/lib/dsu/presenters/import/import_file.rb +9 -1
  23. data/lib/dsu/presenters/project/create_presenter.rb +44 -0
  24. data/lib/dsu/presenters/project/delete_by_number_presenter.rb +54 -0
  25. data/lib/dsu/presenters/project/delete_presenter.rb +53 -0
  26. data/lib/dsu/presenters/project/list_presenter.rb +24 -0
  27. data/lib/dsu/presenters/project/rename_by_number_presenter.rb +63 -0
  28. data/lib/dsu/presenters/project/rename_presenter.rb +57 -0
  29. data/lib/dsu/presenters/project/use_by_number_presenter.rb +53 -0
  30. data/lib/dsu/presenters/project/use_presenter.rb +52 -0
  31. data/lib/dsu/services/entry_group/exporter_service.rb +22 -5
  32. data/lib/dsu/services/entry_group/importer_service.rb +41 -8
  33. data/lib/dsu/services/project/hydrator_service.rb +40 -0
  34. data/lib/dsu/services/project/rename_service.rb +70 -0
  35. data/lib/dsu/subcommands/export.rb +4 -2
  36. data/lib/dsu/subcommands/import.rb +7 -3
  37. data/lib/dsu/subcommands/project.rb +149 -0
  38. data/lib/dsu/support/ask.rb +10 -3
  39. data/lib/dsu/support/color_themable.rb +1 -1
  40. data/lib/dsu/support/command_hookable.rb +7 -2
  41. data/lib/dsu/support/descriptable.rb +5 -21
  42. data/lib/dsu/support/fileable.rb +39 -1
  43. data/lib/dsu/support/project_file_system.rb +121 -0
  44. data/lib/dsu/support/short_string.rb +24 -0
  45. data/lib/dsu/support/time_comparable.rb +2 -0
  46. data/lib/dsu/support/transform_project_name.rb +24 -0
  47. data/lib/dsu/validators/project_name_validator.rb +58 -0
  48. data/lib/dsu/version.rb +1 -1
  49. data/lib/dsu/views/base_list_view.rb +41 -0
  50. data/lib/dsu/views/export.rb +60 -6
  51. data/lib/dsu/views/import.rb +83 -7
  52. data/lib/dsu/views/import_dates.rb +17 -0
  53. data/lib/dsu/views/project/create.rb +87 -0
  54. data/lib/dsu/views/project/delete.rb +96 -0
  55. data/lib/dsu/views/project/delete_by_number.rb +19 -0
  56. data/lib/dsu/views/project/list.rb +115 -0
  57. data/lib/dsu/views/project/rename.rb +98 -0
  58. data/lib/dsu/views/project/rename_by_number.rb +21 -0
  59. data/lib/dsu/views/project/use.rb +97 -0
  60. data/lib/dsu/views/project/use_by_number.rb +19 -0
  61. data/lib/dsu.rb +2 -10
  62. data/lib/locales/en/active_record.yml +9 -0
  63. data/lib/locales/en/commands.yml +9 -3
  64. data/lib/locales/en/miscellaneous.yml +4 -0
  65. data/lib/locales/en/services.yml +4 -0
  66. data/lib/locales/en/subcommands.yml +247 -15
  67. data/project.bak +0 -0
  68. metadata +34 -9
  69. data/lib/dsu/presenters/export/messages.rb +0 -32
  70. data/lib/dsu/presenters/export/nothing_to_export.rb +0 -13
  71. data/lib/dsu/presenters/export/service_callable.rb +0 -20
  72. data/lib/dsu/presenters/import/messages.rb +0 -42
  73. data/lib/dsu/presenters/import/service_callable.rb +0 -21
@@ -41,7 +41,7 @@ en:
41
41
  long_desc: |
42
42
  Deletes the configuration file.
43
43
 
44
- EXAMPLES:
44
+ EXAMPLES
45
45
 
46
46
  dsu config delete
47
47
 
@@ -54,7 +54,7 @@ en:
54
54
  long_desc: |
55
55
  Displays information about this gem configuration.
56
56
 
57
- EXAMPLES:
57
+ EXAMPLES
58
58
 
59
59
  $ dsu config info
60
60
  init:
@@ -63,7 +63,7 @@ en:
63
63
  long_desc: |
64
64
  Creates and initializes a .dsu file in your home folder (%{home_folder}) that may be edited.
65
65
 
66
- EXAMPLES:
66
+ EXAMPLES
67
67
 
68
68
  $ dsu config init
69
69
 
@@ -132,7 +132,7 @@ en:
132
132
 
133
133
  %{mnemonic_option_description}
134
134
 
135
- EXAMPLES:
135
+ EXAMPLES
136
136
 
137
137
  NOTE: All examples can substitute their respective short form options (e.g. `-f`, `-t`, etc. for `--from`, `--to`, etc.).
138
138
 
@@ -238,7 +238,7 @@ en:
238
238
 
239
239
  %{mnemonic_option_description}
240
240
 
241
- EXAMPLES:
241
+ EXAMPLES
242
242
 
243
243
  NOTE: All examples can substitute their respective short form options (e.g. `-f`, `-t`, etc. for `--from`, `--to`, etc.).
244
244
 
@@ -287,7 +287,7 @@ en:
287
287
  export_dates_confirm: Export all the entries for %{from} thru %{to} (%{count} entry groups)?
288
288
  options:
289
289
  - y
290
- - N
290
+ - n
291
291
  import:
292
292
  dates:
293
293
  desc: dates|dd OPTIONS
@@ -301,6 +301,8 @@ en:
301
301
 
302
302
  OPTIONS:
303
303
 
304
+ -o|--override true|false (default: false): If true, the import process will ignore the project name found in the import file and import the entries into the current project. If false, the import process will use the project name found in the import file.
305
+
304
306
  -i|--import-file IMPORT_CVS_FILE: The IMPORT_CVS_FILE file to import. IMPORT_CVS_FILE should be a fully qualified path to a file that was previously created as a result of running `dsu export`. see `dsu help export`.
305
307
 
306
308
  -m|--merge true|false (default: true): If true, imported entries will be added to the entry group if the entry group already exists. If false, the imported entries will replace all existing entries for the entry group if the entry group already exists. If the entry group does not exist, it will be created using the imported entries.
@@ -313,7 +315,13 @@ en:
313
315
 
314
316
  %{mnemonic_option_description}
315
317
 
316
- EXAMPLES:
318
+ NOTES
319
+
320
+ Entry groups in the import file whose project name does not match the current project, will be ignored (see `dsu project use`).
321
+
322
+ If the `--override` option is used, the import process will ignore the project name found in the import file and import the entries into the current project.
323
+
324
+ EXAMPLES
317
325
 
318
326
  NOTE: All examples can substitute their respective short form options (e.g. `-f`, `-t`, etc. for `--from`, `--to`, etc.).
319
327
 
@@ -343,6 +351,10 @@ en:
343
351
  This (assuming "today" is 5/23) will import the DSU entries back 1 week from yesterday's date 5/16 to 5/22, from the import file, and merge all the entries for the respective entry groups imported:
344
352
 
345
353
  $ dsu m dd --from yesterday --to -6 -i /path/to/import.csv
354
+
355
+ This (assuming the current year is 2024) will import the DSU entries for 1/1/2024 to 3/15/2024 from the import file, and ignore the project name found in the import file and import the entries into the current project:
356
+
357
+ $ dsu m dd -f 1/1 -t 3/15 -o true -i /path/to/import.csv
346
358
  all:
347
359
  desc: all|a OPTIONS
348
360
  usage: Imports all DSU entries from a given DSU export .csv file
@@ -355,31 +367,45 @@ en:
355
367
 
356
368
  OPTIONS:
357
369
 
370
+ -o|--override true|false (default: false): If true, the import process will ignore the project name found in the import file and import the entries into the current project. If false, the import process will use the project name found in the import file.
371
+
358
372
  -i|--import-file IMPORT_CVS_FILE: The IMPORT_CVS_FILE file to import. IMPORT_CVS_FILE should be a fully qualified path to a file that was previously created as a result of running `dsu export`. see `dsu help export`.
359
373
 
360
374
  -m|--merge true|false (default: true): If true, imported entries will be added to the entry group if the entry group already exists. If false, the imported entries will replace all existing entries for the entry group if the entry group already exists. If the entry group does not exist, it will be created using the imported entries.
361
375
 
362
- EXAMPLES:
376
+ NOTES
377
+
378
+ Entry groups in the import file whose project name does not match the current project, will be ignored (see `dsu project use`).
379
+
380
+ If the `--override` option is used, the import process will ignore the project name found in the import file and import the entries into the current project.
381
+
382
+ EXAMPLES
363
383
 
364
384
  This will import all the DSU entries from the import file, and replace all the entries for the respective entry groups imported:
365
385
 
366
- $ dsu import all -i /path/to/import.csv -m false
386
+ $ dsu import all -m false -i /path/to/import.csv
367
387
 
368
388
  This will import all the DSU entries from the import file, and merge all the entries for the respective entry groups imported:
369
389
 
370
390
  $ dsu import all -i /path/to/import.csv
391
+
392
+ This will import all the DSU entries from the import file, and ignore the project name found in the import file and import the entries into the current project:
393
+
394
+ $ dsu import all -o true -i /path/to/import.csv
371
395
  messages:
372
396
  import_success: Entry group for %{date} imported successfully.
373
- import_error: "Entry group for %{date} imported with an error: %{error}."
397
+ import_error: "Entry group for %{date} imported with an error: %{error}"
398
+ import_error_raised: "The entry groups failed to import. The following error was raised: \"%{error}\"."
374
399
  nothing_to_import: No entry groups to import.
375
400
  cancelled: Cancelled.
376
401
  file_not_exist: Import file %{file_path} does not exist.
377
402
  prompts:
378
- import_all_confirm: Import all entry groups (%{count} entry groups)?
379
- import_dates_confirm: Import all the entry groups for %{from} thru %{to} (%{count} entry groups)?
403
+ import_all_confirm: Import all entry groups (%{count} entry groups) for project "%{project}"?
404
+ project_override_confirm: You have chosen to override the project found in the import file, are you sure you want to continue?
405
+ import_dates_confirm: Import all the entry groups for %{from} thru %{to} (%{count} entry groups) for project "%{project}"?
380
406
  options:
381
- - y
382
- - N
407
+ - Y
408
+ - n
383
409
  list:
384
410
  date:
385
411
  desc: date|d DATE|MNEMONIC
@@ -412,7 +438,7 @@ en:
412
438
 
413
439
  %{mnemonic_option_description}
414
440
 
415
- EXAMPLES:
441
+ EXAMPLES
416
442
 
417
443
  NOTE: All example results are subject to the `--include-all|-a` option.
418
444
 
@@ -472,6 +498,212 @@ en:
472
498
  $ dsu list yesterday
473
499
 
474
500
  $ dsu list y
501
+ project:
502
+ create:
503
+ desc: create|c PROJECT_NAME [PROJECT_DESCRIPTION]
504
+ usage: Creates a dsu project using the given PROJECT_NAME and optional PROJECT_DESCRIPTION
505
+ long_desc: |
506
+ Creates a dsu project using the given PROJECT_NAME and optional PROJECT_DESCRIPTION.
507
+
508
+ dsu project create PROJECT_NAME [PROJECT_DESCRIPTION]
509
+
510
+ dsu p c PROJECT_NAME [PROJECT_DESCRIPTION]
511
+
512
+ PROJECT_NAME
513
+
514
+ The name of the project to create. PROJECT_NAME must be between 2 and 24 characters (inclusive) in length.
515
+
516
+ PROJECT_DESCRIPTION
517
+
518
+ Optional. The description of the project. PROJECT_DESCRIPTION must be between 2 and 32 characters (inclusive) in length. If PROJECT_DESCRIPTION is not provided, the project description will be "<PROJECT_NAME> project" where <PROJECT_NAME> = the name of the project.
519
+
520
+ EXAMPLES
521
+
522
+ $ dsu project create "My project" "My project description"
523
+
524
+ $ dsu p c "My project" "My project description"
525
+
526
+ The below example will create a project called "Alpa" with the description "Alpa project".
527
+
528
+ $ dsu p c "Alpha"
529
+ messages:
530
+ created: Created project "%{project_name}".
531
+ prompts:
532
+ create_confirm: Create project "%{project_name}"?
533
+ create_options:
534
+ - Y
535
+ - n
536
+ use_confirm: Use project "%{project_name}"?
537
+ use_options:
538
+ - Y
539
+ - n
540
+ delete:
541
+ desc: delete|d [PROJECT_NAME|PROJECT_NUMBER]
542
+ usage: Permanently deletes the DSU project indicated by the optional PROJECT_NAME or PROJECT_NUMBER
543
+ long_desc: |
544
+ Permanently deletes the DSU project indicated by given option PROJECT_NAME or PROJECT_NUMBER.
545
+
546
+ dsu project delete [PROJECT_NAME|PROJECT_NUMBER]
547
+
548
+ dsu p d [PROJECT_NAME|PROJECT_NUMBER]
549
+
550
+ PROJECT_NAME
551
+
552
+ The name of the project to delete.
553
+
554
+ PROJECT_NUMBER
555
+
556
+ The number of the project to delete. If PROJECT_NUMBER is used, the project equating to the nth project in the list of projects will be used (see `dsu project list`).
557
+
558
+ NOTES
559
+
560
+ PROJECT_NAME and PROJECT_NUMBER are optional. If neither are provided, the current, default project will be used.
561
+
562
+ EXAMPLES
563
+
564
+ $ dsu project delete "My project"
565
+
566
+ $ dsu p d "My project"
567
+
568
+ The below examples delete the project equating to the nth project in the list of projects (see `dsu project list`).
569
+
570
+ $ dsu project delete 2
571
+
572
+ $ dsu p d 2
573
+
574
+ The below examples delete the current, default project.
575
+
576
+ $ dsu project delete
577
+
578
+ $ dsu p d
579
+ messages:
580
+ deleted: Deleted project "%{project_name}".
581
+ prompts:
582
+ delete_confirm: Delete project "%{project_name} - %{description}"?
583
+ delete_options:
584
+ - Y
585
+ - n
586
+ list:
587
+ desc: list|l
588
+ usage: Lists all the DSU projects
589
+ long_desc: |
590
+ Lists all the DSU projects.
591
+
592
+ dsu project list
593
+
594
+ dsu p l
595
+
596
+ EXAMPLES
597
+
598
+ $ dsu project list
599
+
600
+ $ dsu p l
601
+ rename:
602
+ desc: rename|r PROJECT_NAME|PROJECT_NUMBER NEW_PROJECT_NAME [NEW_PROJECT_DESCRIPTION]
603
+ usage: Renames a dsu project using the given PROJECT_NAME or PROJECT_NUMBER, NEW_PROJECT_NAME and optional NEW_PROJECT_DESCRIPTION
604
+ long_desc: |
605
+ Renames a dsu project using the given PROJECT_NAME or PROJECT_NUMBER, NEW_PROJECT_NAME and optional NEW_PROJECT_DESCRIPTION
606
+
607
+ dsu project rename PROJECT_NAME|PROJECT_NUMBER NEW_PROJECT_NAME [NEW_PROJECT_DESCRIPTION]
608
+
609
+ dsu p r PROJECT_NAME|PROJECT_NUMBER NEW_PROJECT_NAME [NEW_PROJECT_DESCRIPTION]
610
+
611
+ PROJECT_NAME
612
+
613
+ The name of the project to create. PROJECT_NAME must be between 2 and 24 characters (inclusive) in length.
614
+
615
+ PROJECT_NUMBER
616
+
617
+ The number of the project to rename. If PROJECT_NUMBER is used, the project equating to the nth project in the list of projects will be used (see `dsu project list`).
618
+
619
+ NEW_PROJECT_NAME
620
+
621
+ The new name of the project. NEW_PROJECT_NAME must be between 2 and 24 characters (inclusive) in length.
622
+
623
+ NEW_PROJECT_DESCRIPTION
624
+
625
+ Optional. The description of the project. NEW_PROJECT_DESCRIPTION must be between 2 and 32 characters (inclusive) in length. If NEW_PROJECT_DESCRIPTION is not provided, the project description will be "<NEW_PROJECT_NAME> project" where <NEW_PROJECT_NAME> = the name of the project.
626
+
627
+ EXAMPLES
628
+
629
+ $ dsu project rename "My Project" "My New Project" "My new project description"
630
+
631
+ $ dsu p r "My Project" "My New Project" "My new project description"
632
+
633
+ $ dsu project rename 1 "My New Project" "My new project description"
634
+
635
+ $ dsu p r 1 "My New Project" "My new project description"
636
+
637
+ The below example will rename the project called "Alpa" with the "Beta" and add the description "Beta project".
638
+
639
+ $ dsu p r Alpha Beta
640
+ messages:
641
+ # created: Created project "%{project_name}".
642
+ new_project_already_exists: A project for new project name "%{new_project_name}" already exists.
643
+ # project_name_blank: No value provided for project name.
644
+ renamed_project: Renamed project "%{project_name}" to "%{new_project_name}".
645
+ prompts:
646
+ rename_confirm: Rename project "%{project_name}" to "%{new_project_name} - %{new_project_description}"?.
647
+ rename_options:
648
+ - Y
649
+ - n
650
+ use:
651
+ desc: use|u [PROJECT_NAME|PROJECT_NUMBER]
652
+ usage: Selects the DSU project to use, based on the given PROJECT_NAME or PROJECT_NUMBER
653
+ long_desc: |
654
+ Selects the DSU project to use, based on the given PROJECT_NAME or PROJECT_NUMBER.
655
+
656
+ dsu project use [PROJECT_NAME|PROJECT_NUMBER]
657
+
658
+ dsu p u [PROJECT_NAME|PROJECT_NUMBER]
659
+
660
+ PROJECT_NAME
661
+
662
+ The name of the project to use.
663
+
664
+ PROJECT_NUMBER
665
+
666
+ The number of the project to use. If PROJECT_NUMBER is used, the project equating to the nth project in the list of projects will be used (see `dsu project list`).
667
+
668
+ NOTES
669
+
670
+ PROJECT_NAME|PROJECT_NUMBER are optional. The project name or project number of the project to use. If PRONECT_NAME is not provided, the default project will be used. If PROJECT_NUMBER is used, the project equating to the nth project in the list of projects will be used (see `dsu project list`).
671
+
672
+ EXAMPLES
673
+
674
+ These will use the default project.
675
+
676
+ $ dsu project use
677
+
678
+ $ dsu p u
679
+
680
+ These will use the project named "My project".
681
+
682
+ $ dsu project use "My project"
683
+
684
+ $ dsu p u "My project"
685
+
686
+ These will use the 2nd project in the list of projects.
687
+
688
+ $ dsu project use 2
689
+
690
+ $ dsu p u 2
691
+ messages:
692
+ using_project: Now using project "%{project_name}".
693
+ prompts:
694
+ use_confirm: "Use project \"%{project_name} - %{description}\"?"
695
+ use_options:
696
+ - Y
697
+ - n
698
+ messages:
699
+ cancelled: Cancelled.
700
+ does_not_exist: Project "%{project_name}" does not exist.
701
+ no_projects: No projects are available to list.
702
+ number_does_not_exist: A project for number %{project_number} does not exist.
703
+ already_exists: Project "%{project_name}" already exists.
704
+ project_name_blank: No value provided for project name.
705
+ new_project_name_blank: No value provided for new project name.
706
+ already_current_project: Project "%{project_name}" is already the current project.
475
707
  theme:
476
708
  create:
477
709
  desc: create THEME_NAME [OPTIONS]
data/project.bak ADDED
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dsu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.3
4
+ version: 3.0.0.alpha.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gene M. Angelo, Jr.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-10 00:00:00.000000000 Z
11
+ date: 2024-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -159,6 +159,7 @@ files:
159
159
  - bin/console
160
160
  - bin/dsu
161
161
  - bin/setup
162
+ - current_project.bak
162
163
  - exe/dsu
163
164
  - lib/core/ruby/color_theme_colors.rb
164
165
  - lib/core/ruby/color_theme_mode.rb
@@ -176,6 +177,7 @@ files:
176
177
  - lib/dsu/models/entry.rb
177
178
  - lib/dsu/models/entry_group.rb
178
179
  - lib/dsu/models/migration_version.rb
180
+ - lib/dsu/models/project.rb
179
181
  - lib/dsu/presenters/base_presenter.rb
180
182
  - lib/dsu/presenters/base_presenter_ex.rb
181
183
  - lib/dsu/presenters/color_theme_presenter.rb
@@ -189,14 +191,18 @@ files:
189
191
  - lib/dsu/presenters/entry_presenter.rb
190
192
  - lib/dsu/presenters/export/all_presenter.rb
191
193
  - lib/dsu/presenters/export/dates_presenter.rb
192
- - lib/dsu/presenters/export/messages.rb
193
- - lib/dsu/presenters/export/nothing_to_export.rb
194
- - lib/dsu/presenters/export/service_callable.rb
195
194
  - lib/dsu/presenters/import/all_presenter.rb
196
195
  - lib/dsu/presenters/import/dates_presenter.rb
196
+ - lib/dsu/presenters/import/import_entry.rb
197
197
  - lib/dsu/presenters/import/import_file.rb
198
- - lib/dsu/presenters/import/messages.rb
199
- - lib/dsu/presenters/import/service_callable.rb
198
+ - lib/dsu/presenters/project/create_presenter.rb
199
+ - lib/dsu/presenters/project/delete_by_number_presenter.rb
200
+ - lib/dsu/presenters/project/delete_presenter.rb
201
+ - lib/dsu/presenters/project/list_presenter.rb
202
+ - lib/dsu/presenters/project/rename_by_number_presenter.rb
203
+ - lib/dsu/presenters/project/rename_presenter.rb
204
+ - lib/dsu/presenters/project/use_by_number_presenter.rb
205
+ - lib/dsu/presenters/project/use_presenter.rb
200
206
  - lib/dsu/services/color_theme/hydrator_service.rb
201
207
  - lib/dsu/services/configuration/hydrator_service.rb
202
208
  - lib/dsu/services/entry/hydrator_service.rb
@@ -208,6 +214,8 @@ files:
208
214
  - lib/dsu/services/entry_group/hydrator_service.rb
209
215
  - lib/dsu/services/entry_group/importer_service.rb
210
216
  - lib/dsu/services/migration_version/hydrator_service.rb
217
+ - lib/dsu/services/project/hydrator_service.rb
218
+ - lib/dsu/services/project/rename_service.rb
211
219
  - lib/dsu/services/stderr_redirector_service.rb
212
220
  - lib/dsu/services/stdout_redirector_service.rb
213
221
  - lib/dsu/services/temp_file/reader_service.rb
@@ -220,6 +228,7 @@ files:
220
228
  - lib/dsu/subcommands/export.rb
221
229
  - lib/dsu/subcommands/import.rb
222
230
  - lib/dsu/subcommands/list.rb
231
+ - lib/dsu/subcommands/project.rb
223
232
  - lib/dsu/subcommands/theme.rb
224
233
  - lib/dsu/support/ask.rb
225
234
  - lib/dsu/support/color_themable.rb
@@ -234,16 +243,21 @@ files:
234
243
  - lib/dsu/support/field_errors.rb
235
244
  - lib/dsu/support/fileable.rb
236
245
  - lib/dsu/support/presentable.rb
246
+ - lib/dsu/support/project_file_system.rb
247
+ - lib/dsu/support/short_string.rb
237
248
  - lib/dsu/support/time_comparable.rb
238
249
  - lib/dsu/support/time_formatable.rb
239
250
  - lib/dsu/support/times_sortable.rb
251
+ - lib/dsu/support/transform_project_name.rb
240
252
  - lib/dsu/support/utils.rb
241
253
  - lib/dsu/validators/color_theme_validator.rb
242
254
  - lib/dsu/validators/description_validator.rb
243
255
  - lib/dsu/validators/entries_validator.rb
256
+ - lib/dsu/validators/project_name_validator.rb
244
257
  - lib/dsu/validators/time_validator.rb
245
258
  - lib/dsu/validators/version_validator.rb
246
259
  - lib/dsu/version.rb
260
+ - lib/dsu/views/base_list_view.rb
247
261
  - lib/dsu/views/color_theme/index.rb
248
262
  - lib/dsu/views/color_theme/show.rb
249
263
  - lib/dsu/views/configuration/show.rb
@@ -256,6 +270,15 @@ files:
256
270
  - lib/dsu/views/entry_group/show.rb
257
271
  - lib/dsu/views/export.rb
258
272
  - lib/dsu/views/import.rb
273
+ - lib/dsu/views/import_dates.rb
274
+ - lib/dsu/views/project/create.rb
275
+ - lib/dsu/views/project/delete.rb
276
+ - lib/dsu/views/project/delete_by_number.rb
277
+ - lib/dsu/views/project/list.rb
278
+ - lib/dsu/views/project/rename.rb
279
+ - lib/dsu/views/project/rename_by_number.rb
280
+ - lib/dsu/views/project/use.rb
281
+ - lib/dsu/views/project/use_by_number.rb
259
282
  - lib/dsu/views/shared/error.rb
260
283
  - lib/dsu/views/shared/info.rb
261
284
  - lib/dsu/views/shared/message.rb
@@ -275,12 +298,14 @@ files:
275
298
  - lib/seed_data/themes/light.json
276
299
  - lib/seed_data/themes/matrix.json
277
300
  - lib/seed_data/themes/whiteout.json
301
+ - project.bak
278
302
  - sig/dsu.rbs
279
303
  homepage: https://github.com/gangelo/dsu
280
304
  licenses:
281
305
  - MIT
282
306
  metadata:
283
307
  homepage_uri: https://github.com/gangelo/dsu
308
+ documentation_uri: https://github.com/gangelo/dsu/wiki
284
309
  source_code_uri: https://github.com/gangelo/dsu
285
310
  changelog_uri: https://github.com/gangelo/dsu/blob/main/CHANGELOG.md
286
311
  rubygems_mfa_required: 'true'
@@ -327,9 +352,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
327
352
  version: '4.0'
328
353
  required_rubygems_version: !ruby/object:Gem::Requirement
329
354
  requirements:
330
- - - ">="
355
+ - - ">"
331
356
  - !ruby/object:Gem::Version
332
- version: '0'
357
+ version: 1.3.1
333
358
  requirements: []
334
359
  rubygems_version: 3.2.15
335
360
  signing_key:
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Dsu
4
- module Presenters
5
- module Export
6
- module Messages
7
- def display_export_prompt
8
- raise NotImplementedError
9
- end
10
-
11
- def display_nothing_to_export_message
12
- puts apply_theme(I18n.t('subcommands.export.messages.nothing_to_export'), theme_color: color_theme.info)
13
- end
14
-
15
- private
16
-
17
- def display_cancelled_message
18
- puts apply_theme(I18n.t('subcommands.export.messages.cancelled'), theme_color: color_theme.info)
19
- end
20
-
21
- def display_exported_message
22
- puts apply_theme(I18n.t('subcommands.export.messages.exported'), theme_color: color_theme.success)
23
- end
24
-
25
- def display_exported_to_message(file_path:)
26
- puts apply_theme(I18n.t('subcommands.export.messages.exported_to', file_path: file_path),
27
- theme_color: color_theme.success)
28
- end
29
- end
30
- end
31
- end
32
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Dsu
4
- module Presenters
5
- module Export
6
- module NothingToExport
7
- def nothing_to_export?
8
- entry_groups.empty?
9
- end
10
- end
11
- end
12
- end
13
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../../services/entry_group/exporter_service'
4
-
5
- module Dsu
6
- module Presenters
7
- module Export
8
- module ServiceCallable
9
- private
10
-
11
- def exporter_service_call
12
- @exporter_service_call ||= begin
13
- exporter_service = Services::EntryGroup::ExporterService.new(entry_groups: entry_groups, options: options)
14
- exporter_service.call
15
- end
16
- end
17
- end
18
- end
19
- end
20
- end
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Dsu
4
- module Presenters
5
- module Import
6
- module Messages
7
- def display_import_prompt
8
- raise NotImplementedError
9
- end
10
-
11
- def display_import_file_not_exist_message
12
- puts apply_theme(I18n.t('subcommands.import.messages.file_not_exist',
13
- file_path: import_file_path), theme_color: color_theme.info)
14
- end
15
-
16
- def display_nothing_to_import_message
17
- puts apply_theme(I18n.t('subcommands.import.messages.nothing_to_import'), theme_color: color_theme.info)
18
- end
19
-
20
- private
21
-
22
- def display_cancelled_message
23
- puts apply_theme(I18n.t('subcommands.import.messages.cancelled'), theme_color: color_theme.info)
24
- end
25
-
26
- def display_import_messages(import_results)
27
- import_results.each_pair do |entry_group_date, errors|
28
- if errors.empty?
29
- puts apply_theme(I18n.t('subcommands.import.messages.import_success',
30
- date: entry_group_date), theme_color: color_theme.success)
31
- else
32
- errors.each do |error|
33
- puts apply_theme(I18n.t('subcommands.import.messages.import_error',
34
- date: entry_group_date, error: error), theme_color: color_theme.error)
35
- end
36
- end
37
- end
38
- end
39
- end
40
- end
41
- end
42
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../../services/entry_group/importer_service'
4
-
5
- module Dsu
6
- module Presenters
7
- module Import
8
- module ServiceCallable
9
- private
10
-
11
- def importer_service_call
12
- @importer_service_call ||= begin
13
- importer_service = Services::EntryGroup::ImporterService.new(import_entry_groups: import_entry_groups,
14
- options: options)
15
- importer_service.call
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end