gems_comparator 0.3.0 → 0.3.1
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b7a44d82e88a67da3fccd06d8f0a92d67b2ea44a553f3fc0dc68752311c38f1
|
|
4
|
+
data.tar.gz: f9b365262db047978efa96dedb6769609994d3d14917a7931d73ec68d9fd2707
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '09def22aa32b2ca11cbca29c7ba01660b0b0883674d37e65333be8f4eebfe0c48b831c4b16f0633e60678af8bb7c11ea3d5612b5db1634e2942bdaf88f1a4fe5'
|
|
7
|
+
data.tar.gz: 3d27b925cd7b20138c91d41404e2bbf1022d783abd99bd0159ae2f86a17a4b4732caad990525571a4f195428925a6085db60f3f08d6c3c784d19a4b50393349b
|
|
@@ -24,10 +24,8 @@ module GemsComparator
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def github_url
|
|
27
|
-
[homepage, source_code_uri, github_url_from_yaml]
|
|
28
|
-
|
|
29
|
-
break normalized if normalized
|
|
30
|
-
end
|
|
27
|
+
urls = [homepage, source_code_uri, github_url_from_yaml]
|
|
28
|
+
urls.map(&method(:normalized_github_url)).compact.first
|
|
31
29
|
end
|
|
32
30
|
|
|
33
31
|
def homepage
|
|
@@ -42,7 +40,7 @@ module GemsComparator
|
|
|
42
40
|
private
|
|
43
41
|
|
|
44
42
|
def normalized_github_url(url)
|
|
45
|
-
return unless url.include?(
|
|
43
|
+
return unless url.include?('github.com')
|
|
46
44
|
|
|
47
45
|
Octokit::Repository.from_url(url).url
|
|
48
46
|
rescue URI::InvalidURIError, Octokit::InvalidRepository, NoMethodError
|
|
@@ -63,8 +61,8 @@ module GemsComparator
|
|
|
63
61
|
|
|
64
62
|
def spec_path
|
|
65
63
|
spec_paths = [
|
|
66
|
-
"#{Bundler.specs_path}/#{name}-#{
|
|
67
|
-
"#{Bundler.specs_path}/#{name}-#{
|
|
64
|
+
"#{Bundler.specs_path}/#{name}-#{after}.gemspec",
|
|
65
|
+
"#{Bundler.specs_path}/#{name}-#{before}.gemspec"
|
|
68
66
|
]
|
|
69
67
|
spec_paths.find { |path| File.exist?(path) }
|
|
70
68
|
end
|