gitstat 0.1.1 → 0.1.2

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: fc4cf56b40bf3bd967301ed14ad8101618b0664e
4
- data.tar.gz: 28b3c9d7a59baf3e64fa6c42caae487fb3a37248
3
+ metadata.gz: 751b4094d104d7791e6028dd74247b0ff5c82e26
4
+ data.tar.gz: 8e0afb91b799ccff7c182e5e6e49d5b6e9401159
5
5
  SHA512:
6
- metadata.gz: 6ea28a0cd0ccd3c8f1ee0fc1f360079f3800ef3a18f4a80e852298d87a49ebeadd1d92fd81577a6cf6d1eafc2d1e9be5a50f8864a353e716b020ca1e4aeab60c
7
- data.tar.gz: 3cf3f3ff5e8c544cc53a62258cb3de01ce89aba834587dfcd6ebab48c80f53eaade720d236bbf4ba84221c56d7659523d8c98f48c450363a7b72d9344f75475f
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
- def initialize(*)
6
- if ARGV.empty?
7
- blank
8
- elsif ARGV[0] == "time"
9
- time
10
- end
11
-
12
- end
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
- def blank
15
- str = %q{git log --format='%aN' | sort -u | while read name; do echo "Author >>>> " "$name\t"; 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}
16
- exec str
17
- end
15
+ system "bash", "-c", str
16
+ end
18
17
 
19
- def time(*)
20
- from = ARGV[1]
21
- to = ARGV[2]
22
- str = %q{git log --format='%aN' | sort -u | while read name; do echo "Author >>>> " "$name\t"; 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}
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
@@ -1,3 +1,3 @@
1
1
  module Gitstat
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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-20 00:00:00.000000000 Z
11
+ date: 2016-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler