gitstat 0.1.1 → 0.1.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.
- checksums.yaml +4 -4
- data/lib/gitstat/cli.rb +19 -20
- data/lib/gitstat/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: 751b4094d104d7791e6028dd74247b0ff5c82e26
|
4
|
+
data.tar.gz: 8e0afb91b799ccff7c182e5e6e49d5b6e9401159
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e690144cfda2eaaad66380f5146b48f89837c6db48a198a782e89040723f322307d85a8f1f4ff4a4d3c0de44134d160ee0286f9f0394276409589fd40703391
|
7
|
+
data.tar.gz: a0a6b8af3c4560a27bbcd28e2a90595bf9bd7b044c35788575274efb67feeef9c67a864ef64debe6196c3fdb8a70525e7675882192d86fa10035dff9b3bdeb71
|
data/lib/gitstat/cli.rb
CHANGED
@@ -1,27 +1,26 @@
|
|
1
|
-
|
2
1
|
module Gitstat
|
3
2
|
class CLI
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
def initialize(*)
|
5
|
+
if ARGV.empty?
|
6
|
+
blank
|
7
|
+
elsif ARGV[0] == "time"
|
8
|
+
time
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def blank
|
13
|
+
str = %q{git log --format='%aN' | sort -u | while read name; do echo "Author >>>> " "$name"; git log --numstat --pretty="%H" --author="$name" | awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("lines added: +%d lines \t | \t deleted: -%d lines \t | \t total commits: %d\n****************************************\n\n", plus, minus, total)}' -; done}
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
exec str
|
17
|
-
end
|
15
|
+
system "bash", "-c", str
|
16
|
+
end
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
exec str
|
24
|
-
end
|
18
|
+
def time(*)
|
19
|
+
from = ARGV[1]
|
20
|
+
to = ARGV[2]
|
21
|
+
str = %q{git log --format='%aN' | sort -u | while read name; do echo "Author >>>> " "$name"; git log --numstat --pretty="%H" --author="$name"} + %{ --since '#{from}' --until '#{to}' } + %q{| awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("******************************************\nlines added: \t +%d lines \ndeleted: \t -%d lines \ntotal commits: \t %d\n******************************************\n\n", plus, minus, total)}' -; done}
|
25
22
|
|
23
|
+
system "bash", "-c", str
|
24
|
+
end
|
26
25
|
end
|
27
|
-
end
|
26
|
+
end
|
data/lib/gitstat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitstat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DilumN
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|