convox_api_client 0.2.3 → 0.3.0
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/lib/convox_api_client/client.rb +7 -3
- data/lib/convox_api_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8805349429e488f69c859ffc7e1aa673b16745c6
|
|
4
|
+
data.tar.gz: da758b16faebcd995a83a8714a322324ff49cff1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b496d9c8b2ee5ca1a93054641500a9dbb673b8cbc792da0a79fccdf99f3f223b5d77c88d368a50e7ed8421be2f96cdcc65345998c673ea41a2e88261ae96ee5f
|
|
7
|
+
data.tar.gz: 041a53beb2a5d14f70893551aff3f28628c657f6f2279f39a3afb1bebfda0c7ba65006c6be5463523d82944bbe3fd5fdd98b6b15a5470447818892138ffc9a33
|
|
@@ -201,9 +201,7 @@ module Convox
|
|
|
201
201
|
def app_logs(app, rack: nil, wait_for: 5)
|
|
202
202
|
logs = []
|
|
203
203
|
EM.run {
|
|
204
|
-
|
|
205
|
-
ws_headers["Rack"] = rack if rack
|
|
206
|
-
ws = Faye::WebSocket::Client.new("wss://console.convox.com/apps/#{app}/logs", nil, {headers: ws_headers})
|
|
204
|
+
ws = app_logs_websocket(app, rack: rack)
|
|
207
205
|
|
|
208
206
|
ws.on :open do |event|
|
|
209
207
|
EventMachine.add_timer wait_for, proc { ws.close }
|
|
@@ -222,6 +220,12 @@ module Convox
|
|
|
222
220
|
logs
|
|
223
221
|
end
|
|
224
222
|
|
|
223
|
+
def app_logs_websocket(app, rack: nil)
|
|
224
|
+
ws_headers = authorization_headers
|
|
225
|
+
ws_headers["Rack"] = rack if rack
|
|
226
|
+
Faye::WebSocket::Client.new("wss://console.convox.com/apps/#{app}/logs", nil, {headers: ws_headers})
|
|
227
|
+
end
|
|
228
|
+
|
|
225
229
|
private
|
|
226
230
|
def parsed_response!(response)
|
|
227
231
|
raise "Error: #{response.code} #{response.body}" unless response.code == 200
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: convox_api_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- fw.matt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-03-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|