dsu 1.2.1 → 2.0.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +55 -21
  3. data/Gemfile.lock +7 -7
  4. data/README.md +28 -35
  5. data/bin/console +23 -1
  6. data/bin/dsu +3 -0
  7. data/bin/setup +14 -3
  8. data/exe/dsu +23 -1
  9. data/exe/dsu_migrate.rb +43 -0
  10. data/lib/core/ruby/color_theme_colors.rb +16 -0
  11. data/lib/core/ruby/color_theme_mode.rb +42 -0
  12. data/lib/core/ruby/not_today.rb +7 -0
  13. data/lib/core/ruby/wrap_and_join.rb +31 -0
  14. data/lib/dsu/base_cli.rb +19 -23
  15. data/lib/dsu/cli.rb +47 -37
  16. data/lib/dsu/command_services/add_entry_service.rb +10 -21
  17. data/lib/dsu/crud/json_file.rb +139 -0
  18. data/lib/dsu/crud/raw_json_file.rb +51 -0
  19. data/lib/dsu/env.rb +21 -0
  20. data/lib/dsu/migration/service.rb +196 -0
  21. data/lib/dsu/migration/version.rb +7 -0
  22. data/lib/dsu/models/color_theme.rb +270 -0
  23. data/lib/dsu/models/configuration.rb +160 -0
  24. data/lib/dsu/models/entry.rb +6 -2
  25. data/lib/dsu/models/entry_group.rb +143 -42
  26. data/lib/dsu/models/migration_version.rb +48 -0
  27. data/lib/dsu/presenters/base_presenter.rb +32 -0
  28. data/lib/dsu/presenters/color_theme_presenter.rb +50 -0
  29. data/lib/dsu/presenters/color_theme_show_presenter.rb +49 -0
  30. data/lib/dsu/presenters/configuration_presenter.rb +45 -0
  31. data/lib/dsu/presenters/entry_group_presenter.rb +35 -0
  32. data/lib/dsu/presenters/entry_presenter.rb +25 -0
  33. data/lib/dsu/services/color_theme/hydrator_service.rb +42 -0
  34. data/lib/dsu/services/configuration/hydrator_service.rb +42 -0
  35. data/lib/dsu/services/entry/hydrator_service.rb +33 -0
  36. data/lib/dsu/services/entry_group/editor_service.rb +107 -0
  37. data/lib/dsu/services/entry_group/hydrator_service.rb +37 -0
  38. data/lib/dsu/services/migration_version/hydrator_service.rb +36 -0
  39. data/lib/dsu/services/stderr_redirector_service.rb +27 -0
  40. data/lib/dsu/services/temp_file/reader_service.rb +33 -0
  41. data/lib/dsu/services/temp_file/writer_service.rb +35 -0
  42. data/lib/dsu/subcommands/base_subcommand.rb +14 -0
  43. data/lib/dsu/subcommands/config.rb +92 -32
  44. data/lib/dsu/subcommands/edit.rb +3 -3
  45. data/lib/dsu/subcommands/list.rb +70 -93
  46. data/lib/dsu/subcommands/theme.rb +159 -0
  47. data/lib/dsu/support/ask.rb +14 -19
  48. data/lib/dsu/support/color_themable.rb +34 -0
  49. data/lib/dsu/support/command_help_colorizeable.rb +27 -0
  50. data/lib/dsu/support/command_hookable.rb +60 -0
  51. data/lib/dsu/support/command_options/dsu_times.rb +32 -21
  52. data/lib/dsu/support/command_options/time.rb +7 -1
  53. data/lib/dsu/support/command_options/time_mneumonic.rb +7 -1
  54. data/lib/dsu/support/descriptable.rb +6 -4
  55. data/lib/dsu/support/entry_group_viewable.rb +28 -4
  56. data/lib/dsu/support/fileable.rb +94 -0
  57. data/lib/dsu/support/presentable.rb +11 -0
  58. data/lib/dsu/support/subcommand_help_colorizeable.rb +27 -0
  59. data/lib/dsu/support/time_comparable.rb +19 -0
  60. data/lib/dsu/support/time_formatable.rb +12 -0
  61. data/lib/dsu/support/times_sortable.rb +48 -14
  62. data/lib/dsu/support/utils.rb +11 -0
  63. data/lib/dsu/validators/color_theme_validator.rb +74 -0
  64. data/lib/dsu/validators/entries_validator.rb +4 -8
  65. data/lib/dsu/validators/version_validator.rb +29 -0
  66. data/lib/dsu/version.rb +2 -1
  67. data/lib/dsu/views/color_theme/index.rb +62 -0
  68. data/lib/dsu/views/color_theme/show.rb +106 -0
  69. data/lib/dsu/views/configuration/show.rb +41 -0
  70. data/lib/dsu/views/entry_group/edit.rb +3 -5
  71. data/lib/dsu/views/entry_group/shared/no_entries_to_display.rb +41 -0
  72. data/lib/dsu/views/entry_group/show.rb +16 -15
  73. data/lib/dsu/views/shared/error.rb +17 -0
  74. data/lib/dsu/views/shared/info.rb +17 -0
  75. data/lib/dsu/views/shared/message.rb +85 -0
  76. data/lib/dsu/views/shared/model_errors.rb +31 -0
  77. data/lib/dsu/views/shared/success.rb +17 -0
  78. data/lib/dsu/views/shared/warning.rb +17 -0
  79. data/lib/dsu.rb +22 -1
  80. data/lib/seed_data/themes/cherry.json +79 -0
  81. data/lib/seed_data/themes/default.json +79 -0
  82. data/lib/seed_data/themes/lemon.json +79 -0
  83. data/lib/seed_data/themes/matrix.json +79 -0
  84. data/lib/seed_data/themes/whiteout.json +79 -0
  85. metadata +70 -25
  86. data/lib/dsu/core/ruby/not_today.rb +0 -11
  87. data/lib/dsu/services/ai/tense_translator_service.rb +0 -63
  88. data/lib/dsu/services/configuration_loader_service.rb +0 -55
  89. data/lib/dsu/services/entry_group_deleter_service.rb +0 -31
  90. data/lib/dsu/services/entry_group_editor_service.rb +0 -96
  91. data/lib/dsu/services/entry_group_hydrator_service.rb +0 -43
  92. data/lib/dsu/services/entry_group_reader_service.rb +0 -36
  93. data/lib/dsu/services/entry_group_writer_service.rb +0 -46
  94. data/lib/dsu/services/entry_hydrator_service.rb +0 -35
  95. data/lib/dsu/services/temp_file_reader_service.rb +0 -31
  96. data/lib/dsu/services/temp_file_writer_service.rb +0 -33
  97. data/lib/dsu/support/colorable.rb +0 -14
  98. data/lib/dsu/support/configurable.rb +0 -15
  99. data/lib/dsu/support/configuration.rb +0 -112
  100. data/lib/dsu/support/entry_group_fileable.rb +0 -49
  101. data/lib/dsu/support/entry_group_loadable.rb +0 -49
  102. data/lib/dsu/support/folder_locations.rb +0 -21
  103. data/lib/dsu/support/say.rb +0 -40
  104. data/lib/dsu/views/edited_entries/shared/errors.rb +0 -39
  105. data/lib/dsu/views/shared/messages.rb +0 -56
