escobar 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/escobar/heroku/pipeline.rb +22 -0
- data/lib/escobar/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: deb579b46df1fc1a57b83656957c548c0644b79b
|
4
|
+
data.tar.gz: cca2acd271b856cf8362819300773b0213751d1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d98fa606881aec71fd8c6cb1f755fb749a562dff5a6f33ab726f2096a1d8114773bbec02573a30d6e4bfb3e4728c937f3dd55435a9e995822e57600019843e52
|
7
|
+
data.tar.gz: 67fe03bc3a4102011e3041cb8f8a3ea81bc1cdf299469e004b082b14c62592787a1ca49b48ca58d3e7e8eb230056b1f69c559809079af79567b6224e84708c60
|
@@ -17,6 +17,14 @@ module Escobar
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
def repository
|
21
|
+
@repository ||= get("/pipelines/#{id}/repository")
|
22
|
+
end
|
23
|
+
|
24
|
+
def github_repository
|
25
|
+
repository["repository"] && repository["repository"]["name"]
|
26
|
+
end
|
27
|
+
|
20
28
|
def couplings
|
21
29
|
@couplings ||= couplings!
|
22
30
|
end
|
@@ -26,6 +34,20 @@ module Escobar
|
|
26
34
|
Escobar::Heroku::Coupling.new(client, coupling)
|
27
35
|
end
|
28
36
|
end
|
37
|
+
|
38
|
+
def get(path)
|
39
|
+
response = kolkrabbi.get do |request|
|
40
|
+
request.url path
|
41
|
+
request.headers["Content-Type"] = "application/json"
|
42
|
+
request.headers["Authorization"] = "Bearer #{client.token}"
|
43
|
+
end
|
44
|
+
|
45
|
+
JSON.parse(response.body)
|
46
|
+
end
|
47
|
+
|
48
|
+
def kolkrabbi
|
49
|
+
@kolkrabbi ||= Faraday.new(url: "https://#{ENV['KOLKRABBI_HOSTNAME']}")
|
50
|
+
end
|
29
51
|
end
|
30
52
|
end
|
31
53
|
end
|
data/lib/escobar/version.rb
CHANGED