clockout 0.5.1 → 0.5.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/clock +11 -3
- metadata +19 -12
- checksums.yaml +0 -7
data/bin/clock
CHANGED
@@ -14,12 +14,15 @@ Options:
|
|
14
14
|
--help, -h: Show this message
|
15
15
|
|
16
16
|
Generators:
|
17
|
-
$ clock generate config
|
18
|
-
$ clock generate hook
|
17
|
+
$ clock generate config Generate config file (clock.yml)
|
18
|
+
$ clock generate hook Generate a post-commit hook for clockout!
|
19
19
|
|
20
20
|
Other:
|
21
21
|
$ clock in Clock-in (when you start working, preceding a commit)
|
22
22
|
$ clock out Clock-out (after you've worked overtime following a commit)
|
23
|
+
|
24
|
+
(Both of these accept an optional argument that offsets the clock time, in minutes)
|
25
|
+
|
23
26
|
EOS
|
24
27
|
|
25
28
|
TEMPLATE_CLOCKFILE = <<-EOF
|
@@ -141,14 +144,19 @@ end
|
|
141
144
|
path = Dir.pwd
|
142
145
|
|
143
146
|
if (ARGV[0] == "in" || ARGV[0] == "out")
|
147
|
+
offset = ARGV[1] #optional offset (in minutes) for in/out
|
148
|
+
|
144
149
|
# Generate a clock file if one doesn't already exist
|
145
150
|
generate_clock_file(path)
|
146
151
|
|
152
|
+
now = Time.now
|
153
|
+
now += offset.to_i*60 if offset
|
154
|
+
|
147
155
|
# Add the in/out date to the file
|
148
156
|
buf = ""
|
149
157
|
mod = false
|
150
158
|
seek_line = ARGV[0] + ":"
|
151
|
-
time_line = '- ' +
|
159
|
+
time_line = '- ' + now.to_s + ': ' + current_git_user + "\n"
|
152
160
|
File.foreach(clock_path) do |line|
|
153
161
|
buf += line
|
154
162
|
if line.strip == seek_line
|
metadata
CHANGED
@@ -1,41 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clockout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Dan Hassin
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-18 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: grit
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- - '>='
|
19
|
+
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '0'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- - '>='
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rspec
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- - '>='
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '0'
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- - '>='
|
43
|
+
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '0'
|
41
46
|
description: Sort of an extension to Git to support clocking hours worked on a project.
|
@@ -49,28 +54,30 @@ files:
|
|
49
54
|
- lib/record.rb
|
50
55
|
- lib/clockout.rb
|
51
56
|
- lib/printer.rb
|
52
|
-
-
|
57
|
+
- !binary |-
|
58
|
+
YmluL2Nsb2Nr
|
53
59
|
homepage: http://rubygems.org/gems/clockout
|
54
60
|
licenses: []
|
55
|
-
metadata: {}
|
56
61
|
post_install_message:
|
57
62
|
rdoc_options: []
|
58
63
|
require_paths:
|
59
64
|
- lib
|
60
65
|
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
61
67
|
requirements:
|
62
|
-
- - '>='
|
68
|
+
- - ! '>='
|
63
69
|
- !ruby/object:Gem::Version
|
64
70
|
version: '0'
|
65
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
66
73
|
requirements:
|
67
|
-
- - '>='
|
74
|
+
- - ! '>='
|
68
75
|
- !ruby/object:Gem::Version
|
69
76
|
version: '0'
|
70
77
|
requirements: []
|
71
78
|
rubyforge_project:
|
72
|
-
rubygems_version:
|
79
|
+
rubygems_version: 1.8.24
|
73
80
|
signing_key:
|
74
|
-
specification_version:
|
81
|
+
specification_version: 3
|
75
82
|
summary: Clock your hours worked using Git
|
76
83
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 7699cc7de9299eb18655d2f48767232a773519f3
|
4
|
-
data.tar.gz: 33ae0150ea39fbf0df5057f2ecb82582619fb3a7
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: f74da6e936aae0e648d6821be438b3aa0f4738dd6c9419e3e320ffaee8a34e90d0f7e8bbf384a0c3301b4cbdeef6f1ba9fc660d693e6153a32f6d81a6578ca57
|
7
|
-
data.tar.gz: 5bc55a18b4f7211fd1f78b03eb329a075668eeaa2315f52856e53ec7a597f9633f4142b299bfb1dead4b5f2cc7197b5a149c326f9bbfd86ed8d02263063af902
|