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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5ed80c602b072611e2ca0c2d8da05fec6431d64
4
- data.tar.gz: 0df137d23312acc59a426a07992d5112b6a4e8bc
3
+ metadata.gz: 6b3d43e6812bc32a434a279518d89a59d798d140
4
+ data.tar.gz: 0d37023a8a661cfec183af4084fdb9cdda33ce7e
5
5
  SHA512:
6
- metadata.gz: 3a2c8b37a5b11200c5feadc75eab7d549eb99e678b9cddd4d591a9b4ca42e7d9fe84e3b482b36c8639df10fb38ed8e5d5aa2a72d69fb3adb8adb5a21b13246d6
7
- data.tar.gz: 0abbf5847bc10f09757c9e8ee158b266c5a9ef1fef08ea134a63a7e768e0343c9121c423d1449513e9b7c1dae58243700fc66a95a5dc91fc8fa83e557468025f
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: 125
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: true
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
- path = "/apps/#{app.name}/activity/builds/#{build['id']}"
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
- { app_id: app.name, build_id: build["id"], deployment_url: github_deployment["url"], name: name, repo: github_repository, sha: sha }
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 github_client
107
- @github_client ||= Escobar::GitHub::Client.new(client.github_token,
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
- github_client.create_deployment_status(url, payload)
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
@@ -1,3 +1,3 @@
1
1
  module Escobar
2
- VERSION = "0.1.22".freeze
2
+ VERSION = "0.1.23".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: escobar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.22
4
+ version: 0.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Donohoe