grok_cli 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bc17609b99f535d31b36214e36de8e6613c29ec
4
- data.tar.gz: 3316fe8771a757f89d78b645fba5431d89891d5b
3
+ metadata.gz: 230c499ad661073a5e90c94d08fd5610b5cbddbe
4
+ data.tar.gz: 026383d13a1f7b8ecc1d1be05e1412d004d98222
5
5
  SHA512:
6
- metadata.gz: e4cf47021f84248737b2114a5ae41377d176a4ea4d260c0d40dd09486a415d3fbc9f79386bfed692b0701210d247062165c6bcedde9872067cf0023a3a6019bd
7
- data.tar.gz: e68a0ffc370c165fe7edcb177d70539f983a7c2644d3abaccc85175e6d1ab0dbe23ec2ff33f9d64793804b9fdf984aef85d9241feaa36ec4ba680070f36a7522
6
+ metadata.gz: c88fc5b5990c21cd2f6ca90105cbc64cf4a6007e456fd0b581f837cdfea417c2a2e0cd79d3ea70173e0eaf01b958595528175522d627b97edac174413c4aabc6
7
+ data.tar.gz: c4205f1ee1e3526f7b25440336623692515dbe162cc1678b9cd58c66dc2fe2fdfaa11b1b915619689830f4210c0571ca9afe86aff9c739f6a7199787ab2f1d1f
@@ -5,13 +5,13 @@ require 'uri'
5
5
  module GrokCLI::Git
6
6
  class Log
7
7
 
8
- def execute(since_hours_ago:, domains: )
8
+ def execute(since_hours_ago:, domains:, author:)
9
9
  pwd = Dir.pwd
10
10
  git = Git.open(pwd)
11
11
 
12
12
  map = {}
13
13
 
14
- git.log.since("#{since_hours_ago} hours ago").reverse_each do |commit|
14
+ git.log.author(author).since("#{since_hours_ago} hours ago").reverse_each do |commit|
15
15
  uris = URI.extract(commit.message)
16
16
 
17
17
  uris.select! do |uri|
@@ -94,8 +94,13 @@ module GrokCLI
94
94
  default_value: /trello\.com|atlassian\.net|asana\.com/,
95
95
  desc: 'A regular expression to search against domain names'
96
96
 
97
+ c.flag [:a, :author],
98
+ type: String,
99
+ default_value: ::Git::Lib.new.global_config_get('user.name'),
100
+ desc: 'The git user\'s name to view history'
101
+
97
102
  c.action do |global_options,options,arguments|
98
- GrokCLI::Git::Log.new.execute(since_hours_ago: options[:since], domains: options[:domains])
103
+ GrokCLI::Git::Log.new.execute(since_hours_ago: options[:since], domains: options[:domains], author: options[:author])
99
104
  end
100
105
  end
101
106
  end
@@ -1,3 +1,3 @@
1
1
  module GrokCLI
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grok_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Freeman