ruby_todo 1.0.7 → 1.0.9

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.
@@ -3,8 +3,14 @@
3
3
  module RubyTodo
4
4
  module NotebookCommands
5
5
  def notebook_create(name)
6
- Notebook.create(name: name)
7
- puts "Created notebook: #{name}".green
6
+ notebook = Notebook.new(name: name)
7
+ if notebook.save
8
+ puts "Created notebook: #{name}".green
9
+ notebook
10
+ else
11
+ puts "Error creating notebook: #{notebook.errors.full_messages.join(", ")}".red
12
+ nil
13
+ end
8
14
  end
9
15
 
10
16
  def notebook_list
@@ -15,6 +15,22 @@ module RubyTodo
15
15
  create_tables
16
16
  end
17
17
 
18
+ def initialized?
19
+ # Try to check if the database exists and is set up
20
+ db_path = File.expand_path("~/.ruby_todo/ruby_todo.db")
21
+ File.exist?(db_path) && ActiveRecord::Base.connected?
22
+ rescue StandardError
23
+ false
24
+ end
25
+
26
+ def db
27
+ # Ensure connection is established
28
+ setup unless initialized?
29
+
30
+ # Return connection
31
+ ActiveRecord::Base.connection
32
+ end
33
+
18
34
  private
19
35
 
20
36
  def ensure_database_directory
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyTodo
4
- VERSION = "1.0.7"
4
+ VERSION = "1.0.9"
5
5
  end
