ruby_todo 0.3.5 → 0.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/lib/ruby_todo/cli.rb +29 -22
- data/lib/ruby_todo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a687c9f4bb0db9df671ccb741b37dc96ee9bef6e73c430d42d8de580f13a6969
|
4
|
+
data.tar.gz: 74a004b0794125b2ee2e9db9a17579b6695969e1d0d56c7bc76a21f71cb9f94a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5801730249eec150ebc2a10439581852e313bd0ed1e7d3ce62c412a33e8568b3cb769c335a9a763e13f30bf87914485563210720015c01a44cfd60ffc7365bb
|
7
|
+
data.tar.gz: 5199b14e9005bcddd88e79fd2e0e3dbb0a506bdefb96582fc65c63fa8166b08cb4e895c3b644bf64e92871335dcd6bc30d2d7b62e56209a58d8d633a6e438773
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,19 @@
|
|
1
|
-
## [0.
|
1
|
+
## [0.4.1] - 2025-03-28
|
2
2
|
|
3
3
|
* Manual release
|
4
4
|
|
5
5
|
|
6
|
+
## [0.4.0] - 2025-03-28
|
7
|
+
|
8
|
+
### Added
|
9
|
+
- Restructured CLI commands for better organization
|
10
|
+
- Added dedicated NotebookCommand class for notebook-related commands
|
11
|
+
- Improved command structure consistency
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
- Fixed `notebook` command not being recognized issue
|
15
|
+
- Ensured proper subcommand registration
|
16
|
+
|
6
17
|
## [0.3.4] - 2025-03-28
|
7
18
|
|
8
19
|
* Manual release
|
data/lib/ruby_todo/cli.rb
CHANGED
@@ -26,6 +26,30 @@ module RubyTodo
|
|
26
26
|
true
|
27
27
|
end
|
28
28
|
|
29
|
+
# Notebook commands
|
30
|
+
class NotebookCommand < Thor
|
31
|
+
desc "create NAME", "Create a new notebook"
|
32
|
+
def create(name)
|
33
|
+
Notebook.create(name: name)
|
34
|
+
puts "Created notebook: #{name}".green
|
35
|
+
end
|
36
|
+
|
37
|
+
desc "list", "List all notebooks"
|
38
|
+
def list
|
39
|
+
notebooks = Notebook.all
|
40
|
+
if notebooks.empty?
|
41
|
+
puts "No notebooks found. Create one with 'ruby_todo notebook create NAME'".yellow
|
42
|
+
return
|
43
|
+
end
|
44
|
+
|
45
|
+
table = TTY::Table.new(
|
46
|
+
header: ["ID", "Name", "Tasks", "Created At"],
|
47
|
+
rows: notebooks.map { |n| [n.id, n.name, n.tasks.count, n.created_at] }
|
48
|
+
)
|
49
|
+
puts table.render(:ascii)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
29
53
|
# Template commands
|
30
54
|
class TemplateCommand < Thor
|
31
55
|
desc "create NAME", "Create a new task template"
|
@@ -179,26 +203,12 @@ module RubyTodo
|
|
179
203
|
say "Ruby Todo has been initialized successfully!".green
|
180
204
|
end
|
181
205
|
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
say "Created notebook: #{name}".green
|
186
|
-
end
|
206
|
+
# Register subcommands
|
207
|
+
desc "notebook SUBCOMMAND", "Manage notebooks"
|
208
|
+
subcommand "notebook", NotebookCommand
|
187
209
|
|
188
|
-
desc "
|
189
|
-
|
190
|
-
notebooks = Notebook.all
|
191
|
-
if notebooks.empty?
|
192
|
-
say "No notebooks found. Create one with 'ruby_todo notebook create [NAME]'".yellow
|
193
|
-
return
|
194
|
-
end
|
195
|
-
|
196
|
-
table = TTY::Table.new(
|
197
|
-
header: ["ID", "Name", "Tasks", "Created At"],
|
198
|
-
rows: notebooks.map { |n| [n.id, n.name, n.tasks.count, n.created_at] }
|
199
|
-
)
|
200
|
-
puts table.render(:ascii)
|
201
|
-
end
|
210
|
+
desc "template SUBCOMMAND", "Manage task templates"
|
211
|
+
subcommand "template", TemplateCommand
|
202
212
|
|
203
213
|
desc "task add [NOTEBOOK] [TITLE]", "Add a new task to a notebook"
|
204
214
|
method_option :description, type: :string, desc: "Task description"
|
@@ -569,9 +579,6 @@ module RubyTodo
|
|
569
579
|
end
|
570
580
|
end
|
571
581
|
|
572
|
-
desc "template SUBCOMMAND", "Manage task templates"
|
573
|
-
subcommand "template", TemplateCommand
|
574
|
-
|
575
582
|
# Task-related command aliases
|
576
583
|
map "task:list" => "task_list"
|
577
584
|
map "task:show" => "task_show"
|
data/lib/ruby_todo/version.rb
CHANGED