gem_git 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/gem_git/helper.rb +9 -5
  2. metadata +3 -3
@@ -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
- parsed_url = URI.parse(repository_url)
30
-
31
- if parsed_url.host == "github.com"
32
- parsed_url.path.split("/").slice(1,2) # Stupid splitting
33
- else
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeremy McAnally