data/lib/dsu.rb CHANGED
@@ -1,12 +1,33 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'active_support/core_ext/date/calculations'
3
4
  require 'active_support/core_ext/hash/indifferent_access'
4
5
  require 'active_support/core_ext/numeric/time'
5
6
  require 'active_support/core_ext/object/blank'
6
- require 'pry-byebug' if ENV['DEV_ENV']
7
7
  require 'thor'
8
8
  require 'time'
9
9
 
10
+ Dir.glob("#{__dir__}/core/**/*.rb").each do |file|
11
+ require file
12
+ end
13
+
14
+ Array.include(WrapAndJoin)
15
+ DateAndTime::Calculations.include(NotToday)
16
+ Hash.include(ColorThemeColors)
17
+ Hash.include(ColorThemeMode)
18
+
19
+ require_relative 'dsu/env'
20
+ require 'pry-byebug' if Dsu.env.development?
21
+
10
22
  Dir.glob("#{__dir__}/dsu/**/*.rb").each do |file|
11
23
  require file
12
24
  end
25
+
26
+ if !(Dsu.env.test? || Dsu.env.development?) && Dsu::Migration::Service.run_migrations?
27
+ begin
28
+ Dsu::Migration::Service.new.call
29
+ rescue StandardError => e
30
+ puts "Error running migrations: #{e.message}"
31
+ exit 1
32
+ end
33
+ end
@@ -0,0 +1,79 @@
1
+ {
2
+ "version": 20230613121411,
3
+ "description": "Cherry color theme",
4
+ "help": {
5
+ "color": "red",
6
+ "mode": "default",
7
+ "background": "default"
8
+ },
9
+ "dsu_header": {
10
+ "color": "white",
11
+ "mode": "bold",
12
+ "background": "red"
13
+ },
14
+ "dsu_footer": {
15
+ "color": "red",
16
+ "mode": "default",
17
+ "background": "default"
18
+ },
19
+ "header": {
20
+ "color": "red",
21
+ "mode": "bold",
22
+ "background": "default"
23
+ },
24
+ "subheader": {
25
+ "color": "red",
26
+ "mode": "underline",
27
+ "background": "default"
28
+ },
29
+ "body": {
30
+ "color": "red",
31
+ "mode": "default",
32
+ "background": "default"
33
+ },
34
+ "footer": {
35
+ "color": "light_red",
36
+ "mode": "default",
37
+ "background": "default"
38
+ },
39
+ "date": {
40
+ "color": "red",
41
+ "mode": "bold",
42
+ "background": "default"
43
+ },
44
+ "index": {
45
+ "color": "light_red",
46
+ "mode": "italic",
47
+ "background": "default"
48
+ },
49
+ "info": {
50
+ "color": "red",
51
+ "mode": "default",
52
+ "background": "default"
53
+ },
54
+ "success": {
55
+ "color": "red",
56
+ "mode": "default",
57
+ "background": "default"
58
+ },
59
+ "warning": {
60
+ "color": "yellow",
61
+ "mode": "default",
62
+ "background": "default"
63
+ },
64
+ "error": {
65
+ "color": "light_yellow",
66
+ "mode": "default",
67
+ "background": "red"
68
+ },
69
+ "prompt": {
70
+ "color": "red",
71
+ "mode": "bold",
72
+ "background": "default"
73
+ },
74
+ "prompt_options": {
75
+ "color": "white",
76
+ "mode": "bold",
77
+ "background": "default"
78
+ }
79
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "version": 20230613121411,
3
+ "description": "Default color theme",
4
+ "help": {
5
+ "color": "cyan",
6
+ "mode": "default",
7
+ "background": "default"
8
+ },
9
+ "dsu_header": {
10
+ "color": "white",
11
+ "mode": "bold",
12
+ "background": "cyan"
13
+ },
14
+ "dsu_footer": {
15
+ "color": "cyan",
16
+ "mode": "default",
17
+ "background": "default"
18
+ },
19
+ "header": {
20
+ "color": "cyan",
21
+ "mode": "bold",
22
+ "background": "default"
23
+ },
24
+ "subheader": {
25
+ "color": "cyan",
26
+ "mode": "underline",
27
+ "background": "default"
28
+ },
29
+ "body": {
30
+ "color": "cyan",
31
+ "mode": "default",
32
+ "background": "default"
33
+ },
34
+ "footer": {
35
+ "color": "light_cyan",
36
+ "mode": "default",
37
+ "background": "default"
38
+ },
39
+ "date": {
40
+ "color": "cyan",
41
+ "mode": "bold",
42
+ "background": "default"
43
+ },
44
+ "index": {
45
+ "color": "light_cyan",
46
+ "mode": "default",
47
+ "background": "default"
48
+ },
49
+ "info": {
50
+ "color": "cyan",
51
+ "mode": "default",
52
+ "background": "default"
53
+ },
54
+ "success": {
55
+ "color": "green",
56
+ "mode": "default",
57
+ "background": "default"
58
+ },
59
+ "warning": {
60
+ "color": "yellow",
61
+ "mode": "default",
62
+ "background": "default"
63
+ },
64
+ "error": {
65
+ "color": "light_yellow",
66
+ "mode": "default",
67
+ "background": "red"
68
+ },
69
+ "prompt": {
70
+ "color": "cyan",
71
+ "mode": "bold",
72
+ "background": "default"
73
+ },
74
+ "prompt_options": {
75
+ "color": "white",
76
+ "mode": "bold",
77
+ "background": "default"
78
+ }
79
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "version": 20230613121411,
3
+ "description": "Lemon color theme",
4
+ "help": {
5
+ "color": "yellow",
6
+ "mode": "default",
7
+ "background": "default"
8
+ },
9
+ "dsu_header": {
10
+ "color": "white",
11
+ "mode": "bold",
12
+ "background": "yellow"
13
+ },
14
+ "dsu_footer": {
15
+ "color": "yellow",
16
+ "mode": "default",
17
+ "background": "default"
18
+ },
19
+ "header": {
20
+ "color": "yellow",
21
+ "mode": "bold",
22
+ "background": "default"
23
+ },
24
+ "subheader": {
25
+ "color": "yellow",
26
+ "mode": "underline",
27
+ "background": "default"
28
+ },
29
+ "body": {
30
+ "color": "yellow",
31
+ "mode": "default",
32
+ "background": "default"
33
+ },
34
+ "footer": {
35
+ "color": "light_yellow",
36
+ "mode": "default",
37
+ "background": "default"
38
+ },
39
+ "date": {
40
+ "color": "yellow",
41
+ "mode": "bold",
42
+ "background": "default"
43
+ },
44
+ "index": {
45
+ "color": "light_yellow",
46
+ "mode": "default",
47
+ "background": "default"
48
+ },
49
+ "info": {
50
+ "color": "yellow",
51
+ "mode": "default",
52
+ "background": "default"
53
+ },
54
+ "success": {
55
+ "color": "green",
56
+ "mode": "default",
57
+ "background": "default"
58
+ },
59
+ "warning": {
60
+ "color": "yellow",
61
+ "mode": "default",
62
+ "background": "default"
63
+ },
64
+ "error": {
65
+ "color": "light_yellow",
66
+ "mode": "default",
67
+ "background": "red"
68
+ },
69
+ "prompt": {
70
+ "color": "yellow",
71
+ "mode": "bold",
72
+ "background": "default"
73
+ },
74
+ "prompt_options": {
75
+ "color": "white",
76
+ "mode": "bold",
77
+ "background": "default"
78
+ }
79
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "version": 20230613121411,
3
+ "description": "Matrix color theme",
4
+ "help": {
5
+ "color": "green",
6
+ "mode": "default",
7
+ "background": "default"
8
+ },
9
+ "dsu_header": {
10
+ "color": "white",
11
+ "mode": "bold",
12
+ "background": "green"
13
+ },
14
+ "dsu_footer": {
15
+ "color": "green",
16
+ "mode": "default",
17
+ "background": "default"
18
+ },
19
+ "header": {
20
+ "color": "green",
21
+ "mode": "bold",
22
+ "background": "default"
23
+ },
24
+ "subheader": {
25
+ "color": "green",
26
+ "mode": "underline",
27
+ "background": "default"
28
+ },
29
+ "body": {
30
+ "color": "green",
31
+ "mode": "default",
32
+ "background": "default"
33
+ },
34
+ "footer": {
35
+ "color": "light_green",
36
+ "mode": "default",
37
+ "background": "default"
38
+ },
39
+ "date": {
40
+ "color": "green",
41
+ "mode": "bold",
42
+ "background": "default"
43
+ },
44
+ "index": {
45
+ "color": "light_green",
46
+ "mode": "default",
47
+ "background": "default"
48
+ },
49
+ "info": {
50
+ "color": "green",
51
+ "mode": "default",
52
+ "background": "default"
53
+ },
54
+ "success": {
55
+ "color": "green",
56
+ "mode": "default",
57
+ "background": "default"
58
+ },
59
+ "warning": {
60
+ "color": "yellow",
61
+ "mode": "default",
62
+ "background": "default"
63
+ },
64
+ "error": {
65
+ "color": "light_yellow",
66
+ "mode": "default",
67
+ "background": "red"
68
+ },
69
+ "prompt": {
70
+ "color": "green",
71
+ "mode": "bold",
72
+ "background": "default"
73
+ },
74
+ "prompt_options": {
75
+ "color": "white",
76
+ "mode": "bold",
77
+ "background": "default"
78
+ }
79
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "version": 20230613121411,
3
+ "description": "Whiteout color theme",
4
+ "help": {
5
+ "color": "white",
6
+ "mode": "default",
7
+ "background": "default"
8
+ },
9
+ "dsu_header": {
10
+ "color": "white",
11
+ "mode": "bold",
12
+ "background": "white"
13
+ },
14
+ "dsu_footer": {
15
+ "color": "white",
16
+ "mode": "default",
17
+ "background": "default"
18
+ },
19
+ "header": {
20
+ "color": "white",
21
+ "mode": "bold",
22
+ "background": "default"
23
+ },
24
+ "subheader": {
25
+ "color": "white",
26
+ "mode": "underline",
27
+ "background": "default"
28
+ },
29
+ "body": {
30
+ "color": "white",
31
+ "mode": "default",
32
+ "background": "default"
33
+ },
34
+ "footer": {
35
+ "color": "light_white",
36
+ "mode": "default",
37
+ "background": "default"
38
+ },
39
+ "date": {
40
+ "color": "white",
41
+ "mode": "bold",
42
+ "background": "default"
43
+ },
44
+ "index": {
45
+ "color": "light_white",
46
+ "mode": "default",
47
+ "background": "default"
48
+ },
49
+ "info": {
50
+ "color": "white",
51
+ "mode": "default",
52
+ "background": "default"
53
+ },
54
+ "success": {
55
+ "color": "green",
56
+ "mode": "default",
57
+ "background": "default"
58
+ },
59
+ "warning": {
60
+ "color": "yellow",
61
+ "mode": "default",
62
+ "background": "default"
63
+ },
64
+ "error": {
65
+ "color": "light_yellow",
66
+ "mode": "default",
67
+ "background": "red"
68
+ },
69
+ "prompt": {
70
+ "color": "white",
71
+ "mode": "bold",
72
+ "background": "default"
73
+ },
74
+ "prompt_options": {
75
+ "color": "white",
76
+ "mode": "bold",
77
+ "background": "default"
78
+ }
79
+ }
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: 1.2.1
4
+ version: 2.0.0.alpha.1
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: 2023-06-02 00:00:00.000000000 Z
11
+ date: 2023-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -141,6 +141,7 @@ email:
141
141
  - public.gma@gmail.com
