weekly_commits 1.1.0 → 1.2.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 +5 -5
- data/README.md +17 -18
- data/Rakefile +3 -3
- data/bin/console +3 -3
- data/lib/weekly_commits.rb +0 -1
- data/lib/weekly_commits/cli.rb +25 -20
- data/lib/weekly_commits/version.rb +1 -1
- data/weekly_commits.gemspec +7 -8
- data/weekly_commits.png +0 -0
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e675ecdad9d744598bf5130689f18e3e4bbd456fa9c03a0dc27850fda1568ae5
|
4
|
+
data.tar.gz: 4533e14f2e66fe685599a99e31ee07abf45b46a4d21e0ebcb1326dcab65659dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d55256b26a929b9bb52069c7d23f4f1f9adafc9048f6b78342d83ec1d7b7ee7c9c686f5de235331ef578c791419ed47a489755700ec5df8541652af471b3b12
|
7
|
+
data.tar.gz: 658b7a2c95db0610a148c2461fa110ae04ece70ad7215a57c6ab306d59836d5e61df8927e5974070aaf21b7ca5e245f5779494d716e1692e7b90deac4a61902f
|
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+

|
2
|
+
|
3
|
+
[](https://travis-ci.org/dkarter/weekly_commits)
|
2
4
|
|
3
5
|
WeeklyCommits is a command line tool for getting a bird's eye view of your
|
4
6
|
commits on a branch for a specific week.
|
@@ -39,16 +41,21 @@ Usage:
|
|
39
41
|
Options:
|
40
42
|
-w, [--week=N] # Relative week number. e.g. -w=1 for last week. 0 = current week.
|
41
43
|
# Default: 0
|
42
|
-
[--show-author], [--no-show-author] # Display author(s) with each commit message. e.g. Did stuff (
|
44
|
+
[--show-author], [--no-show-author] # Display author(s) with each commit message. e.g. Did stuff (Ghost Ninja)
|
45
|
+
[--no-merge] # Omit merge commit messages
|
43
46
|
[--sort=SORT] # Show commits in ascending/descending order. Default: older commits on top, newer on bottom.
|
44
47
|
# Default: desc
|
45
48
|
# Possible values: asc, desc
|
46
49
|
```
|
47
50
|
|
48
|
-
|
51
|
+
To use the gem, navigate to a repo and make sure you have the WeeklyCommits gem
|
52
|
+
installed for that version of ruby in that directory.
|
53
|
+
|
54
|
+
Make sure you are on the correct branch.
|
49
55
|
|
50
|
-
|
51
|
-
|
56
|
+
By default WeeklyCommits will only show commits on the current branch.
|
57
|
+
|
58
|
+
### Example
|
52
59
|
|
53
60
|
Show me this week's commits:
|
54
61
|
|
@@ -56,33 +63,25 @@ Show me this week's commits:
|
|
56
63
|
wcomm
|
57
64
|
```
|
58
65
|
|
59
|
-
Show me last
|
66
|
+
Show me last week's commits:
|
60
67
|
|
61
68
|
```sh
|
62
69
|
wcomm -w=1
|
63
70
|
```
|
64
71
|
|
65
|
-
Show me commits from two weeks ago including
|
72
|
+
Show me commits from two weeks ago including author
|
66
73
|
|
67
74
|
```sh
|
68
75
|
wcomm -w=2 --show-author
|
69
76
|
```
|
70
77
|
|
71
|
-
|
72
|
-
|
73
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
74
|
-
`rake spec` to run the tests. You can also run `bin/console` for an interactive
|
75
|
-
prompt that will allow you to experiment.
|
78
|
+
### Screenshots
|
76
79
|
|
77
|
-
|
78
|
-
release a new version, update the version number in `version.rb`, and then run
|
79
|
-
`bundle exec rake release`, which will create a git tag for the version, push
|
80
|
-
git commits and tags, and push the `.gem` file to
|
81
|
-
[rubygems.org](https://rubygems.org).
|
80
|
+

|
82
81
|
|
83
82
|
## TODO
|
84
83
|
|
85
|
-
- [ ] Add support for
|
84
|
+
- [ ] Add support for specifying a branch explicitly
|
86
85
|
|
87
86
|
## Contributing
|
88
87
|
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'weekly_commits'
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +10,5 @@ require "weekly_commits"
|
|
10
10
|
# require "pry"
|
11
11
|
# Pry.start
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'irb'
|
14
14
|
IRB.start
|
data/lib/weekly_commits.rb
CHANGED
data/lib/weekly_commits/cli.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'thor'
|
2
4
|
require 'colorize'
|
3
5
|
require 'active_support/all'
|
@@ -8,25 +10,27 @@ module WeeklyCommits
|
|
8
10
|
default_task :weekly_commits
|
9
11
|
|
10
12
|
desc 'weekly_commits', '[DEFAULT] Lists commits for a specified week'
|
11
|
-
method_option :week,
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
13
|
+
method_option :week,
|
14
|
+
type: :numeric,
|
15
|
+
desc: 'Relative week number. e.g. -w=1 for last week. 0 = current week.',
|
16
|
+
aliases: '-w',
|
17
|
+
default: 0
|
18
|
+
|
19
|
+
method_option :show_author,
|
20
|
+
type: :boolean,
|
21
|
+
desc: 'Display author(s) with each commit message. e.g. Did stuff (Ghost Ninja)',
|
22
|
+
default: false
|
23
|
+
|
24
|
+
method_option :sort,
|
25
|
+
type: :string,
|
26
|
+
desc: 'Show commits in ascending/descending order. Default: older commits on top, newer on bottom.',
|
27
|
+
default: 'asc',
|
28
|
+
enum: %w[asc desc]
|
29
|
+
|
30
|
+
method_option :no_merge,
|
31
|
+
type: :boolean,
|
32
|
+
desc: 'Exclude merge commits',
|
33
|
+
default: false
|
30
34
|
|
31
35
|
def weekly_commits
|
32
36
|
relative_week = options[:week]
|
@@ -39,8 +43,9 @@ module WeeklyCommits
|
|
39
43
|
committer = options[:show_author] ? ' (%cn)'.magenta : ''
|
40
44
|
|
41
45
|
commits = `git --no-pager log --after='#{git_date_format} 00:00' --before='#{git_date_format} 23:59' --pretty=format:'%s#{committer}'`
|
46
|
+
commits += ' --no-merges' if options[:no_merge]
|
42
47
|
|
43
|
-
commits = commits.lines.reverse if options[:sort].
|
48
|
+
commits = commits.lines.reverse if options[:sort].casecmp('asc').zero?
|
44
49
|
|
45
50
|
puts week_title.yellow
|
46
51
|
puts commits
|
data/weekly_commits.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'weekly_commits/version'
|
5
4
|
|
@@ -9,22 +8,22 @@ Gem::Specification.new do |spec|
|
|
9
8
|
spec.authors = ['Dorian Karter']
|
10
9
|
spec.email = ['jobs@doriankarter.com']
|
11
10
|
|
12
|
-
spec.summary =
|
11
|
+
spec.summary = 'List your commits on a project for every day of a specified week'
|
13
12
|
spec.homepage = 'http://doriankarter.com'
|
14
13
|
spec.license = 'MIT'
|
15
14
|
|
16
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|screenshots)/}) }
|
17
16
|
spec.bindir = 'bin'
|
18
17
|
spec.executables = ['wcomm']
|
19
18
|
spec.require_paths = ['lib']
|
20
19
|
|
21
|
-
spec.add_development_dependency 'bundler',
|
22
|
-
spec.add_development_dependency 'rake', "~> 10.0"
|
23
|
-
spec.add_development_dependency 'rspec', "~> 3.0"
|
20
|
+
spec.add_development_dependency 'bundler', '~> 2.1.4'
|
24
21
|
spec.add_development_dependency 'pry'
|
22
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
23
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
25
24
|
|
26
25
|
# runtime dependencies
|
27
26
|
spec.add_runtime_dependency 'activesupport'
|
28
|
-
spec.add_runtime_dependency 'thor'
|
29
27
|
spec.add_runtime_dependency 'colorize'
|
28
|
+
spec.add_runtime_dependency 'thor'
|
30
29
|
end
|
data/weekly_commits.png
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weekly_commits
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Karter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.1.4
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: pry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '10.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '10.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
61
|
+
version: '3.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
68
|
+
version: '3.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: activesupport
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: colorize
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: thor
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- lib/weekly_commits/cli.rb
|
131
131
|
- lib/weekly_commits/version.rb
|
132
132
|
- weekly_commits.gemspec
|
133
|
+
- weekly_commits.png
|
133
134
|
homepage: http://doriankarter.com
|
134
135
|
licenses:
|
135
136
|
- MIT
|
@@ -149,8 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
150
|
- !ruby/object:Gem::Version
|
150
151
|
version: '0'
|
151
152
|
requirements: []
|
152
|
-
|
153
|
-
rubygems_version: 2.5.1
|
153
|
+
rubygems_version: 3.1.2
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: List your commits on a project for every day of a specified week
|