ttrack 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/ttrack +8 -3
- data/lib/ttrack/datastore.rb +1 -1
- metadata +3 -3
data/bin/ttrack
CHANGED
@@ -54,21 +54,26 @@ case ARGV[0]
|
|
54
54
|
report.each do |line|
|
55
55
|
lenghts.keys.each do |i|
|
56
56
|
if i == :elapsed
|
57
|
-
lenghts[i] = line[i].to_i.to_s.length if line[i].to_s.length >= lenghts[i]
|
57
|
+
lenghts[i] = line[i].to_i.to_s.length if line[i].to_i.to_s.length >= lenghts[i]
|
58
|
+
puts lenghts[i]
|
58
59
|
else
|
59
60
|
lenghts[i] = line[i].to_s.length if line[i].to_s.length >= lenghts[i]
|
60
61
|
end
|
61
62
|
end
|
62
63
|
end
|
64
|
+
|
65
|
+
# Fix Name column width if report name is given
|
66
|
+
lenghts[:name] = ARGV[1].nil? ? lenghts[:name] : ARGV[1].length
|
67
|
+
|
63
68
|
puts "%#{lenghts[:task]}s | %-#{lenghts[:name]}s | %s | %s | %-#{lenghts[:elapsed]}s | %s" %
|
64
69
|
["Task", "Name", "Start ", "Stop ", "Elapsed", "Notes"]
|
65
70
|
report.each do |line|
|
66
71
|
puts "%#{lenghts[:task]}s | %-#{lenghts[:name]}s | %s | %s | %-#{lenghts[:elapsed]}d | %s" %
|
67
72
|
[
|
68
73
|
line[:task],
|
69
|
-
line[:name],
|
74
|
+
line[:name].nil? ? ARGV[1] : line[:name],
|
70
75
|
line[:tstart],
|
71
|
-
line[:tstop],
|
76
|
+
line[:tstop].nil? ? ' < running > ' : line[:tstop],
|
72
77
|
line[:elapsed],
|
73
78
|
line[:notes]
|
74
79
|
]
|
data/lib/ttrack/datastore.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ttrack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-10-28 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sqlite3
|
16
|
-
requirement: &
|
16
|
+
requirement: &70165438869700 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 1.3.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70165438869700
|
25
25
|
description: A simple CLI time tracker
|
26
26
|
email: alexander.fortin@gmail.com
|
27
27
|
executables:
|