gitwakatime 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/README.md +51 -25
- data/lib/gitwakatime/cli.rb +3 -3
- data/lib/gitwakatime/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1c9bcc647f411393c85c1a67bf26d883b8d6d31
|
4
|
+
data.tar.gz: cb344b96d438e4a9b102bfb6828f9bb183977599
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea8350ae2cbbe3e36bc1759a0031c4ff3d25c9e234e459cb54c39f071a93d9485a6751219b2542fe1e64f16e43a6cc3e82bce8bb5e930e1634d1f7f66c294d17
|
7
|
+
data.tar.gz: 988380175f02e9d7c91a0b4b925a4f0be432f6fc3923c1d38c2c989248941380af90ef1b5e478aab8497b00a6f4f5b0e8abedbba0ea37f9bd58133c761733153
|
data/README.md
CHANGED
@@ -4,8 +4,10 @@
|
|
4
4
|
[](http://badge.fury.io/rb/gitwakatime)
|
5
5
|
[](https://codeclimate.com/github/rposborne/gitwakatime)
|
6
6
|
|
7
|
-
GitWakaTime is a mash up between data obtained through "wakatime" and the data we all create using git.
|
8
|
-
The principal is to capture a baseline of activity for a task and answer the age old question "How much time did I spend on this?" or "What is the minimum amount I can charge for my time"
|
7
|
+
GitWakaTime is a mash up between data obtained through "(Wakatime)[https://wakatime.com]" and the data we all create using git.
|
8
|
+
The principal is to capture a baseline of activity for a task and answer the age old question "How much time did I spend on this?" or "What is the minimum amount I can charge for my time".
|
9
|
+
|
10
|
+
This implementation various form (Wakatime's)[https://wakatime.com/#features] commit feature as it compares time spent on each file, vs comparing the time between commits. It tends to be significantly more accurate for those who do per line commits.
|
9
11
|
|
10
12
|
## Installation
|
11
13
|
|
@@ -13,42 +15,66 @@ Install the gem:
|
|
13
15
|
|
14
16
|
$ gem install gitwakatime
|
15
17
|
|
16
|
-
|
18
|
+
Run the setup command: (you will need your wakatime api key)[https://wakatime.com/settings]
|
17
19
|
|
18
20
|
$ gitwakatime init
|
19
21
|
|
22
|
+
This creates a .gitwakatime.yml file on the user's home directory ~/.gitwakatime.yml which will contain your api keys and a ~/.gitqakatime.sqlite database to speed things up a bit.
|
20
23
|
|
21
24
|
## Usage
|
22
|
-
|
25
|
+
|
26
|
+
Process the current directory for the past 7 days
|
23
27
|
|
24
28
|
$ gitwakatime tally
|
25
29
|
|
26
|
-
|
30
|
+
Process the current directory from a given point (this will still load all actions data to prevent providing incorrect timing at the start point)
|
31
|
+
|
32
|
+
$ gitwakatime tally -s 2014-02-01
|
33
|
+
|
34
|
+
Process the another directory
|
35
|
+
|
36
|
+
$ gitwakatime tally -f ~/some/other/repo
|
37
|
+
|
38
|
+
Hard reset of the local cache database, if you are getting odd numbers
|
27
39
|
|
28
40
|
$ gitwakatime reset
|
29
41
|
|
30
42
|
|
31
43
|
## Output
|
32
|
-
Total Recorded time
|
33
|
-
Total
|
34
|
-
2015-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
44
|
+
Total Recorded time 1 day 9 hrs 13 mins 32 secs
|
45
|
+
Total Committed Time 1 day 8 hrs 43 mins 48 secs
|
46
|
+
2015-02-04 Total 2 hrs 59 mins 38 secs
|
47
|
+
b1cd1d09c 2015-02-04 00:59:06 -0500 9 mins 4 secs Adding fix and test for the query class.
|
48
|
+
d8ca53770 2 mins 51 secs lib/gitwakatime/query.rb
|
49
|
+
d8ca53770 6 mins 13 secs spec/query_spec.rb
|
50
|
+
8e0f0890e 2015-02-04 00:46:52 -0500 26 mins 4 secs A new implementation of the split tree file issue, I think i need a more complex git log to really validate the idea.
|
51
|
+
093f9e4d5 26 mins 4 secs lib/gitwakatime/commited_file.rb
|
52
|
+
d8ca53770 2015-02-04 00:46:17 -0500 54 mins 13 secs Improving testing for UTC. Fixing various bugs related to single day comparisons.
|
53
|
+
5471c6c80 6 mins 32 secs lib/gitwakatime/query.rb
|
54
|
+
08c7f7005 5 mins 40 secs lib/gitwakatime/timer.rb
|
55
|
+
5f3ec243e 27 mins 41 secs spec/commited_file_spec.rb
|
56
|
+
95e218d72 4 mins 41 secs spec/mapper_spec.rb
|
57
|
+
4949d899a 4 mins 47 secs spec/query_spec.rb
|
58
|
+
4949d899a 1 min 49 secs spec/spec_helper.rb
|
59
|
+
ea23d7dd7 3 mins 3 secs spec/timer_spec.rb
|
60
|
+
30415f0a3 2015-02-04 11:54:18 -0500 1 hr 30 mins 17 secs Cache Actions locally, in sqlite.
|
61
|
+
093f9e4d5 4 mins 19 secs lib/gitwakatime.rb
|
62
|
+
25 secs lib/gitwakatime/action.rb
|
63
|
+
caf409884 7 mins 45 secs lib/gitwakatime/actions.rb
|
64
|
+
331723757 1 min 39 secs lib/gitwakatime/cli.rb
|
65
|
+
46 mins 2 secs lib/gitwakatime/durations.rb
|
66
|
+
b1cd1d09c 23 mins 50 secs lib/gitwakatime/query.rb
|
67
|
+
d8ca53770 3 mins 15 secs lib/gitwakatime/timer.rb
|
68
|
+
d8ca53770 1 min 20 secs spec/commited_file_spec.rb
|
69
|
+
b1cd1d09c 45 secs spec/query_spec.rb
|
70
|
+
d8ca53770 23 secs spec/spec_helper.rb
|
71
|
+
d8ca53770 34 secs spec/timer_spec.rb
|
72
|
+
2015-02-03 Total 7 hrs 6 mins 19 secs
|
73
|
+
5f3ec243e 2015-02-03 23:20:15 -0500 11 mins 55 secs compare times in utc.
|
74
|
+
34c8f0b99 11 mins 55 secs spec/commited_file_spec.rb
|
75
|
+
4949d899a 2015-02-03 23:20:02 -0500 24 mins 5 secs Reduce log output in testing.
|
76
|
+
b07136e26 18 mins 1 sec lib/gitwakatime/log.rb
|
77
|
+
39863a249 4 mins 35 secs spec/query_spec.rb
|
52
78
|
|
53
79
|
## Contributing
|
54
80
|
|
data/lib/gitwakatime/cli.rb
CHANGED
@@ -46,13 +46,13 @@ module GitWakaTime
|
|
46
46
|
GitWakaTime.config.setup_local_db
|
47
47
|
path, GitWakaTime.config.root = File.expand_path(options.file)
|
48
48
|
date = Date.parse(options.start_on) if options.start_on
|
49
|
-
date =
|
49
|
+
date = 7.days.ago unless options.start_on
|
50
50
|
GitWakaTime.config.load_config_yaml
|
51
51
|
GitWakaTime.config.git = Git.open(path)
|
52
52
|
@git_map = Mapper.new(start_at: date)
|
53
|
-
@actions = Query.new(Commit.all, File.basename(path)).get
|
53
|
+
@actions = Query.new(Commit.where('date > ?', date).all, File.basename(path)).get
|
54
54
|
|
55
|
-
@timer = Timer.new(Commit.all, @actions, File.basename(path)).process
|
55
|
+
@timer = Timer.new(Commit.where('date > ?', date).all, @actions, File.basename(path)).process
|
56
56
|
|
57
57
|
@timer.each do |date, commits|
|
58
58
|
Log.new format('%-40s %-40s'.blue,
|
data/lib/gitwakatime/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitwakatime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Russell Osborne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|