timet 1.0.0 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f05df826f56c4161b878136fed6db433c86f717d1853dadc5b0255f98c5197e
4
- data.tar.gz: 44699896bbfcc7b49409f4cb2bece028b4719ef9b1e97f7d83221ea1073e863f
3
+ metadata.gz: 2cf486dcc89da9e06f1a77b36d3183a1f8c55a11ce51e79a761cbb84280af9ba
4
+ data.tar.gz: fe4cbc8baf03c019cfbb8b31514a9e5fd99ba1320c8cf27945dacf6fd1033784
5
5
  SHA512:
6
- metadata.gz: 4af0f240762026b43a3e4c9f3833d81e51729c0ea6916537be9a9893e40d602e7f7fab49d2d552a6ee736f3efd3e8c7ea6f8ad2ff01f2306c97a0e6568b354ef
7
- data.tar.gz: d368ea5f22cabd607a30056cbca07b4bc80501775a1bea9094d7c842a8277f3d2656fe334a6a038b2671475b9278c00ea7eb9adec15190e1f35e5f1dec44f142
6
+ metadata.gz: 0d2ddea11803e4d0225858ed1edb2b3143ad7579959f057a9025ff9db82acccaf3de1aed4018f99c856ed97c896d3d775a2d14224251e9d325b9aceef223db11
7
+ data.tar.gz: d6b6b852de2aea0966aa0e108ee73a64c30bbdb88217ad8806ab66ce732de32641f71692c3eaf4fd1fc9421c4722d6300ae86ce8051f5c3ec9d34f6d4631ad96
data/CHANGELOG.md CHANGED
@@ -1,13 +1,40 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.0.0] - 2024-10-07
4
+
5
+ **Improvements:**
6
+
7
+ - Added a `pomodoro` option to the `start` command to specify Pomodoro time in minutes.
8
+ - Updated the `start` method to accept an optional `pomodoro` parameter and call `play_sound_and_notify` if Pomodoro time is provided.
9
+ - Improved the `stop` method to accept an optional `display` parameter and conditionally call `summary`.
10
+ - Added `play_sound_and_notify` method to `application_helper.rb` for playing a sound and sending a notification after a specified time.
11
+ - Updated RSpec tests to reflect the new `pomodoro` parameter and `display` parameter in the `start` and `stop` methods, respectively.
12
+ - Converted Pomodoro time from minutes to seconds before passing it to `play_sound_and_notify`.
13
+
14
+ ### Bug fixes:
15
+
16
+ - Ensured Pomodoro time is a positive integer before invoking `play_sound_and_notify`.
17
+
18
+ #### Tasks:
19
+
20
+ - Update README.md to document the new Pomodoro feature.
21
+
22
+ ### Additional Considerations:
23
+
24
+ - The `pomodoro` option is designed to be flexible, allowing users to specify any duration in minutes for their Pomodoro sessions. This flexibility caters to users who may prefer different interval lengths based on their work habits and preferences.
25
+ - The `play_sound_and_notify` method is a new addition to the `application_helper.rb` file, providing a mechanism for notifying users when their Pomodoro session ends. This feature includes both a sound notification and a system notification to ensure users are aware of the end of their work interval.
26
+ - The `stop` method has been improved to accept an optional `display` parameter, which allows users to conditionally call the `summary` method. This enhancement provides more control over when the summary of the time tracking session is displayed.
27
+ - The RSpec tests have been updated to reflect the new parameters and functionality introduced in this pull request, ensuring that the code remains robust and reliable.
28
+
3
29
  ## [0.9.2] - 2024-10-06
4
30
 
5
31
  **Improvements:**
32
+
6
33
  - Improved the description of the 'start' command to clarify the usage of optional notes.
7
34
 
8
35
  **Bug fixes:**
9
- - Modified the 'display_item' method to handle cases where 'updated_item' is nil, ensuring that the original 'item' is displayed instead.
10
36
 
37
+ - Modified the 'display_item' method to handle cases where 'updated_item' is nil, ensuring that the original 'item' is displayed instead.
11
38
 
12
39
  ## [0.9.1] - 2024-10-04
13
40
 
data/README.md CHANGED
@@ -39,14 +39,20 @@ gem install timet
39
39
 
40
40
  ## Usage
41
41
 
42
- - timet start [tag] --notes="" --pomodoro=[minutes]**: Starts tracking time for a task labeled with the provided [tag], notes and "pomodoro time" in minutes (optional). Example:
42
+ ### Command Aliases
43
+
44
+ - `timet`: The primary command for interacting with the Timet application.
45
+ - `tt`: An alias for the `timet` command, providing a shorter alternative.
46
+
47
+ ---
48
+ - **timet start [tag] --notes="" --pomodoro=[minutes]**: Starts tracking time for a task labeled with the provided [tag], notes and "pomodoro time" in minutes (optional). Example:
43
49
 
44
50
  ```bash
45
51
  timet start task1 --notes="Meeting with client" --pomodoro=25
46
52
 
47
53
  or
48
54
 
49
- timet start task1 "Meeting with client" 25
55
+ tt start task1 "Meeting with client" 25
50
56
  ```
51
57
 
52
58
  ```
@@ -110,7 +116,7 @@ gem install timet
110
116
  - **Interactive Mode:**
111
117
 
112
118
  ```bash
113
- timet e 1
119
+ timet edit 1
114
120
  ```
115
121
 
116
122
  ```
data/bin/tt ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative '../lib/timet'
5
+
6
+ Timet::Application.start(ARGV)
@@ -245,6 +245,18 @@ module Timet
245
245
  true
246
246
  end
247
247
 
248
+ # Displays the current version of the Timet gem.
249
+ #
250
+ # @example
251
+ # $ timet version
252
+ # 1.0.0
253
+ #
254
+ # @return [void] This method does not return a value; it prints the version to the standard output.
255
+ desc 'version', 'version'
256
+ def version
257
+ puts Timet::VERSION
258
+ end
259
+
248
260
  private
249
261
 
250
262
  # Deletes a tracking item from the database by its ID and prints a confirmation message.
data/lib/timet/version.rb CHANGED
@@ -6,6 +6,6 @@ module Timet
6
6
  # @return [String] The version number in the format 'major.minor.patch'.
7
7
  #
8
8
  # @example Get the version of the Timet application
9
- # Timet::VERSION # => '1.0.0'
10
- VERSION = '1.0.0'
9
+ # Timet::VERSION # => '1.1.0'
10
+ VERSION = '1.1.0'
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Vielma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-07 00:00:00.000000000 Z
11
+ date: 2024-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -63,6 +63,7 @@ email:
63
63
  - frankvielma@gmail.com
64
64
  executables:
65
65
  - timet
66
+ - tt
66
67
  extensions: []
67
68
  extra_rdoc_files: []
68
69
  files:
@@ -75,6 +76,7 @@ files:
75
76
  - README.md
76
77
  - Rakefile
77
78
  - bin/timet
79
+ - bin/tt
78
80
  - btc.png
79
81
  - lib/timet.rb
80
82
  - lib/timet/application.rb