doto 0.0.1.pre.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +7 -0
  2. data/.env.test +1 -0
  3. data/.reek.yml +20 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +206 -0
  6. data/.ruby-version +1 -0
  7. data/CHANGELOG.md +7 -0
  8. data/CODE_OF_CONDUCT.md +84 -0
  9. data/Gemfile +30 -0
  10. data/Gemfile.lock +179 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +38 -0
  13. data/Rakefile +16 -0
  14. data/bin/console +36 -0
  15. data/bin/doto +3 -0
  16. data/bin/setup +18 -0
  17. data/exe/doto +33 -0
  18. data/lib/core/ruby/color_theme_colors.rb +16 -0
  19. data/lib/core/ruby/color_theme_mode.rb +42 -0
  20. data/lib/core/ruby/wrap_and_join.rb +31 -0
  21. data/lib/doto/base_cli.rb +56 -0
  22. data/lib/doto/cli.rb +131 -0
  23. data/lib/doto/command_services/add_entry_service.rb +50 -0
  24. data/lib/doto/crud/json_file.rb +161 -0
  25. data/lib/doto/env.rb +44 -0
  26. data/lib/doto/migration/base_service.rb +118 -0
  27. data/lib/doto/migration/migrator.rb +24 -0
  28. data/lib/doto/migration/raw_helpers/color_theme_hash.rb +13 -0
  29. data/lib/doto/migration/raw_helpers/configuration_hash.rb +15 -0
  30. data/lib/doto/migration/raw_helpers/entry_group_hash.rb +13 -0
  31. data/lib/doto/migration/raw_json_file.rb +15 -0
  32. data/lib/doto/migration/raw_json_files.rb +56 -0
  33. data/lib/doto/migration/v20230613121411/service.rb +94 -0
  34. data/lib/doto/migration/v20240210161248/service.rb +148 -0
  35. data/lib/doto/migration/version.rb +7 -0
  36. data/lib/doto/models/color_theme.rb +224 -0
  37. data/lib/doto/models/configuration.rb +185 -0
  38. data/lib/doto/models/entry.rb +63 -0
  39. data/lib/doto/models/entry_group.rb +223 -0
  40. data/lib/doto/models/migration_version.rb +49 -0
  41. data/lib/doto/models/project.rb +295 -0
  42. data/lib/doto/presenters/base_presenter.rb +32 -0
  43. data/lib/doto/presenters/base_presenter_ex.rb +15 -0
  44. data/lib/doto/presenters/color_theme_presenter.rb +52 -0
  45. data/lib/doto/presenters/color_theme_show_presenter.rb +55 -0
  46. data/lib/doto/presenters/configuration_presenter.rb +50 -0
  47. data/lib/doto/presenters/entry_group/list/date_presenter.rb +77 -0
  48. data/lib/doto/presenters/entry_group/list/dates_presenter.rb +60 -0
  49. data/lib/doto/presenters/entry_group/list/messages.rb +15 -0
  50. data/lib/doto/presenters/entry_group/list/nothing_to_list.rb +15 -0
  51. data/lib/doto/presenters/entry_group_presenter.rb +35 -0
  52. data/lib/doto/presenters/entry_presenter.rb +25 -0
  53. data/lib/doto/presenters/export/all_presenter.rb +44 -0
  54. data/lib/doto/presenters/export/dates_presenter.rb +55 -0
  55. data/lib/doto/presenters/import/all_presenter.rb +57 -0
  56. data/lib/doto/presenters/import/dates_presenter.rb +70 -0
  57. data/lib/doto/presenters/import/import_entry.rb +22 -0
  58. data/lib/doto/presenters/import/import_file.rb +33 -0
  59. data/lib/doto/presenters/project/create_presenter.rb +44 -0
  60. data/lib/doto/presenters/project/defaultable.rb +15 -0
  61. data/lib/doto/presenters/project/delete_by_number_presenter.rb +54 -0
  62. data/lib/doto/presenters/project/delete_presenter.rb +53 -0
  63. data/lib/doto/presenters/project/list_presenter.rb +24 -0
  64. data/lib/doto/presenters/project/rename_by_number_presenter.rb +63 -0
  65. data/lib/doto/presenters/project/rename_presenter.rb +57 -0
  66. data/lib/doto/presenters/project/use_by_number_presenter.rb +57 -0
  67. data/lib/doto/presenters/project/use_presenter.rb +56 -0
  68. data/lib/doto/services/color_theme/hydrator_service.rb +42 -0
  69. data/lib/doto/services/configuration/hydrator_service.rb +42 -0
  70. data/lib/doto/services/entry/hydrator_service.rb +33 -0
  71. data/lib/doto/services/entry_group/browse_service.rb +100 -0
  72. data/lib/doto/services/entry_group/counter_service.rb +32 -0
  73. data/lib/doto/services/entry_group/deleter_service.rb +35 -0
  74. data/lib/doto/services/entry_group/editor_service.rb +103 -0
  75. data/lib/doto/services/entry_group/exporter_service.rb +98 -0
  76. data/lib/doto/services/entry_group/hydrator_service.rb +37 -0
  77. data/lib/doto/services/entry_group/importer_service.rb +117 -0
  78. data/lib/doto/services/migration_version/hydrator_service.rb +36 -0
  79. data/lib/doto/services/project/hydrator_service.rb +40 -0
  80. data/lib/doto/services/project/rename_service.rb +70 -0
  81. data/lib/doto/services/stderr_redirector_service.rb +27 -0
  82. data/lib/doto/services/stdout_redirector_service.rb +27 -0
  83. data/lib/doto/services/temp_file/reader_service.rb +33 -0
  84. data/lib/doto/services/temp_file/writer_service.rb +35 -0
  85. data/lib/doto/subcommands/base_subcommand.rb +12 -0
  86. data/lib/doto/subcommands/browse.rb +49 -0
  87. data/lib/doto/subcommands/config.rb +81 -0
  88. data/lib/doto/subcommands/delete.rb +108 -0
  89. data/lib/doto/subcommands/edit.rb +48 -0
  90. data/lib/doto/subcommands/export.rb +62 -0
  91. data/lib/doto/subcommands/import.rb +72 -0
  92. data/lib/doto/subcommands/list.rb +95 -0
  93. data/lib/doto/subcommands/project.rb +146 -0
  94. data/lib/doto/subcommands/theme.rb +131 -0
  95. data/lib/doto/support/ask.rb +44 -0
  96. data/lib/doto/support/color_themable.rb +36 -0
  97. data/lib/doto/support/command_help_colorizeable.rb +34 -0
  98. data/lib/doto/support/command_hookable.rb +71 -0
  99. data/lib/doto/support/command_options/doto_times.rb +48 -0
  100. data/lib/doto/support/command_options/time.rb +84 -0
  101. data/lib/doto/support/command_options/time_mnemonic.rb +108 -0
  102. data/lib/doto/support/command_options/time_mnemonics.rb +16 -0
  103. data/lib/doto/support/descriptable.rb +29 -0
  104. data/lib/doto/support/entry_group_browsable.rb +104 -0
  105. data/lib/doto/support/field_errors.rb +11 -0
  106. data/lib/doto/support/fileable.rb +136 -0
  107. data/lib/doto/support/presentable.rb +11 -0
  108. data/lib/doto/support/project_file_system.rb +118 -0
  109. data/lib/doto/support/short_string.rb +24 -0
  110. data/lib/doto/support/time_comparable.rb +21 -0
  111. data/lib/doto/support/time_formatable.rb +65 -0
  112. data/lib/doto/support/times_sortable.rb +71 -0
  113. data/lib/doto/support/transform_project_name.rb +24 -0
  114. data/lib/doto/support/utils.rb +11 -0
  115. data/lib/doto/validators/color_theme_validator.rb +74 -0
  116. data/lib/doto/validators/description_validator.rb +51 -0
  117. data/lib/doto/validators/entries_validator.rb +77 -0
  118. data/lib/doto/validators/project_name_validator.rb +58 -0
  119. data/lib/doto/validators/time_validator.rb +25 -0
  120. data/lib/doto/validators/version_validator.rb +29 -0
  121. data/lib/doto/version.rb +6 -0
  122. data/lib/doto/views/base_list_view.rb +41 -0
  123. data/lib/doto/views/color_theme/index.rb +62 -0
  124. data/lib/doto/views/color_theme/show.rb +107 -0
  125. data/lib/doto/views/configuration/show.rb +41 -0
  126. data/lib/doto/views/entry_group/edit.rb +121 -0
  127. data/lib/doto/views/entry_group/list.rb +23 -0
  128. data/lib/doto/views/entry_group/shared/no_entries_to_display.rb +53 -0
  129. data/lib/doto/views/entry_group/shared/no_entries_to_display_for_month_of.rb +32 -0
  130. data/lib/doto/views/entry_group/shared/no_entries_to_display_for_week_of.rb +33 -0
  131. data/lib/doto/views/entry_group/shared/no_entries_to_display_for_year_of.rb +33 -0
  132. data/lib/doto/views/entry_group/show.rb +63 -0
  133. data/lib/doto/views/export.rb +82 -0
  134. data/lib/doto/views/import.rb +105 -0
  135. data/lib/doto/views/import_dates.rb +17 -0
  136. data/lib/doto/views/project/create.rb +87 -0
  137. data/lib/doto/views/project/delete.rb +96 -0
  138. data/lib/doto/views/project/delete_by_number.rb +19 -0
  139. data/lib/doto/views/project/list.rb +115 -0
  140. data/lib/doto/views/project/rename.rb +98 -0
  141. data/lib/doto/views/project/rename_by_number.rb +21 -0
  142. data/lib/doto/views/project/use.rb +97 -0
  143. data/lib/doto/views/project/use_by_number.rb +19 -0
  144. data/lib/doto/views/shared/error.rb +17 -0
  145. data/lib/doto/views/shared/info.rb +17 -0
  146. data/lib/doto/views/shared/message.rb +85 -0
  147. data/lib/doto/views/shared/model_errors.rb +32 -0
  148. data/lib/doto/views/shared/success.rb +17 -0
  149. data/lib/doto/views/shared/warning.rb +17 -0
  150. data/lib/doto.rb +33 -0
  151. data/lib/locales/en/active_record.yml +17 -0
  152. data/lib/locales/en/commands.yml +165 -0
  153. data/lib/locales/en/miscellaneous.yml +29 -0
  154. data/lib/locales/en/presenters.yml +19 -0
  155. data/lib/locales/en/services.yml +14 -0
  156. data/lib/locales/en/subcommands.yml +786 -0
  157. data/lib/seed_data/0/.todo +5 -0
  158. data/lib/seed_data/20230613121411/.doto +8 -0
  159. data/lib/seed_data/20230613121411/doto/migration_version.json +3 -0
  160. data/lib/seed_data/20230613121411/doto/themes/cherry.json +79 -0
  161. data/lib/seed_data/20230613121411/doto/themes/christmas.json +79 -0
  162. data/lib/seed_data/20230613121411/doto/themes/default.json +79 -0
  163. data/lib/seed_data/20230613121411/doto/themes/lemon.json +79 -0
  164. data/lib/seed_data/20230613121411/doto/themes/light.json +79 -0
  165. data/lib/seed_data/20230613121411/doto/themes/matrix.json +79 -0
  166. data/lib/seed_data/20230613121411/doto/themes/whiteout.json +79 -0
  167. data/lib/seed_data/20240210161248/.doto +9 -0
  168. data/lib/seed_data/20240210161248/doto/current_project.json +4 -0
  169. data/lib/seed_data/20240210161248/doto/migration_version.json +3 -0
  170. data/lib/seed_data/20240210161248/doto/projects/default/project.json +5 -0
  171. data/lib/seed_data/20240210161248/doto/themes/cherry.json +79 -0
  172. data/lib/seed_data/20240210161248/doto/themes/christmas.json +79 -0
  173. data/lib/seed_data/20240210161248/doto/themes/default.json +79 -0
  174. data/lib/seed_data/20240210161248/doto/themes/lemon.json +79 -0
  175. data/lib/seed_data/20240210161248/doto/themes/light.json +79 -0
  176. data/lib/seed_data/20240210161248/doto/themes/matrix.json +79 -0
  177. data/lib/seed_data/20240210161248/doto/themes/whiteout.json +79 -0
  178. data/sig/dsu.rbs +4 -0
  179. metadata +406 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2e2cc37d639fe11c76ceaea8743ca36923ae5a9df29d3fc36df3d164559e4cfa
