ghdeploy 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ghdeploy/repo_fact_finder.rb +17 -1
- data/lib/ghdeploy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dadb9420430dcae2f0cc8133b3bb6bbb2edee6ec
|
4
|
+
data.tar.gz: 3b86db8ffafb3ff212c568d2fa7cbcf01b54dc02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a98a70e8bd44e37ab36f55e83f08820645de96551f46a795e0a20e75639467e6a637a532d3c293cf7f79f389d510eaf2a22cc0a04e1fc64bdff2c431a2690208
|
7
|
+
data.tar.gz: ba3242b91dfbffcc2045319663f250e308ee1955bf9c39065d1d7487783d18f61d00c9dd1bd508fe8a4c2cbcb01f3b2f4802a34c679070e55bc854b764079b81
|
data/Gemfile.lock
CHANGED
@@ -12,7 +12,7 @@ class RepoFactFinder
|
|
12
12
|
|
13
13
|
def host
|
14
14
|
return @host if @host
|
15
|
-
url =
|
15
|
+
url = remote.url
|
16
16
|
if url.start_with?('http')
|
17
17
|
matches = URL_PATTERN.match(url)
|
18
18
|
@host = "#{matches[2]}://api.#{matches[3]}"
|
@@ -21,4 +21,20 @@ class RepoFactFinder
|
|
21
21
|
@host = "https://api.#{host}"
|
22
22
|
end
|
23
23
|
end
|
24
|
+
|
25
|
+
def repo
|
26
|
+
return @repo if @repo
|
27
|
+
repo = url.split(/\/|:/).last(2).join('/')
|
28
|
+
@repo = repo.gsub(/(\.git)$/, '')
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def url
|
34
|
+
remote.url
|
35
|
+
end
|
36
|
+
|
37
|
+
def remote
|
38
|
+
@remote ||= Git.open('./').remotes.find { |r| r.name == remote_name }
|
39
|
+
end
|
24
40
|
end
|
data/lib/ghdeploy/version.rb
CHANGED