escobar 0.1.22 → 0.1.23
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 +4 -4
- data/.rubocop.yml +2 -2
- data/lib/escobar/heroku/pipeline.rb +17 -7
- 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: 6b3d43e6812bc32a434a279518d89a59d798d140
|
|
4
|
+
data.tar.gz: 0d37023a8a661cfec183af4084fdb9cdda33ce7e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a89dbcecddd2f400906e2df894f117522cf0ca7d770ec390000064b61d384993eef0781c5dab49ad2b2efcf4a0b254b2a793ed3bec816480da76a4ed28d5c0ce
|
|
7
|
+
data.tar.gz: c8f2693090b53beed81d91226ddbed7d85a9d80db16ed3963f5c33f436f11634a90d7e716cb2df3bb0808cfa78139d19610589ca9ee4a203c9c7d7c60aec671e
|
data/.rubocop.yml
CHANGED
|
@@ -42,7 +42,7 @@ Documentation:
|
|
|
42
42
|
- !ruby/regexp /spec\/*\/*/
|
|
43
43
|
|
|
44
44
|
ClassLength:
|
|
45
|
-
Max:
|
|
45
|
+
Max: 150
|
|
46
46
|
Exclude:
|
|
47
47
|
- !ruby/regexp /spec\/*\/*/
|
|
48
48
|
|
|
@@ -106,4 +106,4 @@ AllCops:
|
|
|
106
106
|
# By default, the rails cops are not run. Override in project or home
|
|
107
107
|
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
|
108
108
|
Rails:
|
|
109
|
-
Enabled:
|
|
109
|
+
Enabled: false
|
|
@@ -77,11 +77,17 @@ module Escobar
|
|
|
77
77
|
create_github_deployment_status(github_deployment["url"], nil, "failure", description)
|
|
78
78
|
return({ error: build["message"] })
|
|
79
79
|
when Escobar::Heroku::BuildRequestSuccess
|
|
80
|
-
|
|
81
|
-
target_url = "https://dashboard.heroku.com#{path}"
|
|
80
|
+
target_url = "https://dashboard.heroku.com/apps/#{app.name}/activity/builds/#{build['id']}"
|
|
82
81
|
|
|
83
82
|
create_github_deployment_status(github_deployment["url"], target_url, "pending", "Build running..")
|
|
84
|
-
{
|
|
83
|
+
{
|
|
84
|
+
sha: sha,
|
|
85
|
+
name: name,
|
|
86
|
+
repo: github_repository,
|
|
87
|
+
app_id: app.name,
|
|
88
|
+
build_id: build["id"],
|
|
89
|
+
deployment_url: github_deployment["url"]
|
|
90
|
+
}
|
|
85
91
|
else
|
|
86
92
|
return({ error: "Unable to create heroku build for #{name}" })
|
|
87
93
|
end
|
|
@@ -103,9 +109,8 @@ module Escobar
|
|
|
103
109
|
@kolkrabbi ||= Faraday.new(url: "https://#{ENV['KOLKRABBI_HOSTNAME']}")
|
|
104
110
|
end
|
|
105
111
|
|
|
106
|
-
def
|
|
107
|
-
|
|
108
|
-
github_repository)
|
|
112
|
+
def create_deployment_status(url, payload)
|
|
113
|
+
github_client.create_deployment_status(url, payload)
|
|
109
114
|
end
|
|
110
115
|
|
|
111
116
|
private
|
|
@@ -136,7 +141,7 @@ module Escobar
|
|
|
136
141
|
target_url: target_url,
|
|
137
142
|
description: description
|
|
138
143
|
}
|
|
139
|
-
|
|
144
|
+
create_deployment_status(url, payload)
|
|
140
145
|
end
|
|
141
146
|
|
|
142
147
|
def create_heroku_build(app_name, sha)
|
|
@@ -149,6 +154,11 @@ module Escobar
|
|
|
149
154
|
}
|
|
150
155
|
client.heroku.post("/apps/#{app_name}/builds", body)
|
|
151
156
|
end
|
|
157
|
+
|
|
158
|
+
def github_client
|
|
159
|
+
@github_client ||= Escobar::GitHub::Client.new(client.github_token,
|
|
160
|
+
github_repository)
|
|
161
|
+
end
|
|
152
162
|
end
|
|
153
163
|
end
|
|
154
164
|
end
|
data/lib/escobar/version.rb
CHANGED