4
+ data.tar.gz: 246edb5af9d33cb06ade35df716dd911bf300e9a81d3ee29733c12e4f02b6b4f
5
+ SHA512:
6
+ metadata.gz: 2239cc588645a6b78cbc7c204d5bd91fc03a6783dda30af3f63dfd09bc5110edea8adcb2236be283407b2e9907d6d29ec809724fead0ed1c0e159280834353e7
7
+ data.tar.gz: bdf8a6018b3f23cc2172079381c6ac9154fe8c352de2e767e118c0d081fa5138ed0568119284831492d156667fbfc1d7513b06cd6d99f80d933b8a1ce0bc49c9
data/.env.test ADDED
@@ -0,0 +1 @@
1
+ DOTO_ENV=test
data/.reek.yml ADDED
@@ -0,0 +1,20 @@
1
+ exclude_paths:
2
+ - vendor
3
+ - spec
4
+ - scratch*.rb
5
+ - snippets*.rb
6
+ detectors:
7
+ # TooManyInstanceVariables:
8
+ # exclude:
9
+ # - "Class1"
10
+ # - "Class2"
11
+ # private methods do not have to depend on instance state
12
+ # https://github.com/troessner/reek/blob/master/docs/Utility-Function.md
13
+ UtilityFunction:
14
+ public_methods_only: true
15
+ # Check for variable name that doesn't communicate its intent well enough
16
+ # https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Variable-Name.md
17
+ UncommunicativeVariableName:
18
+ accept:
19
+ - /^_$/
20
+ - /^e$/
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,206 @@
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rspec
4
+ - rubocop-factory_bot
5
+ - rubocop-rake
6
+
7
+ AllCops:
8
+ TargetRubyVersion: 3.0.1
9
+ NewCops: enable
10
+ Exclude:
11
+ - '.git/**/*'
12
+ - '.idea/**/*'
13
+ - 'init/*'
14
+ - 'Rakefile'
15
+ - '*.gemspec'
16
+ # - 'spec/**/*'
17
+ - 'vendor/**/*'
18
+ - 'scratch*.rb'
19
+ - 'snippets*.rb'
20
+
21
+ # Align the elements of a hash literal if they span more than one line.
22
+ Layout/HashAlignment:
23
+ EnforcedLastArgumentHashStyle: always_ignore
24
+
25
+ # Alignment of parameters in multi-line method definition.
26
+ # The `with_fixed_indentation` style aligns the following lines with one
27
+ # level of indentation relative to the start of the line with the method
28
+ # definition.
29
+ #
30
+ # def my_method(a,
31
+ # b)
32
+ Layout/ParameterAlignment:
33
+ EnforcedStyle: with_fixed_indentation
34
+
35
+ # Alignment of parameters in multi-line method call.
36
+ # The `with_fixed_indentation` style aligns the following lines with one
37
+ # level of indentation relative to the start of the line with the method call.
38
+ #
39
+ # my_method(a,
40
+ # b)
41
+ Layout/ArgumentAlignment:
42
+ EnforcedStyle: with_fixed_indentation
43
+
44
+ # a = case n
45
+ # when 0
46
+ # x * 2
47
+ # else
48
+ # y / 3
49
+ # end
50
+ Layout/CaseIndentation:
51
+ EnforcedStyle: end
52
+
53
+ # Enforces a configured order of definitions within a class body
54
+ Layout/ClassStructure:
55
+ Enabled: true
56
+
57
+ # Align `end` with the matching keyword or starting expression except for
58
+ # assignments, where it should be aligned with the LHS.
59
+ Layout/EndAlignment:
60
+ EnforcedStyleAlignWith: variable
61
+ AutoCorrect: true
62
+
63
+ # The `consistent` style enforces that the first element in an array
64
+ # literal where the opening bracket and the first element are on
65
+ # seprate lines is indented the same as an array literal which is not
66
+ # defined inside a method call.
67
+ Layout/FirstArrayElementIndentation:
68
+ EnforcedStyle: consistent
69
+
70
+ # The `consistent` style enforces that the first key in a hash
71
+ # literal where the opening brace and the first key are on
72
+ # seprate lines is indented the same as a hash literal which is not
73
+ # defined inside a method call.
74
+ Layout/FirstHashElementIndentation:
75
+ EnforcedStyle: consistent
76
+
77
+ # Indent multi-line methods instead of aligning with periods
78
+ Layout/MultilineMethodCallIndentation:
79
+ EnforcedStyle: indented
80
+
81
+ # Allow `debug` in tasks for now
82
+ Lint/Debugger:
83
+ Exclude:
84
+ - 'RakeFile'
85
+
86
+ # A calculated magnitude based on number of assignments, branches, and
87
+ # conditions.
88
+ # NOTE: This is temporarily disabled until we can eliminate existing Rubocop
89
+ # complaints
90
+ Metrics/AbcSize:
91
+ Enabled: false
92
+
93
+ # Avoid long blocks with many lines.
94
+ Metrics/BlockLength:
95
+ Exclude:
96
+ - 'RakeFile'
97
+ - 'db/seeds.rb'
98
+ - 'spec/**/*.rb'
99
+
100
+ # Avoid classes longer than 100 lines of code.
101
+ # NOTE: This is temporarily disabled until we can eliminate existing Rubocop
102
+ # complaints
103
+ Metrics/ClassLength:
104
+ Max: 200
105
+ Exclude:
106
+ - 'spec/**/*.rb'
107
+
108
+ # A complexity metric that is strongly correlated to the number of test cases
109
+ # needed to validate a method.
110
+ Metrics/CyclomaticComplexity:
111
+ Max: 9
112
+
113
+ # Limit lines to 80 characters
114
+ Layout/LineLength:
115
+ Exclude:
116
+ - 'RakeFile'
117
+ - 'spec/**/*.rb'
118
+
119
+ # Avoid methods longer than 15 lines of code.
120
+ Metrics/MethodLength:
121
+ Max: 20
122
+ AllowedMethods:
123
+ - swagger_path
124
+ - operation
125
+
126
+
127
+ # A complexity metric geared towards measuring complexity for a human reader.
128
+ Metrics/PerceivedComplexity:
129
+ Max: 10
130
+
131
+ NestedGroups:
132
+ Max: 4
133
+
134
+ # Naming/FileName:
135
+ # Exclude:
136
+ # - 'lib/file.rb'
137
+
138
+ # Allow `downcase == ` instead of forcing `casecmp`
139
+ Performance/Casecmp:
140
+ Enabled: false
141
+
142
+ # Require children definitions to be nested or compact in classes and modules
143
+ Style/ClassAndModuleChildren:
144
+ Enabled: false
145
+
146
+ # Document classes and non-namespace modules.
147
+ # (Disabled for now, may revisit later)
148
+ Style/Documentation:
149
+ Enabled: false
150
+
151
+ # Checks the formatting of empty method definitions.
152
+ Style/EmptyMethod:
153
+ EnforcedStyle: expanded
154
+
155
+ # Add the frozen_string_literal comment to the top of files to help transition
156
+ # to frozen string literals by default.
157
+ Style/FrozenStringLiteralComment:
158
+ EnforcedStyle: always
159
+
160
+ # Check for conditionals that can be replaced with guard clauses
161
+ Style/GuardClause:
162
+ Enabled: false
163
+
164
+ Style/MixinUsage:
165
+ Exclude:
166
+ - 'RakeFile'
167
+
168
+ # Avoid multi-line method signatures.
169
+ Style/MultilineMethodSignature:
170
+ Enabled: true
171
+
172
+ # Don't use option hashes when you can use keyword arguments.
173
+ Style/OptionHash:
174
+ Enabled: true
175
+
176
+ # Use return instead of return nil.
177
+ Style/ReturnNil:
178
+ Enabled: true
179
+
180
+ # Allow code like `return x, y` as it's occasionally handy.
181
+ Style/RedundantReturn:
182
+ AllowMultipleReturnValues: true
183
+
184
+ # Prefer symbols instead of strings as hash keys.
185
+ Style/StringHashKeys:
186
+ Enabled: true
187
+
188
+ # Checks if configured preferred methods are used over non-preferred.
189
+ Style/StringMethods:
190
+ Enabled: true
191
+
192
+ # Checks for use of parentheses around ternary conditions.
193
+ Style/TernaryParentheses:
194
+ EnforcedStyle: require_parentheses_when_complex
195
+
196
+ RSpec/NotToNot:
197
+ EnforcedStyle: to_not
198
+ SupportedStyles:
199
+ - to_not
200
+ - not_to
201
+
202
+ RSpec/MultipleExpectations:
203
+ Enabled: false
204
+
205
+ RSpec/MultipleMemoizedHelpers:
206
+ Max: 6
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.0.7
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.0.1-alpha.1] - 2024-09-06
6
+
7
+ Initial (alpha) release. See README.md for instructions.
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at web.gma@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in doto.gemspec
6
+ gemspec
7
+
8
+ gem 'bundler', '>= 2.5', '< 3.0'
9
+ gem 'rake', '>= 13.0', '< 14.0'
10
+
11
+ group :development do
12
+ gem 'reek', '>= 6.1', '< 7.0'
13
+ gem 'rubocop', '>= 1.65', '< 2.0'
14
+ gem 'rubocop-factory_bot', '~> 2.26', '>= 2.26.1'
15
+ gem 'rubocop-performance', '>= 1.21.1', '< 2.0'
16
+ gem 'rubocop-rake', '>= 0.6', '< 1.0'
17
+ gem 'rubocop-rspec', '~> 3.0', '>= 3.0.3'
18
+ end
19
+
20
+ group :test do
21
+ gem 'rspec', '>= 3.12', '< 4.0'
22
+ gem 'simplecov', '>= 0.22.0', '< 1.0'
23
+ end
24
+
25
+ group :development, :test do
26
+ gem 'dotenv', '~> 3.1', '>= 3.1.2'
27
+ gem 'factory_bot', '~> 6.3'
28
+ gem 'ffaker', '~> 2.21'
29
+ gem 'pry-byebug', '>= 3.9', '< 4.0'
30
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,179 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ doto (0.0.1.pre.alpha.1)
5
+ activemodel (>= 7.0.8, < 8.0)
6
+ activesupport (>= 7.0.8, < 8.0)
7
+ colorize (>= 1.1, < 2.0)
8
+ os (>= 1.1, < 2.0)
9
+ thor (>= 1.2, < 2.0)
10
+ thor_nested_subcommand (>= 1.0, < 2.0)
11
+ tzinfo-data (~> 1.2024, >= 1.2024.1)
12
+
13
+ GEM
14
+ remote: https://rubygems.org/
15
+ specs:
16
+ activemodel (7.1.3.4)
17
+ activesupport (= 7.1.3.4)
18
+ activesupport (7.1.3.4)
19
+ base64
20
+ bigdecimal
21
+ concurrent-ruby (~> 1.0, >= 1.0.2)
22
+ connection_pool (>= 2.2.5)
23
+ drb
24
+ i18n (>= 1.6, < 2)
25
+ minitest (>= 5.1)
26
+ mutex_m
27
+ tzinfo (~> 2.0)
28
+ ast (2.4.2)
29
+ base64 (0.2.0)
30
+ bigdecimal (3.1.8)
31
+ byebug (11.1.3)
32
+ coderay (1.1.3)
33
+ colorize (1.1.0)
34
+ concurrent-ruby (1.3.3)
35
+ connection_pool (2.4.1)
36
+ diff-lcs (1.5.1)
37
+ docile (1.4.1)
38
+ dotenv (3.1.2)
39
+ drb (2.2.1)
40
+ dry-configurable (1.2.0)
41
+ dry-core (~> 1.0, < 2)
42
+ zeitwerk (~> 2.6)
43
+ dry-core (1.0.1)
44
+ concurrent-ruby (~> 1.0)
45
+ zeitwerk (~> 2.6)
46
+ dry-inflector (1.1.0)
47
+ dry-initializer (3.1.1)
48
+ dry-logic (1.5.0)
49
+ concurrent-ruby (~> 1.0)
50
+ dry-core (~> 1.0, < 2)
51
+ zeitwerk (~> 2.6)
52
+ dry-schema (1.13.4)
53
+ concurrent-ruby (~> 1.0)
54
+ dry-configurable (~> 1.0, >= 1.0.1)
55
+ dry-core (~> 1.0, < 2)
56
+ dry-initializer (~> 3.0)
57
+ dry-logic (>= 1.4, < 2)
58
+ dry-types (>= 1.7, < 2)
59
+ zeitwerk (~> 2.6)
60
+ dry-types (1.7.2)
61
+ bigdecimal (~> 3.0)
62
+ concurrent-ruby (~> 1.0)
63
+ dry-core (~> 1.0)
64
+ dry-inflector (~> 1.0)
65
+ dry-logic (~> 1.4)
66
+ zeitwerk (~> 2.6)
67
+ factory_bot (6.4.6)
68
+ activesupport (>= 5.0.0)
69
+ ffaker (2.23.0)
70
+ i18n (1.14.5)
71
+ concurrent-ruby (~> 1.0)
72
+ json (2.7.2)
73
+ language_server-protocol (3.17.0.3)
74
+ method_source (1.1.0)
75
+ minitest (5.24.1)
76
+ mutex_m (0.2.0)
77
+ os (1.1.4)
78
+ parallel (1.25.1)
79
+ parser (3.3.4.0)
80
+ ast (~> 2.4.1)
81
+ racc
82
+ pry (0.14.2)
83
+ coderay (~> 1.1)
84
+ method_source (~> 1.0)
85
+ pry-byebug (3.10.1)
86
+ byebug (~> 11.0)
87
+ pry (>= 0.13, < 0.15)
88
+ racc (1.8.1)
89
+ rainbow (3.1.1)
90
+ rake (13.2.1)
91
+ reek (6.3.0)
92
+ dry-schema (~> 1.13.0)
93
+ parser (~> 3.3.0)
94
+ rainbow (>= 2.0, < 4.0)
95
+ rexml (~> 3.1)
96
+ regexp_parser (2.9.2)
97
+ rexml (3.3.4)
98
+ strscan
99
+ rspec (3.13.0)
100
+ rspec-core (~> 3.13.0)
101
+ rspec-expectations (~> 3.13.0)
102
+ rspec-mocks (~> 3.13.0)
103
+ rspec-core (3.13.0)
104
+ rspec-support (~> 3.13.0)
105
+ rspec-expectations (3.13.1)
106
+ diff-lcs (>= 1.2.0, < 2.0)
107
+ rspec-support (~> 3.13.0)
108
+ rspec-mocks (3.13.1)
109
+ diff-lcs (>= 1.2.0, < 2.0)
110
+ rspec-support (~> 3.13.0)
111
+ rspec-support (3.13.1)
112
+ rubocop (1.65.1)
113
+ json (~> 2.3)
114
+ language_server-protocol (>= 3.17.0)
115
+ parallel (~> 1.10)
116
+ parser (>= 3.3.0.2)
117
+ rainbow (>= 2.2.2, < 4.0)
118
+ regexp_parser (>= 2.4, < 3.0)
119
+ rexml (>= 3.2.5, < 4.0)
120
+ rubocop-ast (>= 1.31.1, < 2.0)
121
+ ruby-progressbar (~> 1.7)
122
+ unicode-display_width (>= 2.4.0, < 3.0)
123
+ rubocop-ast (1.31.3)
124
+ parser (>= 3.3.1.0)
125
+ rubocop-factory_bot (2.26.1)
126
+ rubocop (~> 1.61)
127
+ rubocop-performance (1.21.1)
128
+ rubocop (>= 1.48.1, < 2.0)
129
+ rubocop-ast (>= 1.31.1, < 2.0)
130
+ rubocop-rake (0.6.0)
131
+ rubocop (~> 1.0)
132
+ rubocop-rspec (3.0.3)
133
+ rubocop (~> 1.61)
134
+ ruby-progressbar (1.13.0)
135
+ simplecov (0.22.0)
136
+ docile (~> 1.1)
137
+ simplecov-html (~> 0.11)
138
+ simplecov_json_formatter (~> 0.1)
139
+ simplecov-html (0.12.3)
140
+ simplecov_json_formatter (0.1.4)
141
+ strscan (3.1.0)
142
+ thor (1.3.1)
143
+ thor_nested_subcommand (1.0.9)
144
+ tzinfo (2.0.6)
145
+ concurrent-ruby (~> 1.0)
146
+ tzinfo-data (1.2024.1)
147
+ tzinfo (>= 1.0.0)
148
+ unicode-display_width (2.5.0)
149
+ zeitwerk (2.6.17)
150
+
151
+ PLATFORMS
152
+ arm64-darwin-22
153
+ arm64-darwin-23
154
+ x64-mingw-ucrt
155
+ x64-mingw32
156
+ x86_64-darwin-19
157
+ x86_64-darwin-20
158
+ x86_64-darwin-21
159
+ x86_64-linux
160
+
161
+ DEPENDENCIES
162
+ bundler (>= 2.5, < 3.0)
163
+ dotenv (~> 3.1, >= 3.1.2)
164
+ doto!
165
+ factory_bot (~> 6.3)
166
+ ffaker (~> 2.21)
167
+ pry-byebug (>= 3.9, < 4.0)
168
+ rake (>= 13.0, < 14.0)
169
+ reek (>= 6.1, < 7.0)
170
+ rspec (>= 3.12, < 4.0)
171
+ rubocop (>= 1.65, < 2.0)
172
+ rubocop-factory_bot (~> 2.26, >= 2.26.1)
173
+ rubocop-performance (>= 1.21.1, < 2.0)
174
+ rubocop-rake (>= 0.6, < 1.0)
175
+ rubocop-rspec (~> 3.0, >= 3.0.3)
176
+ simplecov (>= 0.22.0, < 1.0)
177
+
178
+ BUNDLED WITH
179
+ 2.5.6
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 gangelo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # `doto`
2
+
3
+ [![Ruby](https://github.com/gangelo/doto/actions/workflows/ruby.yml/badge.svg)](https://github.com/gangelo/doto/actions/workflows/ruby.yml)
4
+ [![GitHub version](http://badge.fury.io/gh/gangelo%2Fdoto.svg?refresh=15)](https://badge.fury.io/gh/gangelo%2Fdoto)
5
+ [![Gem Version](https://badge.fury.io/rb/doto.svg?refresh=15)](https://badge.fury.io/rb/doto)
6
+ [![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/doto/)
7
+ [![Report Issues](https://img.shields.io/badge/report-issues-red.svg)](https://github.com/gangelo/doto/issues)
8
+ [![License](http://img.shields.io/badge/license-MIT-yellowgreen.svg)](#license)
9
+
10
+ `doto` is a [ruby gem](https://rubygems.org/gems/doto) that enables anyone practicing the [Agile methodology](https://www.agilealliance.org/agile101/) to record, keep track of and manage their [daily standup (TODO)](https://www.agilealliance.org/glossary/daily-meeting/) activities.
11
+
12
+ - `doto` uses _no_ network connections whatsoever.
13
+ - `doto` stores all of its data _locally_, in .json files.
14
+ - `doto` is a simple (but powerful) command-line tool for users who _love_ to work within the terminal.
15
+ - `doto` versioning follows the [semantic versioning standard](https://semver.org/) (MAJOR.MINOR.PATCH).
16
+ - See the [CHANGELOG.md](https://github.com/gangelo/doto/blob/main/CHANGELOG.md) before upgrading to a MAJOR `doto` version.
17
+ - See the [Exporting TODO entries](https://github.com/gangelo/doto/wiki/Exporting-TODO-entries) wiki on how to export (backup) your data.
18
+
19
+ # Installation
20
+ ```shell
21
+ gem install doto
22
+ ```
23
+
24
+ # Documentation
25
+ The [doto wiki](https://github.com/gangelo/doto/wiki) is currently the gold standard for `doto` documentation.
26
+
27
+ # Examples
28
+ * The [doto wiki](https://github.com/gangelo/doto/wiki) is repleat with practical examples on how to use `doto`.
29
+ * Visit the [How I use doto daily as an Agile developer](https://github.com/gangelo/doto/wiki/How-I-use-doto-daily-as-an-Agile-developer) wiki for examples of how _I_ use `doto` on a daily basis.
30
+
31
+ # Supported ruby versions
32
+ `doto` _should_ work with any ruby version `['>= 3.0.7', '< 4.0']`; however, `doto` is currently tested against the ubuntu-latest, macos-latest and windows-latest platforms, using the following ruby versions:
33
+ - 3.0.7
34
+ - 3.1
35
+ - 3.2
36
+ - 3.3
37
+
38
+ Copyright (c) 2023-2024 Gene Angelo. See [LICENSE](https://github.com/gangelo/doto/blob/main/LICENSE.txt) for details.
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+ require "rubocop/rake_task"
6
+
7
+ RSpec::Core::RakeTask.new(:spec)
8
+ RuboCop::RakeTask.new
9
+
10
+ desc 'Generate a migration timestamp'
11
+ task :timestamp do
12
+ puts 'The below migration timestamp should be placed in the "lib/doto/migration/version.rb" file.'
13
+ puts Time.now.strftime('%Y%m%d%H%M%S')
14
+ end
15
+
16
+ task default: %i[spec rubocop]
data/bin/console ADDED
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+
6
+ if File.exist?('.env.development')
7
+ # This loads our development environment when running dev.
8
+ require 'dotenv'
9
+ Dotenv.load('.env.development')
10
+ end
11
+
12
+ require 'doto'
13
+ require 'pry-byebug'
14
+
15
+ # So we can use FactoryBot in the console.
16
+ require 'factory_bot'
17
+ require 'ffaker'
18
+ FactoryBot.find_definitions
19
+
20
+ if Doto.env.development?
21
+ # This simply allows us to use a folder other than doto folder for the production
22
+ # release, so we don't mess with our current production doto folder.
23
+ module Doto
24
+ module Support
25
+ module Fileable
26
+ def root_folder
27
+ File.join(gem_dir, '.development_home')
28
+ end
29
+ end
30
+ end
31
+ end
32
+
33
+ puts "ATTENTION: Doto root folder is: #{Doto::Support::Fileable.root_folder}!"
34
+ end
35
+
36
+ Pry.start
data/bin/doto ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env zsh
2
+
3
+ bundle exec exe/doto "$@"
data/bin/setup ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ # set -vx
5
+
6
+ # This makes sure all of the scripts we need to load are loaded from
7
+ # the executing script folder so they can be found
8
+ DIR="$( cd "$( dirname $0 )" >/dev/null 2>&1 && pwd )"
9
+ pushd $DIR >/dev/null 2>&1
10
+ popd >/dev/null 2>&1
11
+
12
+ exit_code=$?
13
+ if [ $exit_code -ne 0 ]; then
14
+ exit $exit_code
15
+ fi
16
+
17
+ set -vx
18
+ bundle install