142
142
  executables:
143
143
  - dsu
144
+ - dsu_migrate.rb
144
145
  extensions: []
145
146
  extra_rdoc_files: []
146
147
  files:
@@ -156,54 +157,90 @@ files:
156
157
  - README.md
157
158
  - Rakefile
158
159
  - bin/console
160
+ - bin/dsu
159
161
  - bin/setup
160
162
  - exe/dsu
163
+ - exe/dsu_migrate.rb
164
+ - lib/core/ruby/color_theme_colors.rb
165
+ - lib/core/ruby/color_theme_mode.rb
166
+ - lib/core/ruby/not_today.rb
167
+ - lib/core/ruby/wrap_and_join.rb
161
168
  - lib/dsu.rb
162
169
  - lib/dsu/base_cli.rb
163
170
  - lib/dsu/cli.rb
164
171
  - lib/dsu/command_services/add_entry_service.rb
165
- - lib/dsu/core/ruby/not_today.rb
172
+ - lib/dsu/crud/json_file.rb
173
+ - lib/dsu/crud/raw_json_file.rb
174
+ - lib/dsu/env.rb
175
+ - lib/dsu/migration/service.rb
176
+ - lib/dsu/migration/version.rb
177
+ - lib/dsu/models/color_theme.rb
178
+ - lib/dsu/models/configuration.rb
166
179
  - lib/dsu/models/entry.rb
