ttrack 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/ttrack +8 -1
- data/lib/ttrack/datastore.rb +1 -1
- data/lib/ttrack.rb +2 -2
- metadata +4 -4
data/bin/ttrack
CHANGED
@@ -9,7 +9,14 @@ databasename = "%s/%s" % [ENV['HOME'], ".timetrackerdb"]
|
|
9
9
|
tt = TTrack.new databasename
|
10
10
|
case ARGV[0]
|
11
11
|
when 'start' then
|
12
|
-
|
12
|
+
stop = tt.start(ARGV[1], ARGV[2])
|
13
|
+
if stop and not stop[1].nil?
|
14
|
+
puts 'Stop tracking issue "%s", run for %s' % [
|
15
|
+
stop[1][:name],
|
16
|
+
Time.at(stop[1][:elapsed]).utc.strftime("%H hours %M minutes %S seconds")
|
17
|
+
]
|
18
|
+
puts 'Start tracking issue "%s"' % ARGV[1]
|
19
|
+
elsif stop
|
13
20
|
puts 'Start tracking issue "%s"' % ARGV[1]
|
14
21
|
else
|
15
22
|
usage(tt)
|
data/lib/ttrack/datastore.rb
CHANGED
data/lib/ttrack.rb
CHANGED
@@ -15,9 +15,9 @@ class TTrack
|
|
15
15
|
# Return boolean to indicate if the action was succesfull or not
|
16
16
|
def start issuename, notes=''
|
17
17
|
unless issuename.nil? or issuename.empty?
|
18
|
-
|
18
|
+
stopresult = stop if @db.getcurrent
|
19
19
|
@db.startnew issuename, notes
|
20
|
-
true
|
20
|
+
[true, stopresult]
|
21
21
|
else
|
22
22
|
false
|
23
23
|
end
|
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.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-18 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sqlite3
|
16
|
-
requirement: &
|
16
|
+
requirement: &70193401746200 !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: *70193401746200
|
25
25
|
description: A simple CLI time tracker
|
26
26
|
email: alexander.fortin@gmail.com
|
27
27
|
executables:
|