githop 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b0602a3d04493f7bc0a6cb6edce8ff53a1ac355
4
- data.tar.gz: 2c4be77cbf81bd11e80072d95591b515ee0e8b8e
3
+ metadata.gz: d7cba53dbe5c3d125e1b33a174eb3edf2c6da8f9
4
+ data.tar.gz: acd585b42729b389109dad8ae30d8bccd831b0bc
5
5
  SHA512:
6
- metadata.gz: 2790df340ee9faaa793bb2a0312b4e04e029a6b7d5353215e3bb96644e698b6aba797b153f3e7eeba74f191b709acc2c644ae60b1a50d994d45b3955743e97f4
7
- data.tar.gz: 97c8ea236ec5a08c06ea47c1b840a3cfb6ce594e9e2c34fdb31ba99452b0b7ff58d45eab2443c62bb561a3e849a42a5334afa4645e13e252b83c299f06bf5951
6
+ metadata.gz: 256b2351deb970af999717031cc210f01ca184238dfcbdf0174ecde58ec3e6ad3ad0c27cd07ebc83539a50995a6fa946f5fc14885098746faad95b4f4a3c81fb
7
+ data.tar.gz: 11c36ecdc0225325bdac29a6e7c21bf55ae1799fc00163a6313701538b91d7055db1ff2566ae43107fbaefb5c8f234abcb64fe10e31d80cc14c876c35401fac3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- githop (0.0.3)
4
+ githop (0.0.4)
5
5
  activesupport
6
6
  bigquery
7
7
 
data/README.md CHANGED
@@ -1,6 +1,4 @@
1
- # githop
2
-
3
- 🐙⏰
1
+ # githop 🐙⏰
4
2
 
5
3
  Uses [BigQuery][3] and [GitHub Archive][2] to create something like [TimeHop][4] for GitHub. It will
6
4
  show you the things you did exactly one year ago.
@@ -36,7 +34,7 @@ Use
36
34
  gem install githop
37
35
  ```
38
36
 
39
- to install the it and configure some settings in `~/.githop.yml`:
37
+ to install it and configure some settings in `~/.githop.yml`:
40
38
 
41
39
  ```yaml
42
40
  ---
@@ -5,19 +5,12 @@ module GitHop
5
5
  def self.run(other_user, date = 1.year.ago)
6
6
  config = YAML.load(File.read("#{ENV['HOME']}/.githop.yml"))
7
7
  result = GitHop.hop(config, other_user, date)
8
+ result = GitHop.pretty_print(result, other_user) unless result['rows'].nil?
8
9
 
9
- if result['rows'].nil?
10
- $stderr.puts "GitHub Archive query for #{other_user || config['github_user']} had no results."
11
- $stderr.puts result.inspect
12
- exit(1)
13
- end
14
-
15
- result = GitHop.pretty_print(result, other_user)
16
-
17
- if result.count == 0
18
- puts "No events found, but #{other_user || 'you'} surely had an awesome day nevertheless :)"
19
- else
10
+ if result.is_a?(Array) && result.count > 0
20
11
  puts result
12
+ else
13
+ puts "No events found, but #{other_user || 'you'} surely had an awesome day nevertheless :)"
21
14
  end
22
15
  end
23
16
  end
@@ -1,3 +1,3 @@
1
1
  module GitHop
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
data/lib/githop.rb CHANGED
@@ -63,12 +63,14 @@ END
63
63
 
64
64
  def self.labels
65
65
  {
66
+ 'CommitCommentEvent' => 'commented a commit on the repo',
66
67
  'CreateEvent' => 'created the',
67
68
  'DeleteEvent' => 'deleted the',
68
69
  'ForkEvent' => 'forked the repo',
69
70
  'IssueCommentEvent' => 'commented an issue on',
70
71
  'IssuesEvent' => 'created an issue on',
71
72
  'PullRequestEvent' => 'created a PR on',
73
+ 'PullRequestReviewCommentEvent' => 'commented on a PR on the repo',
72
74
  'PushEvent' => 'pushed commits to',
73
75
  'WatchEvent' => 'watched the repo'
74
76
  }
@@ -82,7 +84,7 @@ END
82
84
  _, _, ref, ref_type = event[4]['v'], event[5]['v'], event[6]['v'], event[7]['v']
83
85
 
84
86
  # Filter some not so interesting events
85
- next if %w(IssueCommentEvent IssuesEvent WatchEvent).include?(type)
87
+ next if %w(CommitCommentEvent IssueCommentEvent IssuesEvent PullRequestReviewCommentEvent WatchEvent).include?(type)
86
88
 
87
89
  action = labels[type]
88
90
  fail "Unsupported event type #{type}" if action.nil?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: githop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Bügling
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-24 00:00:00.000000000 Z
11
+ date: 2015-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler