weekly_commits 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/weekly_commits/cli.rb +3 -3
- data/lib/weekly_commits/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e78ccbd42e1701cc41a936e07973e61c11318b86
|
4
|
+
data.tar.gz: ef667d7c3fb3404be594a17f44a6d361cff23027
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3216a4f3db74910bea407af5eb559d583475eac519dae682471e8056250b17ecb6f52601e26ba7aeb8550b5f8ceb91397fa77b30ca70b0c012d59fa5761398dc
|
7
|
+
data.tar.gz: 64bcf59f6136427ce0439bf24276074f4343e3f3accde23145a6cf143325261611c1d7485a273325efaa97371656a533164b5fab29a43a203fbd07bc349326a0
|
data/README.md
CHANGED
@@ -39,7 +39,7 @@ Usage:
|
|
39
39
|
Options:
|
40
40
|
-w, [--week=N] # Relative week number. e.g. -w=1 for last week. 0 = current week.
|
41
41
|
# Default: 0
|
42
|
-
[--show-
|
42
|
+
[--show-author], [--no-show-author] # Display author(s) with each commit message. e.g. Did stuff (Dorian Karter)
|
43
43
|
[--sort=SORT] # Show commits in ascending/descending order. Default: older commits on top, newer on bottom.
|
44
44
|
# Default: desc
|
45
45
|
# Possible values: asc, desc
|
@@ -65,7 +65,7 @@ wcomm -w=1
|
|
65
65
|
Show me commits from two weeks ago including committer
|
66
66
|
|
67
67
|
```sh
|
68
|
-
wcomm -w=2 --show-
|
68
|
+
wcomm -w=2 --show-author
|
69
69
|
```
|
70
70
|
|
71
71
|
## Development
|
data/lib/weekly_commits/cli.rb
CHANGED
@@ -15,9 +15,9 @@ module WeeklyCommits
|
|
15
15
|
default: 0,
|
16
16
|
}
|
17
17
|
|
18
|
-
method_option :
|
18
|
+
method_option :show_author, {
|
19
19
|
type: :boolean,
|
20
|
-
desc: 'Display
|
20
|
+
desc: 'Display author(s) with each commit message. e.g. Did stuff (Dorian Karter)',
|
21
21
|
default: false,
|
22
22
|
}
|
23
23
|
|
@@ -36,7 +36,7 @@ module WeeklyCommits
|
|
36
36
|
date = beg_week + day_count.days
|
37
37
|
week_title = date.strftime('%a, %e %b %Y')
|
38
38
|
git_date_format = date.strftime('%Y-%m-%e')
|
39
|
-
committer = options[:
|
39
|
+
committer = options[:show_author] ? ' (%cn)'.magenta : ''
|
40
40
|
|
41
41
|
commits = `git --no-pager log --after='#{git_date_format} 00:00' --before='#{git_date_format} 23:59' --pretty=format:'%s#{committer}'`
|
42
42
|
|