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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a81c64695eb6f25b450846684210b59c5ae928fa8249d3a328343473660c9b0
4
- data.tar.gz: 30beca54359abc9127a0323f78af00ba92c51056e90155f5a1f3ed28e1407773
3
+ metadata.gz: 74fe2cd424727bf5c13f654e2a2e9fc3be3bc16005347cc0817f994837b4c186
4
+ data.tar.gz: a4bd57b4e66329649861715d8472b53e056540d6cff4b2d86ecf82f274eb92df
5
5
  SHA512:
6
- metadata.gz: c77ccd90d963ca51404e8b4a5e62d5665749395392f0325dfea227756ace1347d933fd1100d05e3281e9f593b2740e714b555bbec4e5e7c10752835f0af7e95a
7
- data.tar.gz: c35dc6b764b0c5ca75e8fc400c690b2329d2802126e001846cb5fd98282c63af9a46268cd3a8fe4ae3d636fe69a9cc07086ce92e509e852837b994396c3597c1
6
+ metadata.gz: d423af2dd5554ba24e7a0782263b08a6f2184889547db879cf522cbc3ab45af08ace885e2bcb1b4c121f3afb18fdff2078412b0b7d53a816059ebd5eddbc4196
7
+ data.tar.gz: 2abfbeeb0583e3cfe7e1570fb0700de3bd74aacc357187b79538592cc4e98688155c378cd4b24d22f23d4f97c6b222f0e774d3164b1feb6dfea125d87f5714e3
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Tomatos
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tomatos`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Write usage instructions here
26
-
27
- ## Development
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
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tomatos.
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: tomato.rb [options]"
17
+ parser.banner = "Usage: tomatos [options]"
22
18
 
23
- parser.on("-tTIME", "--time=TIME", "Time delta: `15m` means 15mins, `30s` means 30secs, default use mins ") do |v|
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|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tomatos
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
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 "#{@title}:"
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 click for mac terminal"
12
- spec.description = "Tomato click for mac terminal"
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.2.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 click for mac terminal
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 click for mac terminal
58
+ summary: Command line Tomato Clock for Mac OS terminal
59
59
  test_files: []