167
180
  - lib/dsu/models/entry_group.rb
168
- - lib/dsu/services/ai/tense_translator_service.rb
169
- - lib/dsu/services/configuration_loader_service.rb
170
- - lib/dsu/services/entry_group_deleter_service.rb
171
- - lib/dsu/services/entry_group_editor_service.rb
172
- - lib/dsu/services/entry_group_hydrator_service.rb
173
- - lib/dsu/services/entry_group_reader_service.rb
174
- - lib/dsu/services/entry_group_writer_service.rb
175
- - lib/dsu/services/entry_hydrator_service.rb
181
+ - lib/dsu/models/migration_version.rb
182
+ - lib/dsu/presenters/base_presenter.rb
183
+ - lib/dsu/presenters/color_theme_presenter.rb
184
+ - lib/dsu/presenters/color_theme_show_presenter.rb
185
+ - lib/dsu/presenters/configuration_presenter.rb
186
+ - lib/dsu/presenters/entry_group_presenter.rb
187
+ - lib/dsu/presenters/entry_presenter.rb
188
+ - lib/dsu/services/color_theme/hydrator_service.rb
189
+ - lib/dsu/services/configuration/hydrator_service.rb
190
+ - lib/dsu/services/entry/hydrator_service.rb
191
+ - lib/dsu/services/entry_group/editor_service.rb
192
+ - lib/dsu/services/entry_group/hydrator_service.rb
193
+ - lib/dsu/services/migration_version/hydrator_service.rb
194
+ - lib/dsu/services/stderr_redirector_service.rb
176
195
  - lib/dsu/services/stdout_redirector_service.rb
