time_block 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/time_block/cli.rb +6 -0
- data/lib/time_block/version.rb +1 -1
- data/time_block.gemspec +2 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d05ce26ba370a2e7207c084808061e4a4c209928
|
4
|
+
data.tar.gz: 88d1aa3e5bb952f2f50410e737cf1dc66c3a4999
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 883435be2a41958287e5cf95a4eace2a57097ed2f04f6f2b655b26c0fa8c736141d4b64d239d9ae8b984c9df1ca0e1d65df0e3d7adf74a17e13e5bb99b6c7bb6
|
7
|
+
data.tar.gz: 040f7bee59daa0b6a80602f50d43da1ae5bcb67f9ec2f405eabd0d1b046b5bd1bcda6f766aa15bf0880d94b7ba3038897215e38b22bc58d718ad8720a563ba82
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# TimeBlock
|
2
2
|
|
3
|
-
To notify the end of
|
3
|
+
To notify the end of a time block.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -10,7 +10,7 @@ To notify the end of the time block.
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
|
13
|
+
timeblock <time in sec>
|
14
14
|
|
15
15
|
## Contributing
|
16
16
|
|
data/lib/time_block/cli.rb
CHANGED
@@ -2,6 +2,7 @@ require 'time_block'
|
|
2
2
|
|
3
3
|
class TimeBlock::CLI
|
4
4
|
def self.start(*args)
|
5
|
+
fail 'No terminal-notifier, please install it, brew install terminal-notifier' unless terminal_notifier_exist?
|
5
6
|
time = args.shift.strip.to_i
|
6
7
|
sleep time
|
7
8
|
`terminal-notifier -message #{"Time is out dude !!!".dump} -title "TimeBlock - #{time}s" -sound "default"`
|
@@ -9,4 +10,9 @@ class TimeBlock::CLI
|
|
9
10
|
puts e.message
|
10
11
|
exit(1)
|
11
12
|
end
|
13
|
+
|
14
|
+
def self.terminal_notifier_exist?
|
15
|
+
`which terminal-notifier`
|
16
|
+
$? == 0
|
17
|
+
end
|
12
18
|
end
|
data/lib/time_block/version.rb
CHANGED
data/time_block.gemspec
CHANGED
@@ -12,6 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = %q{Notifier to notify you when your time block is ended}
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
|
+
spec.executables = "timeblock"
|
15
16
|
|
16
17
|
spec.files = `git ls-files -z`.split("\x0")
|
17
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -20,4 +21,5 @@ Gem::Specification.new do |spec|
|
|
20
21
|
|
21
22
|
spec.add_development_dependency "bundler", "~> 1.6"
|
22
23
|
spec.add_development_dependency "rake"
|
24
|
+
spec.add_runtime_dependency "terminal-notifier"
|
23
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time_block
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Faizal Zakaria
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: terminal-notifier
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: Notifier to notify you when your time block is ended
|
42
56
|
email:
|
43
57
|
- phaibusiness@gmail.com
|