timet 0.8.1 → 0.8.2
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 +11 -0
- data/README.md +23 -1
- data/lib/timet/application.rb +8 -4
- data/lib/timet/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: 5eda40ea4aafce60dc6fef1270ca9d013724c45b29ba43e7974b8212f55ac231
|
4
|
+
data.tar.gz: b5a45e366bbfdb073ccf32ad545b572faac79f018c3a6f8eac60622aed96b02b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d0cc2dfa64d2af724b2be8543d67f63f5485c4fe81746a29cea29db9b51d1ba5fcf4df98f7cdadb16961f30cd24dff0e65bef93c6f297fe9b61bc9a07b0e15e
|
7
|
+
data.tar.gz: fdd6364f4dad16defed0c484eb29adf27479427387be6cd43587bcdbfb628eea2a99a0712c708a5821e50e1064c476b2481cd2efc49cb302d533b0d632c3f08a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.8.2] - 2024-10-02
|
4
|
+
|
5
|
+
**Improvements:**
|
6
|
+
- Added optional field and new_value parameters to the edit command.
|
7
|
+
- Updated the edit method logic to prompt for field and new_value if they are not provided.
|
8
|
+
- Enhanced test coverage to include scenarios where field and new_value are provided directly and when they are not.
|
9
|
+
- Updated the README to reflect the new features of the edit command, including both interactive and direct specification modes.
|
10
|
+
|
11
|
+
**Additional Considerations:**
|
12
|
+
- The changes ensure that the edit command is more versatile and user-friendly, catering to both interactive users and those who prefer scripting or automation.
|
13
|
+
|
3
14
|
## [0.8.1] - 2024-10-02
|
4
15
|
**Bug fixes:**
|
5
16
|
- Fixed a LoadError caused by the byebug gem being required after its removal.
|
data/README.md
CHANGED
@@ -91,7 +91,9 @@ gem install timet
|
|
91
91
|
```
|
92
92
|
|
93
93
|
|
94
|
-
- **timet edit**: It allows users update a task's notes, tag, start or end fields.
|
94
|
+
- **timet edit**: It allows users to update a task's notes, tag, start, or end fields. Users can either interactively select the field and provide a new value or specify them directly in the command.
|
95
|
+
|
96
|
+
- **Interactive Mode:**
|
95
97
|
```bash
|
96
98
|
timet e 1
|
97
99
|
```
|
@@ -113,6 +115,26 @@ gem install timet
|
|
113
115
|
End
|
114
116
|
```
|
115
117
|
|
118
|
+
|
119
|
+
- **Direct Specification Mode:**
|
120
|
+
```bash
|
121
|
+
timet e 1 notes "New Meeting Notes"
|
122
|
+
```
|
123
|
+
|
124
|
+
```
|
125
|
+
Tracked time report [today]:
|
126
|
+
+-------+------------+--------+----------+----------+----------+--------------------------+
|
127
|
+
| Id | Date | Tag | Start | End | Duration | Notes |
|
128
|
+
+-------+------------+--------+----------+----------+----------+--------------------------+
|
129
|
+
| 2 | 2024-08-09 | task1 | 16:15:07 | - | 00:00:00 | Meeting with client |
|
130
|
+
| 1 | | task1 | 14:55:07 | 15:55:07 | 01:00:00 | New Meeting Note |
|
131
|
+
+-------+------------+--------+----------+----------+----------+--------------------------+
|
132
|
+
| Total: | 01:00:00 | |
|
133
|
+
+-------+------------+--------+----------+----------+----------+--------------------------+
|
134
|
+
```
|
135
|
+
|
136
|
+
|
137
|
+
|
116
138
|
## Command Reference
|
117
139
|
|
118
140
|
| Command | Description | Example Usage |
|
data/lib/timet/application.rb
CHANGED
@@ -87,14 +87,18 @@ module Timet
|
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
-
desc 'edit (e) [id]
|
91
|
-
|
90
|
+
desc 'edit (e) [id] [field] [value]',
|
91
|
+
'edit a task, [field] (notes, tag, start or end) and [value] are optional parameters'
|
92
|
+
def edit(id, field = nil, new_value = nil)
|
92
93
|
item = @db.find_item(id)
|
93
94
|
return puts "No tracked time found for id: #{id}" unless item
|
94
95
|
|
95
96
|
display_item(item)
|
96
|
-
field
|
97
|
-
|
97
|
+
unless FIELD_INDEX.keys.include?(field&.downcase) || new_value
|
98
|
+
field = select_field_to_edit
|
99
|
+
new_value = prompt_for_new_value(item, field)
|
100
|
+
end
|
101
|
+
|
98
102
|
validate_and_update(item, field, new_value)
|
99
103
|
|
100
104
|
summary.display
|
data/lib/timet/version.rb
CHANGED