177
- - lib/dsu/services/temp_file_reader_service.rb
178
- - lib/dsu/services/temp_file_writer_service.rb
196
+ - lib/dsu/services/temp_file/reader_service.rb
197
+ - lib/dsu/services/temp_file/writer_service.rb
198
+ - lib/dsu/subcommands/base_subcommand.rb
179
199
  - lib/dsu/subcommands/config.rb
180
200
  - lib/dsu/subcommands/edit.rb
181
201
  - lib/dsu/subcommands/list.rb
202
+ - lib/dsu/subcommands/theme.rb
182
203
  - lib/dsu/support/ask.rb
183
- - lib/dsu/support/colorable.rb
204
+ - lib/dsu/support/color_themable.rb
205
+ - lib/dsu/support/command_help_colorizeable.rb
206
+ - lib/dsu/support/command_hookable.rb
184
207
  - lib/dsu/support/command_options/dsu_times.rb
185
208
  - lib/dsu/support/command_options/time.rb
186
209
  - lib/dsu/support/command_options/time_mneumonic.rb
187
210
  - lib/dsu/support/command_options/time_mneumonics.rb
188
- - lib/dsu/support/configurable.rb
189
- - lib/dsu/support/configuration.rb
190
211
  - lib/dsu/support/descriptable.rb
