gem_updater 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
  SHA1:
3
- metadata.gz: d74c7bdd8dc7f1c7e094ebd39799b81cc02cb2f6
4
- data.tar.gz: 4e70bca51c3e4cacd682fe8a161e13b740d11b27
3
+ metadata.gz: 505e92648ca0861f5bde730425453fc01a85a05f
4
+ data.tar.gz: 92a22b253e5ae12797fdf114d7d2f04ebb2a7cdc
5
5
  SHA512:
6
- metadata.gz: ba0e9ff0961d9ab3b5ca31d8f0da628a2a57cc6c50c2f87396f99eae6bf303e8b319e79e398a2763d2e88f1fc1652df0fc1c7540aa0d2073d0c04bacc9d1ce29
7
- data.tar.gz: dee0f2a9d35a6ae04465883d370326a8f232b499396fcba8632a4cc9f26c66a5afb898259adc66ef38a7fa01f5872d769f270a3f7f86bea55e43a1ecc3ef6107
6
+ metadata.gz: 76367751f652c124f1e34e371c2812892026951b8ebfc03c779e3a6e9656bb807bf2fa96fad830c0ddac53d604cac9496ad10ca2a3918ee5894f5f7df413ab9f
7
+ data.tar.gz: 8e94d2b48a6fa7037878edf8f32eea921686bc7e5e683b61326f505f89d101f5c5fea5bdcbfeb932af22c542f116c08659b4079238fc665f359d055310b9a150
@@ -38,8 +38,14 @@ module GemUpdater
38
38
  # @return [URI] valid URI
39
39
  def correct_uri( url )
40
40
  uri = URI( url )
41
- if uri.host.match( 'github.com' ) && uri.scheme == 'http'
42
- uri = URI "https://github.com#{uri.path}"
41
+ if uri.scheme == 'http'
42
+ case
43
+ when uri.host.match( 'github.com' )
44
+ # remove possible subdomain like 'wiki.github.com'
45
+ uri = URI "https://github.com#{uri.path}"
46
+ when uri.host.match( 'bitbucket.org' )
47
+ uri = URI "https://#{uri.host}#{uri.path}"
48
+ end
43
49
  end
44
50
 
45
51
  uri
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_updater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime Demolin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-12 00:00:00.000000000 Z
11
+ date: 2015-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler