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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/any_good.rb +12 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7fb208f16bb2d4c212c9cea27ec91ba93bd8024b617be1e3b2767c692e57ffc
4
- data.tar.gz: e1d259e50a27ce665049ef9bb3c757be63fe132b8daf812d9442f220cdfaeeb3
3
+ metadata.gz: b45a5a1d7faaf74d53a92fe93acc33ccbeb83439444f20ce833f4b266c6adbe5
4
+ data.tar.gz: dbec23d91a783f28d6edabcfe0c8a05101fe93bf80e87e11e8291cd1623f0cc2
5
5
  SHA512:
6
- metadata.gz: 161a798f1b91ff1d60e2be248e52cbd23cd482d97f49063b24a6ad23109f9f86467eddaa5fca262aa5aa3058d975987bba8fa8572d6f004dad60ff72d014d646
7
- data.tar.gz: 12393bd4beb5dd863a44cca7009fa17eadc4c3cfbee0b69c894928a9bd490aaac4e3f743da8c929cc3d019c5ce5f65fab77d846c43d7e2904bf05d98545f31a5
6
+ metadata.gz: b3bc1fa2c2933441c8a9e89db3e50a77ef9145203f686323d4eb0e34eab0a81559c36e39263fd3b88dd8f7274c43ae4d2ec1b07faab0ada22b9a127984c363bb
7
+ data.tar.gz: 06dcf0b4e9146f9d6e866740b13fcf615b88b87d4508cf1a4c5be2ed610de3e83410ff5d982227e73c6a4c387922f85970940efff2096134d05599e418dd9446
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: any_good
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Shepelev