191
- - lib/dsu/support/entry_group_fileable.rb
192
- - lib/dsu/support/entry_group_loadable.rb
193
212
  - lib/dsu/support/entry_group_viewable.rb
194
213
  - lib/dsu/support/field_errors.rb
195
- - lib/dsu/support/folder_locations.rb
196
- - lib/dsu/support/say.rb
214
+ - lib/dsu/support/fileable.rb
215
+ - lib/dsu/support/presentable.rb
216
+ - lib/dsu/support/subcommand_help_colorizeable.rb
217
+ - lib/dsu/support/time_comparable.rb
197
218
  - lib/dsu/support/time_formatable.rb
198
219
  - lib/dsu/support/times_sortable.rb
220
+ - lib/dsu/support/utils.rb
221
+ - lib/dsu/validators/color_theme_validator.rb
199
222
  - lib/dsu/validators/description_validator.rb
200
223
  - lib/dsu/validators/entries_validator.rb
201
224
  - lib/dsu/validators/time_validator.rb
225
+ - lib/dsu/validators/version_validator.rb
202
226
  - lib/dsu/version.rb
203
- - lib/dsu/views/edited_entries/shared/errors.rb
227
+ - lib/dsu/views/color_theme/index.rb
228
+ - lib/dsu/views/color_theme/show.rb
229
+ - lib/dsu/views/configuration/show.rb
204
230
  - lib/dsu/views/entry_group/edit.rb
