git-worklog 0.1.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 +7 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +13 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +43 -0
- data/LICENSE +21 -0
- data/README.md +43 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/exe/git-worklog +3 -0
- data/git-worklog.gemspec +32 -0
- data/lib/git/worklog/version.rb +7 -0
- data/lib/git/worklog.rb +38 -0
- metadata +78 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d934dcc530ffbff17cda06dace3101bc2eaac8bc119fbf22606b45150e7da07d
|
4
|
+
data.tar.gz: b39dbcf514f433ded331c495d9eeb2e79102cccc1770877597f9aba319353cb6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ff153d7694810a705a11980bdebb866e0398c51248160f63cb7e8437a6ef3e4047ba1036901cb7b7eec2747a10c9e0094b6a4d864844c015dd9dc6fba35fbe3a
|
7
|
+
data.tar.gz: 6088be38275c22d0472ff0bd19490bb43d15efdd10b36a0efef2dfc05174241ad46624aea47849b3037ca9956c479a7448c6ec46646d59ec7a97da0ba3a57dac
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
git-worklog (0.1.0)
|
5
|
+
thor
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
parallel (1.21.0)
|
12
|
+
parser (3.0.2.0)
|
13
|
+
ast (~> 2.4.1)
|
14
|
+
rainbow (3.0.0)
|
15
|
+
rake (13.0.6)
|
16
|
+
regexp_parser (2.1.1)
|
17
|
+
rexml (3.2.5)
|
18
|
+
rubocop (1.22.1)
|
19
|
+
parallel (~> 1.10)
|
20
|
+
parser (>= 3.0.0.0)
|
21
|
+
rainbow (>= 2.2.2, < 4.0)
|
22
|
+
regexp_parser (>= 1.8, < 3.0)
|
23
|
+
rexml
|
24
|
+
rubocop-ast (>= 1.12.0, < 2.0)
|
25
|
+
ruby-progressbar (~> 1.7)
|
26
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
27
|
+
rubocop-ast (1.12.0)
|
28
|
+
parser (>= 3.0.1.1)
|
29
|
+
ruby-progressbar (1.11.0)
|
30
|
+
thor (0.20.3)
|
31
|
+
unicode-display_width (2.1.0)
|
32
|
+
|
33
|
+
PLATFORMS
|
34
|
+
x86_64-darwin-19
|
35
|
+
|
36
|
+
DEPENDENCIES
|
37
|
+
git-worklog!
|
38
|
+
rake (~> 13.0)
|
39
|
+
rubocop (~> 1.7)
|
40
|
+
thor
|
41
|
+
|
42
|
+
BUNDLED WITH
|
43
|
+
2.2.17
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2021 Ghouse Mohamed
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Git::Worklog
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/git/worklog`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'git-worklog'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install git-worklog
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/git-worklog. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/git-worklog/blob/master/CODE_OF_CONDUCT.md).
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the Git::Worklog project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/git-worklog/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "git/worklog"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/exe/git-worklog
ADDED
data/git-worklog.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/git/worklog/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "git-worklog"
|
7
|
+
spec.version = Git::Worklog::VERSION
|
8
|
+
spec.authors = ["Ghouse Mohamed"]
|
9
|
+
spec.email = ["ghousemohamed7126@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "Peek into the work you have been doing in the last day, week or year"
|
12
|
+
spec.description = "Often times in team meetings and 'show and tell' reports we have to go through our work, i.e. our commit history to collect all the work we have been upto. git-worklog makes it easy to fetch all the work you have been upto in the past X days."
|
13
|
+
spec.homepage = "https://github.com/ghousemohamed/git-worklog"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/ghousemohamed/git-worklog"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/ghousemohamed/git-worklog"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
26
|
+
end
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
30
|
+
|
31
|
+
spec.add_dependency "thor"
|
32
|
+
end
|
data/lib/git/worklog.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "git/worklog/version"
|
4
|
+
require "thor"
|
5
|
+
|
6
|
+
module Utilities
|
7
|
+
|
8
|
+
def default_git_user
|
9
|
+
`git config user.name`
|
10
|
+
end
|
11
|
+
|
12
|
+
def user(name)
|
13
|
+
if !name.nil?
|
14
|
+
return name
|
15
|
+
else
|
16
|
+
return default_git_user
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
module Worklog
|
23
|
+
class CLI < Thor
|
24
|
+
package_name "git-worklog"
|
25
|
+
include Thor::Actions
|
26
|
+
include Utilities
|
27
|
+
|
28
|
+
desc "show", "Shows worklog from current repository/directory for past 7 days"
|
29
|
+
method_option :days, :aliases => "-d", :desc => "Specify number of days"
|
30
|
+
method_option :user, :aliases => "-y", :desc => "Specify user"
|
31
|
+
|
32
|
+
def show
|
33
|
+
system("git --no-pager log --pretty=format:\"%h %ad | %s%d [%an]\" --date=short --since=#{options[:days] || 7}.days --author='#{user(options[:user])}' --all")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
Worklog::CLI.start(ARGV)
|
metadata
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: git-worklog
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ghouse Mohamed
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-10-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
description: Often times in team meetings and 'show and tell' reports we have to go
|
28
|
+
through our work, i.e. our commit history to collect all the work we have been upto.
|
29
|
+
git-worklog makes it easy to fetch all the work you have been upto in the past X
|
30
|
+
days.
|
31
|
+
email:
|
32
|
+
- ghousemohamed7126@gmail.com
|
33
|
+
executables:
|
34
|
+
- git-worklog
|
35
|
+
extensions: []
|
36
|
+
extra_rdoc_files: []
|
37
|
+
files:
|
38
|
+
- ".gitignore"
|
39
|
+
- ".rubocop.yml"
|
40
|
+
- Gemfile
|
41
|
+
- Gemfile.lock
|
42
|
+
- LICENSE
|
43
|
+
- README.md
|
44
|
+
- Rakefile
|
45
|
+
- bin/console
|
46
|
+
- bin/setup
|
47
|
+
- exe/git-worklog
|
48
|
+
- git-worklog.gemspec
|
49
|
+
- lib/git/worklog.rb
|
50
|
+
- lib/git/worklog/version.rb
|
51
|
+
homepage: https://github.com/ghousemohamed/git-worklog
|
52
|
+
licenses:
|
53
|
+
- MIT
|
54
|
+
metadata:
|
55
|
+
allowed_push_host: https://rubygems.org
|
56
|
+
homepage_uri: https://github.com/ghousemohamed/git-worklog
|
57
|
+
source_code_uri: https://github.com/ghousemohamed/git-worklog
|
58
|
+
changelog_uri: https://github.com/ghousemohamed/git-worklog
|
59
|
+
post_install_message:
|
60
|
+
rdoc_options: []
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
requirements: []
|
74
|
+
rubygems_version: 3.2.17
|
75
|
+
signing_key:
|
76
|
+
specification_version: 4
|
77
|
+
summary: Peek into the work you have been doing in the last day, week or year
|
78
|
+
test_files: []
|