Skip to content

Commit 7012f95

Browse files
committed
Bump version to 0.1.5 – Automatic route generation, improved request specs, and bug fixes
1 parent b41ec89 commit 7012f95

File tree

4 files changed

+28
-22
lines changed

4 files changed

+28
-22
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
### 0.1.5 - 2025-02-16
2+
3+
- Automatic route generation for any model that includes `acts_as_taskable`, eliminating the need for manual route configuration.
4+
- Updated README to document automatic route generation and mounting instructions.
5+
- Updated `set_taskable` method to dynamically extract `taskable_type` from routes instead of requiring it in query parameters.
6+
- Updated task `description` to be non mandatory
7+
18
### 0.1.1 - 2025-02-14
29

310
- Add CHANGELOG.md
411
- Move Engine code to lib/todoro/engine
512

613
### 0.1.0 - 2025-02-14
714

15+
- Introduced `acts_as_taskable` support for models.
816
- Associate any model with tasklists
917
- Tasklists can contain multiple tasks
1018
- Tasks with an expiry date have reminders set automatically one day and one hour before they expire

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
todoro (0.1.4)
4+
todoro (0.1.5)
55
rails (~> 7.2.1)
66

77
GEM

README.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
To enhance the **Todoro** gem's documentation, here's an updated version of the `README.md` file that includes instructions on mounting the engine and customizing the mount path:
2-
31
# Todoro
42

53
A lightweight Rails engine that lets any model manage task lists and tasks with a simple, flexible API.
@@ -53,35 +51,35 @@ task = project.add_task_to_list(task_list, "Build homepage", "Implement UI compo
5351
puts project.tasks # Lists all tasks in all its task lists
5452
```
5553

54+
## Automatic Route Generation
55+
56+
Todoro automatically generates routes for any model that includes `acts_as_taskable`. For example, if `Project` includes `acts_as_taskable`, the following routes are created:
57+
58+
```sh
59+
GET /projects/:project_id/task_lists(.:format)
60+
POST /projects/:project_id/task_lists(.:format)
61+
GET /projects/:project_id/task_lists/:id(.:format)
62+
PATCH /projects/:project_id/task_lists/:id(.:format)
63+
DELETE /projects/:project_id/task_lists/:id(.:format)
64+
GET /projects/:project_id/task_lists/:task_list_id/tasks(.:format)
65+
POST /projects/:project_id/task_lists/:task_list_id/tasks(.:format)
66+
```
67+
68+
These routes are automatically configured, so no additional setup is needed.
69+
5670
## Mounting the Engine
5771

5872
To access Todoro's routes, mount the engine in your application's routes file:
5973

6074
```ruby
6175
# config/routes.rb
6276
Rails.application.routes.draw do
63-
mount Todoro::Engine, at: '/todoro'
77+
mount Todoro::Engine, at: "/"
6478
# Other routes...
6579
end
6680
```
6781

68-
This makes Todoro's features accessible under the `/todoro` path (e.g., `http://yourdomain.com/todoro`).
69-
70-
### Customizing the Mount Path
71-
72-
You can mount Todoro at any path that fits your application's structure:
73-
74-
- To mount at the root:
75-
76-
```ruby
77-
Rails.application.routes.draw do
78-
mount Todoro::Engine, at: '/'
79-
# Other routes...
80-
end
81-
```
82-
83-
Now, Todoro's routes are available at the root URL (e.g., `http://yourdomain.com/`).
84-
82+
Since Todoro dynamically registers routes for `acts_as_taskable` models, no further route configuration is required.
8583

8684
## License
8785

lib/todoro/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Todoro
2-
VERSION = "0.1.4"
2+
VERSION = "0.1.5"
33
end

0 commit comments

Comments
 (0)