forward 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/forward/api/tunnel.rb +11 -1
- data/lib/forward/request.rb +2 -0
- data/lib/forward/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: 2f61584fb7654c30ab1e866238561d0b16eb6506
|
4
|
+
data.tar.gz: fe159526e1485d493cbc2edc66959b7fc51424a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61e82910fd382275005dae7a6919657fcc8bd5c0351ac65c4e4578759b2dadb39a2ea57c3a47f6259b6c6a9a8153c53f0acec4f164af9d64802ab394bedede79
|
7
|
+
data.tar.gz: 02d6335a4b19f48acdca490cde4d96c7c424bc2e52d4351cc0e17e8acb424aeaba63892fd7a929c4f200817967c58704ac0f0a81948828c783d3a942e3990224
|
data/lib/forward/api/tunnel.rb
CHANGED
@@ -48,7 +48,17 @@ module Forward
|
|
48
48
|
|
49
49
|
case response[:type]
|
50
50
|
when 'invalid_request_error'
|
51
|
-
|
51
|
+
message = 'Invalid tunnel parameters'
|
52
|
+
|
53
|
+
if response.has_key?(:errors)
|
54
|
+
message << ":\n"
|
55
|
+
|
56
|
+
response[:errors].each { |field, errors| message << " - #{field} #{errors.join(', and ')}\n" }
|
57
|
+
else
|
58
|
+
message << ", run `forward --help' for usage help or contact us at #{SUPPORT_EMAIL}"
|
59
|
+
end
|
60
|
+
|
61
|
+
exit_with_error(message)
|
52
62
|
when 'account_error'
|
53
63
|
exit_with_error response[:errors][:account].first
|
54
64
|
else
|
data/lib/forward/request.rb
CHANGED
@@ -44,6 +44,8 @@ module Forward
|
|
44
44
|
http = EM::HttpRequest.new(url).send(method.downcase, options)
|
45
45
|
|
46
46
|
http.headers { |header|
|
47
|
+
# It's no longer gzipped, clear it
|
48
|
+
header.raw.delete('Content-Encoding') if header.raw.has_key?('Content-Encoding')
|
47
49
|
tunnel.socket.send(type: 'response:start', data: { id: id, headers: header.raw, status: header.status })
|
48
50
|
}
|
49
51
|
|
data/lib/forward/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forward
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Dunn
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: slop
|