gitwakatime 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46d9e8b02b43ba532f6631155c4beadff25d65e1
4
- data.tar.gz: 7ea139ea0454e766c82186a526bc17cad859a542
3
+ metadata.gz: c1c9bcc647f411393c85c1a67bf26d883b8d6d31
4
+ data.tar.gz: cb344b96d438e4a9b102bfb6828f9bb183977599
5
5
  SHA512:
6
- metadata.gz: baed9a3f9d7cd015d0148356e657cac46b792ae0b8276c4ad61848ec26cfc700bbfbf0b6b36abff102bf825cedf9723292143aa689033bdcd312ca1fa0bce1e9
7
- data.tar.gz: a51aca840239070583c1f81f3326931f72cd023e893850b7e755c8da30308bfb5325f844e387891fca7ca98dffdb8dc0e5a70a0877848120de0291c180e99d5c
6
+ metadata.gz: ea8350ae2cbbe3e36bc1759a0031c4ff3d25c9e234e459cb54c39f071a93d9485a6751219b2542fe1e64f16e43a6cc3e82bce8bb5e930e1634d1f7f66c294d17
7
+ data.tar.gz: 988380175f02e9d7c91a0b4b925a4f0be432f6fc3923c1d38c2c989248941380af90ef1b5e478aab8497b00a6f4f5b0e8abedbba0ea37f9bd58133c761733153
data/README.md CHANGED
@@ -4,8 +4,10 @@
4
4
  [![Gem Version](https://badge.fury.io/rb/gitwakatime.svg)](http://badge.fury.io/rb/gitwakatime)
5
5
  [![Code Climate](https://codeclimate.com/github/rposborne/gitwakatime/badges/gpa.svg)](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
- Run the setup command: (you will need your wakatime api key). Creates a .gitwakatime.yml file on the user's home directory ~/.gitwakatime.yml which will contain your api keys
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
- Process the current directory
25
+
26
+ Process the current directory for the past 7 days
23
27
 
24
28
  $ gitwakatime tally
25
29
 
26
- Hard reset of the local cache database
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 21 hrs 59 mins 59 secs
33
- Total Commited Time 18 hrs 50 mins 53 secs
34
- 2015-01-30 Total 2 hrs 40 mins 22 secs
35
- 5f938e6a8 2015-01-30 00:28:07 -0500 1 hr 6 mins 25 secs Adding dependent file tests.
36
- 658ae589e 13 mins 11 secs lib/gitwakatime/timer.rb
37
- a42b7bc18 53 mins 14 secs spec/commit_spec.rb
38
- 34014889b 2015-01-30 00:27:35 -0500 1 hr 33 mins 57 secs Renaming Parent commit, expose raw commit, and fixed dependent commit time lookup.
39
- 658ae589e 1 hr 43 secs lib/gitwakatime/commit.rb
40
- 658ae589e 33 mins 14 secs lib/gitwakatime/commited_file.rb
41
- 2014-11-14 Total 6 hrs 9 mins 15 secs
42
- 658ae589e 2014-11-14 00:05:45 -0500 6 hrs 9 mins 15 secs Smoothly breaks apart request to multiple queries to wakatime.
43
- f97f77f0b 13 mins 49 secs README.md
44
- c983f9fb4 Rakefile
45
- 3575ba3bb 13 mins 59 secs gitwakatime.gemspec
46
- b0accb9f0 25 mins 11 secs lib/gitwakatime/actions.rb
47
- 3575ba3bb 20 mins 13 secs lib/gitwakatime/cli.rb
48
- 070a759c8 24 mins 31 secs lib/gitwakatime/commit.rb
49
- 25701d955 12 mins 38 secs lib/gitwakatime/commited_file.rb
50
- fe60ad723 1 hr 56 mins 24 secs lib/gitwakatime/mapper.rb
51
- 83b90c361 2 hrs 22 mins 30 secs lib/gitwakatime/timer.rb
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
 
@@ -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 = 1.month.ago.beginning_of_month unless options.start_on
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,
@@ -1,4 +1,4 @@
1
1
  # Version Number Definition
2
2
  module GitWakaTime
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
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.0
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-04 00:00:00.000000000 Z
11
+ date: 2015-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git