weekly_commits 0.1.0 → 1.0.0
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/weekly_commits/cli.rb +7 -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: 032be9fd7bb56b8cd2f6480be35b329a60da4fb1
|
4
|
+
data.tar.gz: 6a73cc53bbe888c084950d2ac06215cf33ddf750
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b305fe4c67db86e642c70abbedfe1bd011b4ed9e4a13e06f2ee3c166bda86648b921026c8f279f4942d18f64761cc653be3947be90e433201736dc9fe6d81de7
|
7
|
+
data.tar.gz: 61640142bca5fff7a0ceb520d60258799673efbe2611f7fb0101cf0d5b23079f712bf144439e8d257edb448b161ac7584f822ccc30135b54d41f6fee83acd0e5
|
data/lib/weekly_commits/cli.rb
CHANGED
@@ -5,7 +5,7 @@ require 'active_support/all'
|
|
5
5
|
module WeeklyCommits
|
6
6
|
class CLI < Thor
|
7
7
|
package_name 'Weekly Commits'
|
8
|
-
default_task :
|
8
|
+
default_task :weekly_commits
|
9
9
|
|
10
10
|
desc 'weekly_commits', 'Lists commits for a specified week'
|
11
11
|
method_option :week, {
|
@@ -21,9 +21,13 @@ module WeeklyCommits
|
|
21
21
|
5.times do |day_count|
|
22
22
|
date = beg_week + day_count.days
|
23
23
|
week_title = date.strftime('%a, %e %b %Y')
|
24
|
-
git_date_format = date.strftime('%
|
24
|
+
git_date_format = date.strftime('%Y-%m-%e')
|
25
|
+
|
26
|
+
commits = `git --no-pager log --after='#{git_date_format} 00:00' --before='#{git_date_format} 23:59' --pretty=format:'%s'`
|
27
|
+
|
25
28
|
puts week_title.yellow
|
26
|
-
|
29
|
+
puts commits
|
30
|
+
puts
|
27
31
|
end
|
28
32
|
end
|
29
33
|
end
|