comrade 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/bin/comrade CHANGED
@@ -40,7 +40,7 @@ app :line do
40
40
  @timer = Comrade::Timer.new @options_hash[:timer]
41
41
  elsif @timer.finished?
42
42
  Notifier.notify :title => 'comrade', :message => ARGV.join(' ')
43
- echo 'Stopped @ ' << Time.now.to_s
43
+ puts 'Stopped @ ' << Time.now.to_s
44
44
  Process.kill('INT', $$)
45
45
  end
46
46
 
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module Comrade
4
- VERSION = '0.0.4' unless constants.include? 'VERSION'
4
+ VERSION = '0.0.5' unless constants.include? 'VERSION'
5
5
  end
@@ -37,9 +37,20 @@ grammar Period
37
37
  )
38
38
  /
39
39
  (
40
- timestamp
40
+ hour:[\d]1..2
41
+ (':')?
42
+ minute:[\d]2..2
43
+ (':' second:[\d]2..2)?
44
+ ([\s]* 'am' / 'pm')?
41
45
  {
42
46
  def timestamp?; true end
47
+ def date_hash
48
+ {
49
+ :hour => hour.text_value.to_f,
50
+ :minute => minute.text_value.to_f,
51
+ :second => second.text_value.to_f
52
+ }
53
+ end
43
54
  }
44
55
  )
45
56
  end
@@ -52,12 +63,6 @@ grammar Period
52
63
  second / minute / hour
53
64
  end
54
65
 
55
- rule timestamp
56
- hour:[\d]1..2 ':' minute:[\d]2..2
57
- (':' second:[\d]2..2)?
58
- ([\s]* 'am' / 'pm')?
59
- end
60
-
61
66
  rule word_end
62
67
  !(!' ' .)
63
68
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comrade
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Renan Mendes Carvalho
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-29 00:00:00 Z
18
+ date: 2011-09-26 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: treetop