rooster 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,17 +2,19 @@
2
2
 
3
3
  An egg timer.
4
4
 
5
- ## Installation
5
+ After a specified number of minutes have passed, you will be notified in various ways.
6
6
 
7
- Add this line to your application's Gemfile:
7
+ On Mac OS X:
8
8
 
9
- gem 'rooster'
9
+ - The text will be spoken via the `say` command.
10
+ - On OS X 10.8 and greater, a notification will be displayed in the notification center (via [terminal-notifier](https://github.com/alloy/terminal-notifier)).
10
11
 
11
- And then execute:
12
+ On Mac OS X and everywhere else:
12
13
 
13
- $ bundle
14
+ - The system beep will play (`tput bel`)
15
+ - The text you specified will be displayed in the terminal.
14
16
 
15
- Or install it yourself as:
17
+ ## Installation
16
18
 
17
19
  $ gem install rooster
18
20
 
data/bin/rooster CHANGED
@@ -6,9 +6,11 @@ def usage
6
6
  abort "Usage: rooster <minutes> <text>"
7
7
  end
8
8
 
9
- if ARGV[0].nil? || ARGV[1].nil? || ARGV[0].to_i < 1 || %w{--help help -h}.include?(ARGV[0])
9
+ if ARGV.length < 2 || ARGV[0].to_i < 1 || %w{--help help -h}.include?(ARGV[0])
10
10
  usage
11
11
  else
12
- Rooster::EggTimer.new ARGV[0], ARGV[1]
12
+ minutes = ARGV.shift
13
+ text = ARGV.join(" ")
14
+ Rooster::EggTimer.new minutes, text
13
15
  end
14
16
 
data/lib/rooster.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'colorize'
1
2
  require 'terminal-notifier'
2
3
  require "rooster/version"
3
4
  require "rooster/egg_timer"
@@ -23,7 +23,7 @@ module Rooster
23
23
 
24
24
  def run
25
25
  while @minutes > 0
26
- puts "#{@minutes} minute remaining until \"#{@text}\""
26
+ puts "=> #{@minutes} minute remaining until \"#{@text}\"."
27
27
  sleep ONE_MINUTE
28
28
  @minutes -= 1
29
29
  end
@@ -52,8 +52,8 @@ module Rooster
52
52
  end
53
53
 
54
54
  def display_it
55
- puts "\nTime's up."
56
- puts "\"#{@text}\""
55
+ puts "\nTime's up.".green
56
+ puts "\"#{@text}\"".green
57
57
  end
58
58
 
59
59
  end
@@ -1,3 +1,3 @@
1
1
  module Rooster
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/rooster.gemspec CHANGED
@@ -22,5 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake"
23
23
 
24
24
  spec.add_runtime_dependency "terminal-notifier", "~> 1.5.1"
25
+ spec.add_runtime_dependency "colorize", "~> 0.6.0"
25
26
 
26
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rooster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-24 00:00:00.000000000 Z
12
+ date: 2013-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -59,6 +59,22 @@ dependencies:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.5.1
62
+ - !ruby/object:Gem::Dependency
63
+ name: colorize
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 0.6.0
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 0.6.0
62
78
  description: Remind yourself to do something or other in a specified number of minutes.
63
79
  email:
64
80
  - charles.stuart@gmail.com