git-external 0.1 → 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.
Files changed (2) hide show
  1. data/bin/git-external +13 -9
  2. metadata +4 -3
data/bin/git-external CHANGED
@@ -34,18 +34,22 @@ def print_configuration
34
34
  end
35
35
 
36
36
  def normalize_url(url)
37
- origin_url = `git config --get remote.origin.url`.chomp
37
+ if url =~ /^\./
38
+ origin_url = `git config --get remote.origin.url`.chomp
38
39
 
39
- unless origin_url =~ /^\w+:\/\//
40
- if origin_url =~ /^([^:\/]+):([^:]+)/
41
- origin_url = "ssh://#{$1}/#{$2}"
40
+ unless origin_url =~ /^\w+:\/\//
41
+ if origin_url =~ /^([^:\/]+):([^:]+)/
42
+ origin_url = "ssh://#{$1}/#{$2}"
43
+ end
42
44
  end
43
- end
44
45
 
45
- require 'uri'
46
- uri = URI.parse URI.encode origin_url
47
- uri.path = File.expand_path(url, uri.path)
48
- uri.to_s
46
+ require 'uri'
47
+ uri = URI.parse URI.encode origin_url
48
+ uri.path = File.expand_path(url, uri.path)
49
+ uri.to_s
50
+ else
51
+ url
52
+ end
49
53
  end
50
54
 
51
55
  def init_external(url, path)
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-external
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- version: "0.1"
9
+ - 1
10
+ version: 0.1.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Daniel Cestari
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-09-21 00:00:00 -04:30
18
+ date: 2010-09-27 00:00:00 -04:30
18
19
  default_executable:
19
20
  dependencies: []
20
21