gemdiff 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d19b049c4418e2d54abf8dfe9789faff78a86ac
4
- data.tar.gz: 3f78d4869c7aa119906fceb034889802fe421e52
3
+ metadata.gz: 52ab51b89db338ceecfaa21d2fe292b89c63e551
4
+ data.tar.gz: e07cfdf8d8fae0f1f3ab05c36c95e79c1856910a
5
5
  SHA512:
6
- metadata.gz: 6dfc92665f0b74d4ca8ad1312e0325ce460c4150c8b741352bf8ba2cd5232cbf20d321c47f0e7db97b0c156fe5c451488d7e7975369af072826fb116e6c793e5
7
- data.tar.gz: d7165d83042efa0075ba898ecf096dd7ba8ccd8d4ce8505afddceb2baafbbf5031ab0c609b3515802e697537a8be639cabf38e16d84ad5aa0c3ba3a8e82d9027
6
+ metadata.gz: 8b72d748265ed0943ff5eeef69e1ebcf4d4606d74d00b6cf97aee4519928f858c0b40b733121352fe3bea3d2ee805462787194f55dc121cfb48c7590fa23cbd3
7
+ data.tar.gz: 2a561f384cd2a93c64d6a02ba8290980e104449b6036da9b1285d11f3578d031d683234aa0c736e0726f5e38a62131cccd0e5208f6396aaae7f30ca5191d4325
@@ -1,4 +1,5 @@
1
1
  require "launchy"
2
+ require "uri"
2
3
 
3
4
  module Gemdiff
4
5
  class OutdatedGem
@@ -59,11 +60,11 @@ module Gemdiff
59
60
  end
60
61
 
61
62
  def releases_url
62
- "#{repo}/releases"
63
+ clean_url "#{repo}/releases"
63
64
  end
64
65
 
65
66
  def commits_url
66
- "#{repo}/commits/master"
67
+ clean_url "#{repo}/commits/master"
67
68
  end
68
69
 
69
70
  def compare_message
@@ -71,7 +72,7 @@ module Gemdiff
71
72
  end
72
73
 
73
74
  def compare_url
74
- "#{repo}/compare/#{compare_part}"
75
+ clean_url "#{repo}/compare/#{compare_part}"
75
76
  end
76
77
 
77
78
  def master
@@ -92,6 +93,12 @@ module Gemdiff
92
93
 
93
94
  private
94
95
 
96
+ def clean_url(url)
97
+ uri = URI.parse(url)
98
+ uri.path.gsub! %r{/+}, "/"
99
+ uri.to_s
100
+ end
101
+
95
102
  def open_url(url)
96
103
  Launchy.open(url) do |exception|
97
104
  $stderr.puts "Could not open #{url} because #{exception}"
@@ -1,3 +1,3 @@
1
1
  module Gemdiff
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tee Parham
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.6.6
151
+ rubygems_version: 2.6.4
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Find source repositories for ruby gems. Open, compare, and update outdated