tomatos 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -13
- data/exe/tomatos +3 -7
- data/lib/tomatos/version.rb +1 -1
- data/lib/tomatos.rb +3 -4
- data/tomatos.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74fe2cd424727bf5c13f654e2a2e9fc3be3bc16005347cc0817f994837b4c186
|
4
|
+
data.tar.gz: a4bd57b4e66329649861715d8472b53e056540d6cff4b2d86ecf82f274eb92df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d423af2dd5554ba24e7a0782263b08a6f2184889547db879cf522cbc3ab45af08ace885e2bcb1b4c121f3afb18fdff2078412b0b7d53a816059ebd5eddbc4196
|
7
|
+
data.tar.gz: 2abfbeeb0583e3cfe7e1570fb0700de3bd74aacc357187b79538592cc4e98688155c378cd4b24d22f23d4f97c6b222f0e774d3164b1feb6dfea125d87f5714e3
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Tomatos
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Command line Tomato Clock for Mac OS terminal
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,17 +20,12 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
-
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
-
|
33
|
-
## Contributing
|
23
|
+
```
|
24
|
+
Usage: tomatos [options]
|
25
|
+
-t, --time=TIME Time delta: `15m` means 15 min, `30s` means 30 sec, default use 15min
|
26
|
+
-m, --message=MESSAGE Message for this time task
|
34
27
|
|
35
|
-
|
28
|
+
```
|
36
29
|
|
37
30
|
## License
|
38
31
|
|
data/exe/tomatos
CHANGED
@@ -8,19 +8,15 @@ require 'optparse'
|
|
8
8
|
stop_follow = lambda { puts 'See you later :D' }
|
9
9
|
trap("INT") {
|
10
10
|
stop_follow.call
|
11
|
-
exit
|
12
|
-
}
|
13
|
-
|
14
|
-
at_exit {
|
15
|
-
stop_follow.call
|
11
|
+
exit
|
16
12
|
}
|
17
13
|
|
18
14
|
|
19
15
|
options = {}
|
20
16
|
OptionParser.new do |parser|
|
21
|
-
parser.banner = "Usage:
|
17
|
+
parser.banner = "Usage: tomatos [options]"
|
22
18
|
|
23
|
-
parser.on("-tTIME", "--time=TIME", "Time delta: `15m` means
|
19
|
+
parser.on("-tTIME", "--time=TIME", "Time delta: `15m` means 15 min, `30s` means 30 sec, default use 15min ") do |v|
|
24
20
|
options[:time] = v
|
25
21
|
end
|
26
22
|
parser.on("-mMESSAGE", "--message=MESSAGE", "Message for this time task") do |v|
|
data/lib/tomatos/version.rb
CHANGED
data/lib/tomatos.rb
CHANGED
@@ -4,13 +4,12 @@ require_relative "tomatos/version"
|
|
4
4
|
|
5
5
|
module Tomatos
|
6
6
|
class Error < StandardError; end
|
7
|
-
# Your code goes here...
|
8
7
|
end
|
9
8
|
|
10
9
|
module Tomatos
|
11
10
|
class App
|
12
11
|
def initialize(options)
|
13
|
-
@title = 'Tomatos'
|
12
|
+
@title = 'Tomatos Clock'
|
14
13
|
@time_delta = options[:time] || '15m'
|
15
14
|
@time_value = 0
|
16
15
|
@unit = 'm'
|
@@ -60,9 +59,9 @@ module Tomatos
|
|
60
59
|
sleep(1)
|
61
60
|
system('clear')
|
62
61
|
count_down -= 1
|
63
|
-
puts
|
62
|
+
puts @title
|
64
63
|
puts "@time: #{self.count_down_text(count_down)}"
|
65
|
-
puts "@message: #{@message}"
|
64
|
+
puts "@message: #{@message}" if @message
|
66
65
|
end
|
67
66
|
sleep(total_secs)
|
68
67
|
self.notice("#{@time_value} #{unit_text} Finished", @title, @message)
|
data/tomatos.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Mark24"]
|
9
9
|
spec.email = ["mark.zhangyoung@qq.com"]
|
10
10
|
|
11
|
-
spec.summary = "Tomato
|
12
|
-
spec.description = "Tomato
|
11
|
+
spec.summary = "Command line Tomato Clock for Mac OS terminal"
|
12
|
+
spec.description = "Command line Tomato Clock for Mac OS terminal"
|
13
13
|
spec.homepage = "https://github.com/Mark24Code/tomatos"
|
14
14
|
spec.license = "MIT"
|
15
15
|
spec.required_ruby_version = ">= 2.6.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tomatos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark24
|
@@ -10,7 +10,7 @@ bindir: exe
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2022-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: Tomato
|
13
|
+
description: Command line Tomato Clock for Mac OS terminal
|
14
14
|
email:
|
15
15
|
- mark.zhangyoung@qq.com
|
16
16
|
executables:
|
@@ -55,5 +55,5 @@ requirements: []
|
|
55
55
|
rubygems_version: 3.3.3
|
56
56
|
signing_key:
|
57
57
|
specification_version: 4
|
58
|
-
summary: Tomato
|
58
|
+
summary: Command line Tomato Clock for Mac OS terminal
|
59
59
|
test_files: []
|