gitlogged 1.0.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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/bin/gitlogged +36 -0
  3. metadata +46 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 55faa72515f1051cacbb6aab68de556acb4f6e70
4
+ data.tar.gz: 602c9ffafa848aaed870a4ad60d39dbea4df4eda
5
+ SHA512:
6
+ metadata.gz: 7b01011665149e395277489a8a5d682f789a5dae7d26c733c2a8e3561a577c648b726f800efa42f3ae85e2a4d9aff9683195adc9fbbd3726efcf4f48d76595ee
7
+ data.tar.gz: b4ce40bb6323f0af53095ed82aba609bc9aef1079d4cc1ea611c7cc49bc215c804c958ff60dd58290ddf25946cd44eb8c33c85cc7f08e8b8d606b1af9d178025
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+ require 'date'
3
+
4
+ def git_summary(date)
5
+ after = date
6
+ before = after.next_day
7
+
8
+ output = `git shortlog --before=#{before.to_time.to_i} --after=#{after.to_time.to_i}`
9
+ end
10
+
11
+ if ARGV.length <= 1
12
+ date = ARGV[0] ? Date.strptime(ARGV[0], '%Y-%m-%d') : Date.today
13
+
14
+ output = git_summary(date)
15
+ puts output
16
+ else
17
+ start_date = Date.strptime(ARGV[0], '%Y-%m-%d')
18
+ end_date = Date.strptime(ARGV[1], '%Y-%m-%d')
19
+
20
+ date = start_date
21
+ while date <= end_date do
22
+ puts "################################################################"
23
+ puts
24
+ puts "Date: #{date.strftime('%Y-%m-%d')}"
25
+ puts
26
+
27
+ output = git_summary(date)
28
+ puts output
29
+
30
+ puts
31
+ puts "################################################################"
32
+
33
+ date = date.next_day
34
+ end
35
+
36
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gitlogged
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Armin Primadi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email: armin@dexcode.com
15
+ executables:
16
+ - gitlogged
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - bin/gitlogged
21
+ homepage: https://github.com/dexcodeinc/gitlogged
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.4.6
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Simple CLI git summary tools that groups commit by author and date
45
+ test_files: []
46
+ has_rdoc: