any_good 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/any_good.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b45a5a1d7faaf74d53a92fe93acc33ccbeb83439444f20ce833f4b266c6adbe5
|
4
|
+
data.tar.gz: dbec23d91a783f28d6edabcfe0c8a05101fe93bf80e87e11e8291cd1623f0cc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3bc1fa2c2933441c8a9e89db3e50a77ef9145203f686323d4eb0e34eab0a81559c36e39263fd3b88dd8f7274c43ae4d2ec1b07faab0ada22b9a127984c363bb
|
7
|
+
data.tar.gz: 06dcf0b4e9146f9d6e866740b13fcf615b88b87d4508cf1a4c5be2ed610de3e83410ff5d982227e73c6a4c387922f85970940efff2096134d05599e418dd9446
|
data/lib/any_good.rb
CHANGED
@@ -31,6 +31,8 @@ class AnyGood
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def report
|
34
|
+
puts description
|
35
|
+
|
34
36
|
self.class.meters.each do |meter|
|
35
37
|
puts meter.call(@data).format
|
36
38
|
end
|
@@ -80,6 +82,14 @@ class AnyGood
|
|
80
82
|
|
81
83
|
private
|
82
84
|
|
85
|
+
def description
|
86
|
+
"%{name} (GitHub %{repo})\n %{description}" % {
|
87
|
+
name: @data.gem_info['name'],
|
88
|
+
description: @data.gem_info['info'],
|
89
|
+
repo: @data.repo&.[](:html_url) || '—'
|
90
|
+
}
|
91
|
+
end
|
92
|
+
|
83
93
|
def fetch_gem
|
84
94
|
{
|
85
95
|
gem_info: Gems.info(name),
|
@@ -102,6 +112,8 @@ class AnyGood
|
|
102
112
|
# open_prs: @github_client.issues(repo_id, state: 'open').map(&:to_h)
|
103
113
|
# closed_prs: @github_client.issues(repo_id, state: 'closed').map(&:to_h)
|
104
114
|
}
|
115
|
+
rescue Octokit::TooManyRequests
|
116
|
+
abort('GitHub: too many requests. Try `GITHUB_ACCESS_TOKEN=<yourtoken> any_good <gem_name>` for higher limits.')
|
105
117
|
end
|
106
118
|
|
107
119
|
def detect_repo_id(*urls)
|