gitalytics 0.0.1 → 0.0.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/gitalytics +1 -2
- data/lib/gitalytics.rb +10 -8
- metadata +39 -20
data/bin/gitalytics
CHANGED
data/lib/gitalytics.rb
CHANGED
@@ -1,18 +1,20 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
1
3
|
class Gitalytics
|
2
4
|
def log_to_hash
|
3
|
-
|
4
|
-
|
5
|
-
|
5
|
+
lines = []
|
6
|
+
command = "git log --pretty='%cn|%cd|%s'"
|
7
|
+
result = `#{command}`
|
6
8
|
|
7
|
-
|
9
|
+
result.each_line do |line|
|
8
10
|
parts = line.split('|')
|
9
|
-
|
11
|
+
lines << {:username => parts[0], :date => Date.parse(parts[1]), :subject => parts[2]}
|
10
12
|
end
|
11
13
|
|
12
14
|
return {
|
13
|
-
:users =>
|
14
|
-
:dates =>
|
15
|
-
:records =>
|
15
|
+
:users => lines.map{|r| r[:username]}.uniq,
|
16
|
+
:dates => lines.map{|r| r[:date]}.uniq,
|
17
|
+
:records => lines
|
16
18
|
}
|
17
19
|
end
|
18
20
|
|
metadata
CHANGED
@@ -1,47 +1,66 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitalytics
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Gonzalo Robaina
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
17
|
+
|
18
|
+
date: 2013-12-27 00:00:00 Z
|
13
19
|
dependencies: []
|
20
|
+
|
14
21
|
description: Get usefull analytics from your git log
|
15
22
|
email: gonzalor@gmail.com
|
16
|
-
executables:
|
23
|
+
executables:
|
17
24
|
- gitalytics
|
18
25
|
extensions: []
|
26
|
+
|
19
27
|
extra_rdoc_files: []
|
20
|
-
|
28
|
+
|
29
|
+
files:
|
21
30
|
- lib/gitalytics.rb
|
22
31
|
- bin/gitalytics
|
23
32
|
homepage: http://rubygems.org/gems/gitalytics
|
24
|
-
licenses:
|
33
|
+
licenses:
|
34
|
+
- MIT
|
25
35
|
post_install_message:
|
26
36
|
rdoc_options: []
|
27
|
-
|
37
|
+
|
38
|
+
require_paths:
|
28
39
|
- lib
|
29
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
30
41
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
|
35
|
-
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
50
|
none: false
|
37
|
-
requirements:
|
38
|
-
- -
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
hash: 3
|
55
|
+
segments:
|
56
|
+
- 0
|
57
|
+
version: "0"
|
41
58
|
requirements: []
|
59
|
+
|
42
60
|
rubyforge_project:
|
43
|
-
rubygems_version: 1.8.
|
61
|
+
rubygems_version: 1.8.24
|
44
62
|
signing_key:
|
45
63
|
specification_version: 3
|
46
64
|
summary: Git Analytics
|
47
65
|
test_files: []
|
66
|
+
|