gem_git 0.1.0 → 0.1.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.
- data/lib/gem_git/helper.rb +9 -5
- metadata +3 -3
data/lib/gem_git/helper.rb
CHANGED
|
@@ -26,11 +26,15 @@ module GemGit
|
|
|
26
26
|
|
|
27
27
|
def github_info_for(gem_name)
|
|
28
28
|
repository_url = repository_url_for(gem_name)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
parsed_url.
|
|
33
|
-
|
|
29
|
+
begin
|
|
30
|
+
parsed_url = URI.parse(repository_url)
|
|
31
|
+
|
|
32
|
+
if parsed_url.host == "github.com"
|
|
33
|
+
parsed_url.path.split("/").slice(1,2) # Stupid splitting
|
|
34
|
+
else
|
|
35
|
+
raise NotOnGithubError.new
|
|
36
|
+
end
|
|
37
|
+
rescue URI::InvalidURIError
|
|
34
38
|
raise NotOnGithubError.new
|
|
35
39
|
end
|
|
36
40
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gem_git
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 25
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.1.1
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Jeremy McAnally
|