data/pr_template.md ADDED
@@ -0,0 +1,58 @@
1
+ # IDENTITY and PURPOSE
2
+
3
+ You are an experienced software engineer about to open a PR. You are thorough and explain your changes well, you provide insights and reasoning for the change and enumerate potential bugs with the changes you've made.
4
+
5
+ Your task is to create a pull request for the given code changes. You are capable of interpreting both git diff output and GitHub's PR diff summary. Take a deep breath and follow these steps:
6
+
7
+ # STEPS
8
+
9
+ 1. Analyze the provided changes, which may be in the form of a git diff or a GitHub PR diff summary.
10
+ 2. Identify the type of changes being made (e.g., new files, renamed files, modified files, deleted files).
11
+ 3. Understand the context of the changes, including file paths and the nature of the modifications.
12
+ 4. Draft a comprehensive description of the pull request based on the input.
13
+ 5. Create the gh CLI command to create a GitHub pull request.
14
+
15
+ # OUTPUT INSTRUCTIONS
16
+
17
+ * The command should start with `gh pr create`.
18
+ * Do not use the new line character in the command since it does not work
19
+ * Include the `--base main` flag.
20
+ * Use the `--title` flag with a concise, descriptive title matching the commitzen convention.
21
+ * Use the `--body` flag for the PR description.
22
+ * Output only the git commit command in a single `bash` code block.
23
+ * Include the following sections in the body:
24
+ * '## Summary' with a brief overview of changes
25
+ * '## Changes' listing specific modifications
26
+ * '## Additional Notes' for any extra information
27
+ * Escape any backticks within the command using backslashes. i.e. \` text with backticks \`
28
+ * Wrap the entire command in a code block for easy copy-pasting, using the following format:
29
+
30
+ ```bash
31
+ gh pr create --base main --title "commitzen style title" --body "## Summary
32
+
33
+ Your summary here
34
+
35
+ ## Changes
36
+
37
+ - Change 1
38
+ - Change 2 with escaped \`backticks\`
39
+ - Change 3
40
+
41
+ ## Additional Notes
42
+
43
+ Any optional additional notes here"
44
+ ```
45
+
46
+ * When analyzing the diff, consider both traditional git diff format and GitHub's PR diff summary format.
47
+ * For GitHub's PR diff summary:
48
+ * Look for file renaming patterns (e.g., "File renamed without changes.")
49
+ * Identify new file additions (e.g., lines starting with "+")
50
+ * Recognize file deletions (e.g., lines starting with "-")
51
+ * Understand file modifications by analyzing the changes in content
52
+ * Adjust your interpretation based on the format of the provided diff information.
53
+ * Ensure you accurately represent the nature of the changes (new files, renames, modifications) in your PR description.
54
+ * Ensure you follow ALL these instructions when creating your output.
55
+
56
+ # INPUT
57
+
58
+ INPUT:
data/sorted_tests.txt ADDED
@@ -0,0 +1,59 @@
1
+ test_ai_ambiguous_notebook_reference
2
+ test_ai_basic_functionality
3
+ test_ai_batch_task_update_by_keyword
4
+ test_ai_batch_task_update_by_tag
5
+ test_ai_complex_task_creation_with_natural_language
6
+ test_ai_conversational_export_requests
7
+ test_ai_conversational_request_for_notebook_contents
8
+ test_ai_create_default_notebook_for_task
9
+ test_ai_create_multiple_infrastructure_tasks
10
+ test_ai_create_notebook
11
+ test_ai_create_task_with_attributes
12
+ test_ai_date_based_export_request
13
+ test_ai_default_notebook_remains_when_adding_new_notebook
14
+ test_ai_display_in_progress_status_tasks
15
+ test_ai_display_tasks_that_are_in_progress
16
+ test_ai_empty_prompt
17
+ test_ai_explicit_default_notebook_commands
18
+ test_ai_export_archived_tasks
19
+ test_ai_export_done_tasks
20
+ test_ai_export_done_tasks_to_csv
21
+ test_ai_export_done_tasks_with_custom_filename
22
+ test_ai_export_in_progress_tasks
23
+ test_ai_export_nonexistent_status
24
+ test_ai_export_tasks_to_different_formats
25
+ test_ai_export_tasks_with_status
26
+ test_ai_export_todo_tasks
27
+ test_ai_export_with_custom_parameters
28
+ test_ai_export_with_different_status_formats
29
+ test_ai_export_with_no_done_tasks
30
+ test_ai_handle_multiple_requests_in_one_prompt
31
+ test_ai_handles_both_normal_and_medium_terms
32
+ test_ai_invalid_api_key
33
+ test_ai_invalid_status
34
+ test_ai_invalid_task_id
35
+ test_ai_list_tasks_in_notebook
36
+ test_ai_list_tasks_that_are_in_todo_status
37
+ test_ai_list_tasks_with_in_progress_hyphenated
38
+ test_ai_list_tasks_with_in_progress_status
39
+ test_ai_list_tasks_with_status_in_progress
40
+ test_ai_list_tasks_with_todo_status
41
+ test_ai_multiple_specific_task_update
42
+ test_ai_natural_language_task_creation
43
+ test_ai_never_uses_normal_priority
44
+ test_ai_nonexistent_notebook
45
+ test_ai_notebook_listing
46
+ test_ai_sets_medium_priority_by_default
47
+ test_ai_show_in_progress_tasks_alternative_phrasing
48
+ test_ai_show_tasks_having_in_progress_status
49
+ test_ai_show_todo_tasks_alternative_phrasing
50
+ test_ai_statistics_request
51
+ test_ai_task_creation_suggestion
52
+ test_ai_task_list
53
+ test_ai_task_listing
54
+ test_ai_task_movement_with_natural_language
55
+ test_ai_task_search
56
+ test_ai_task_status_update
57
+ test_ai_task_with_invalid_attributes
58
+ test_notebook_commands_with_explicit_methods
59
+ test_template_commands_with_explicit_methods
data/test_methods.txt ADDED
@@ -0,0 +1,59 @@
1
+ test_ai_basic_functionality
2
+ test_ai_task_creation_suggestion
3
+ test_ai_task_listing
4
+ test_ai_task_status_update
5
+ test_ai_task_search
6
+ test_ai_notebook_listing
7
+ test_ai_create_notebook
8
+ test_ai_create_task_with_attributes
9
+ test_ai_list_tasks_in_notebook
10
+ test_ai_export_done_tasks
11
+ test_ai_export_done_tasks_to_csv
12
+ test_ai_export_done_tasks_with_custom_filename
13
+ test_ai_export_in_progress_tasks
14
+ test_ai_export_todo_tasks
15
+ test_ai_export_archived_tasks
16
+ test_ai_export_tasks_with_status
17
+ test_ai_export_tasks_to_different_formats
18
+ test_ai_conversational_export_requests
19
+ test_ai_export_with_different_status_formats
20
+ test_ai_export_nonexistent_status
21
+ test_ai_export_with_custom_parameters
22
+ test_ai_list_tasks_with_in_progress_status
23
+ test_ai_show_in_progress_tasks_alternative_phrasing
24
+ test_ai_list_tasks_with_status_in_progress
25
+ test_ai_list_tasks_with_todo_status
26
+ test_ai_show_todo_tasks_alternative_phrasing
27
+ test_ai_statistics_request
28
+ test_ai_batch_task_update_by_tag
29
+ test_ai_batch_task_update_by_keyword
30
+ test_ai_multiple_specific_task_update
31
+ test_ai_empty_prompt
32
+ test_ai_invalid_api_key
33
+ test_ai_nonexistent_notebook
34
+ test_ai_invalid_task_id
35
+ test_ai_invalid_status
36
+ test_ai_task_with_invalid_attributes
37
+ test_ai_export_with_no_done_tasks
38
+ test_ai_ambiguous_notebook_reference
39
+ test_ai_complex_task_creation_with_natural_language
40
+ test_ai_conversational_request_for_notebook_contents
41
+ test_ai_date_based_export_request
42
+ test_ai_task_movement_with_natural_language
43
+ test_ai_natural_language_task_creation
44
+ test_ai_task_list
45
+ test_notebook_commands_with_explicit_methods
46
+ test_template_commands_with_explicit_methods
47
+ test_ai_list_tasks_with_in_progress_hyphenated
48
+ test_ai_show_tasks_having_in_progress_status
49
+ test_ai_display_in_progress_status_tasks
50
+ test_ai_list_tasks_that_are_in_todo_status
51
+ test_ai_display_tasks_that_are_in_progress
52
+ test_ai_create_multiple_infrastructure_tasks
53
+ test_ai_handle_multiple_requests_in_one_prompt
54
+ test_ai_never_uses_normal_priority
55
+ test_ai_sets_medium_priority_by_default
56
+ test_ai_create_default_notebook_for_task
57
+ test_ai_default_notebook_remains_when_adding_new_notebook
58
+ test_ai_handles_both_normal_and_medium_terms
59
+ test_ai_explicit_default_notebook_commands
@@ -0,0 +1,55 @@
1
+ {
2
+ "notebooks": [
3
+ {
4
+ "name": "test_notebook",
5
+ "created_at": "2025-03-31 13:42:30 UTC",
6
+ "updated_at": "2025-03-31 13:42:30 UTC",
7
+ "tasks": [
8
+ {
9
+ "id": 21975,
10
+ "title": "Complete project documentation",
11
+ "description": "Write comprehensive documentation for the Ruby Todo project",
12
+ "status": "todo",
13
+ "priority": "high",
14
+ "tags": "documentation,writing",
15
+ "due_date": "2025-04-07T13:42:30Z",
16
+ "created_at": "2025-03-31T13:42:30Z",
17
+ "updated_at": "2025-03-31T13:42:30Z"
18
+ },
19
+ {
20
+ "id": 21977,
21
+ "title": "Migrate CI to GitHub Actions",
22
+ "description": "Move all CI/CD pipelines to GitHub Actions",
23
+ "status": "todo",
24
+ "priority": "high",
25
+ "tags": "github,migration,ci",
26
+ "due_date": "2025-04-03T13:42:30Z",
27
+ "created_at": "2025-03-31T13:42:30Z",
28
+ "updated_at": "2025-03-31T13:42:30Z"
29
+ },
30
+ {
31
+ "id": 21978,
32
+ "title": "Update GitHub repository settings",
33
+ "description": "Configure branch protection and access controls",
34
+ "status": "todo",
35
+ "priority": "medium",
36
+ "tags": "github,security",
37
+ "due_date": "2025-04-04T13:42:30Z",
38
+ "created_at": "2025-03-31T13:42:30Z",
39
+ "updated_at": "2025-03-31T13:42:30Z"
40
+ },
41
+ {
42
+ "id": 21979,
43
+ "title": "Migrate test suite to RSpec",
44
+ "description": "Convert all tests to RSpec format",
45
+ "status": "todo",
46
+ "priority": "medium",
47
+ "tags": "testing,migration",
48
+ "due_date": "2025-04-05T13:42:30Z",
49
+ "created_at": "2025-03-31T13:42:30Z",
50
+ "updated_at": "2025-03-31T13:42:30Z"
51
+ }
52
+ ]
53
+ }
54
+ ]
55
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_todo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremiah Parrack
@@ -210,10 +210,12 @@ files:
210
210
  - README.md
211
211
  - Rakefile
212
212
  - ai_assistant_implementation.md
213
+ - archived_tasks_export_20250331.json
213
214
  - db/migrate/20240328_add_is_default_to_notebooks.rb
214
215
  - delete_notebooks.rb
215
216
  - exe/ruby_todo
216
217
  - implementation_steps.md
218
+ - in_progress_tasks_export_20250331.json
217
219
  - lib/ruby_todo.rb
218
220
  - lib/ruby_todo/ai_assistant/command_processor.rb
219
221
  - lib/ruby_todo/ai_assistant/configuration_management.rb
@@ -222,6 +224,7 @@ files:
222
224
  - lib/ruby_todo/ai_assistant/prompt_builder.rb
223
225
  - lib/ruby_todo/ai_assistant/task_creation.rb
224
226
  - lib/ruby_todo/ai_assistant/task_creator.rb
227
+ - lib/ruby_todo/ai_assistant/task_response_processor.rb
225
228
  - lib/ruby_todo/cli.rb
226
229
  - lib/ruby_todo/commands/ai_assistant.rb
227
230
  - lib/ruby_todo/commands/ai_commands.rb
@@ -236,9 +239,13 @@ files:
236
239
  - lib/ruby_todo/models/task.rb
237
240
  - lib/ruby_todo/models/template.rb
238
241
  - lib/ruby_todo/version.rb
242
+ - pr_template.md
239
243
  - progress_ai_test.md
240
244
  - protectors_tasks.json
241
245
  - sig/ruby_todo.rbs
246
+ - sorted_tests.txt
247
+ - test_methods.txt
248
+ - todo_tasks_export_20250331.json
242
249
  homepage: https://github.com/jeremiahlukus/ruby_todo
243
250
  licenses:
244
251
  - MIT