any_good 0.0.2 → 0.0.3
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 +8 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0af378cd27783fc6b6514e85e398f5eb19ba057a
|
4
|
+
data.tar.gz: 7b4fc488154e59cbb5230e5b58e8ebddb553ee9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c24701236f05ed7d4fe3a2cc9165b5d13cbb8e98264000763c2611740b3906687476dea67bf73ec65958ff790a31b45e33d4e1b4c3ca7ffe34fd232b37c75a4
|
7
|
+
data.tar.gz: 1005d5619cc4e6fd2997cda250adf5686af74a2d917d43f4dadd0f50e413d418232fbae382c2c1fa523899bde705303ce820771b795e72dac7ed09dc5b26bc21
|
data/lib/any_good.rb
CHANGED
@@ -27,8 +27,7 @@ class AnyGood
|
|
27
27
|
gem_rev_deps: Gems.reverse_dependencies(name)
|
28
28
|
}
|
29
29
|
|
30
|
-
repo_id =
|
31
|
-
.grep(GITHUB_URI_PATTERN).first&.sub(GITHUB_URI_PATTERN, '')
|
30
|
+
repo_id = detect_repo_id(data[:gem]['source_code_uri'], data[:gem]['homepage_uri'])
|
32
31
|
|
33
32
|
if repo_id
|
34
33
|
data.merge!(
|
@@ -93,4 +92,11 @@ class AnyGood
|
|
93
92
|
res == 50 ? '50+' : res
|
94
93
|
}
|
95
94
|
metric('...last closed') { data.closed_issues.first&.fetch(:closed_at) }
|
95
|
+
|
96
|
+
private
|
97
|
+
|
98
|
+
def detect_repo_id(*urls)
|
99
|
+
repo_url = urls.grep(GITHUB_URI_PATTERN).first or return nil
|
100
|
+
Octokit::Repository.from_url(repo_url).slug
|
101
|
+
end
|
96
102
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: any_good
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Shepelev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pastel
|