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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 013024f6791922faa5e6d5d711bd5fc16f4f960e
4
- data.tar.gz: 2662ab02bc3dab333214f7d46df036e4ba61e643
3
+ metadata.gz: d05ce26ba370a2e7207c084808061e4a4c209928
4
+ data.tar.gz: 88d1aa3e5bb952f2f50410e737cf1dc66c3a4999
5
5
  SHA512:
6
- metadata.gz: 8c83c90ebca1fc42d80238bc627cf2ef77f683cf569b39ec52f6f4ddf1a474688f51875dc3436d89c19ed655da0730b1461290e7c5dd6cf35f6f5bc80577cc19
7
- data.tar.gz: f6ebbbd2d0092ed4e2d844f54323a6d3074955f4d97c67d1b94476668d2d0a8eee76aee4f55430eb6cae1f8c9ba711e975d60eef105bfa6d47c8f56d04da853c
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 the time block.
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
- time_block --help
13
+ timeblock <time in sec>
14
14
 
15
15
  ## Contributing
16
16
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module TimeBlock
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
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.1
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-04-09 00:00:00.000000000 Z
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