231
+ - lib/dsu/views/entry_group/shared/no_entries_to_display.rb
205
232
  - lib/dsu/views/entry_group/show.rb
206
- - lib/dsu/views/shared/messages.rb
233
+ - lib/dsu/views/shared/error.rb
234
+ - lib/dsu/views/shared/info.rb
235
+ - lib/dsu/views/shared/message.rb
236
+ - lib/dsu/views/shared/model_errors.rb
237
+ - lib/dsu/views/shared/success.rb
238
+ - lib/dsu/views/shared/warning.rb
239
+ - lib/seed_data/themes/cherry.json
240
+ - lib/seed_data/themes/default.json
241
+ - lib/seed_data/themes/lemon.json
242
+ - lib/seed_data/themes/matrix.json
243
+ - lib/seed_data/themes/whiteout.json
207
244
  - sig/dsu.rbs
208
245
  homepage: https://github.com/gangelo/dsu
209
246
  licenses:
@@ -213,7 +250,15 @@ metadata:
213
250
  source_code_uri: https://github.com/gangelo/dsu
214
251
  changelog_uri: https://github.com/gangelo/dsu/blob/main/CHANGELOG.md
215
252
  rubygems_mfa_required: 'true'
216
- post_install_message:
253
+ post_install_message: |
254
+ Thank you for installing dsu.
255
+
256
+ Run `dsu` from your command line to get started.
257
+
258
+ View the dsu README.md here: https://github.com/gangelo/dsu
259
+ View the dsu CHANGELOG.md: https://github.com/gangelo/dsu/blob/main/CHANGELOG.md
260
+
261
+ Try a dsu theme by running `dsu theme list` and then `dsu theme use THEME_NAME` where THEME_NAME is the name of the theme you want to try :)
217
262
  rdoc_options: []
218
263
  require_paths:
219
264
  - lib
@@ -224,9 +269,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
269
  version: 3.0.1
225
270
  required_rubygems_version: !ruby/object:Gem::Requirement
226
271
  requirements:
227
- - - ">="
272
+ - - ">"
228
273
  - !ruby/object:Gem::Version
229
- version: '0'
274
+ version: 1.3.1
230
275
  requirements: []
231
276
  rubygems_version: 3.3.22
232
277
  signing_key:
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'active_support/core_ext/date/calculations'
4
-
5
- module DateAndTime
6
- module Calculations
7
- def not_today?
8
- !today?
9
- end
10
- end
11
- end
@@ -1,63 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'net/http'
4
- require 'json'
5
-
6
- module Dsu
7
- module Services
8
- module AI
9
- # SERVICE_URI = URI('https://api.openai.com/v1/chat/completions').freeze
10
-
11
- # class TenseTranslatorService
12
- # def initialize(entries:, options: {})
13
- # @entries = entries
14
- # @options = options.merge({ tense: :past })
15
- # end
16
-
17
- # def call
18
- # request = Net::HTTP::Post.new(SERVICE_URI.path)
19
- # request['Content-Type'] = 'application/json'
20
- # request['Authorization'] = "Bearer #{configuration[:ai_api_key]}"
21
-
22
- # request.body = request_body
23
-
24
- # response = http.request(request)
25
- # JSON.parse(response.body)
26
- # end
27
-
28
- # private
29
-
30
- # attr_reader :entries, :options
31
-
32
- # def http
33
- # Net::HTTP.new(SERVICE_URI.host, SERVICE_URI.port).tap do |http|
34
- # http.use_ssl = true
35
- # end
36
- # end
37
-
38
- # def request_body
39
- # {
40
- # messages: [
41
- # {
42
- # role: 'system',
43
- # content: 'You are a helpful assistant.'
44
- # },
45
- # {
46
- # role: 'user',
47
- # content: message
48
- # }
49
- # ]
50
- # }.to_json
51
- # end
52
-
53
- # def instructions
54
- # @instructions ||= "Please translate the following sentences into the past #{options[:tense]}:\n\n"
55
- # end
56
-
57
- # def message
58
- # @message ||= "#{instructions}\n\n#{entries.map(&:description).join("\n")}"
59
- # end
60
- # end
61
- end
62
- end
63
- end