baby-bro 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/baby-bro.gemspec +2 -2
- data/lib/baby-bro/reporter.rb +3 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.15
|
data/baby-bro.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{baby-bro}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.15"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bill Doughty"]
|
12
|
-
s.date = %q{2011-05-
|
12
|
+
s.date = %q{2011-05-18}
|
13
13
|
s.default_executable = %q{bro}
|
14
14
|
s.description = %q{Baby Bro monitors timestamp changes of files and and estimates time spent actively working in project directories.}
|
15
15
|
s.email = %q{billdoughty@capitalthought.com}
|
data/lib/baby-bro/reporter.rb
CHANGED
@@ -54,6 +54,7 @@ module BabyBro
|
|
54
54
|
cumulative_time = 0
|
55
55
|
if sessions.any?
|
56
56
|
sessions_by_date = sessions.group_by(&:start_date)
|
57
|
+
has_sessions_for_date = false
|
57
58
|
sessions_by_date.keys.sort.each do |date|
|
58
59
|
next if report_date && date != report_date
|
59
60
|
sessions = sessions_by_date[date].sort
|
@@ -62,10 +63,11 @@ module BabyBro
|
|
62
63
|
$stdout.puts " #{session.start_time.strftime("%I:%M %p")} - #{session.duration_in_english}" unless @config.brief
|
63
64
|
cumulative_time += session.duration
|
64
65
|
end
|
66
|
+
has_sessions_for_date = true
|
65
67
|
$stdout.print " Total:" unless @config.brief && report_date
|
66
68
|
$stdout.print " #{Session.duration_in_english(sessions.inject(0){|sum,n| sum = sum+n.duration})}"
|
67
69
|
end
|
68
|
-
$stdout.puts
|
70
|
+
$stdout.puts has_sessions_for_date ? "" : " no activity"
|
69
71
|
$stdout.puts "Grand Total: #{Session.duration_in_english(cumulative_time)}" unless @config.brief
|
70
72
|
else
|
71
73
|
$stdout.puts " No sessions for this project."
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: baby-bro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 15
|
10
|
+
version: 0.0.15
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bill Doughty
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-05-
|
18
|
+
date: 2011-05-18 00:00:00 -05:00
|
19
19
|
default_executable: bro
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|