grenache-ruby-http 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/examples/worker.rb +2 -4
- data/grenache-ruby-http.gemspec +1 -1
- data/lib/grenache/http/version.rb +1 -1
- data/lib/grenache/http.rb +3 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4aa389881eb553dcf59c38c08460c4ef42698030
|
4
|
+
data.tar.gz: 7100d71941f95e6b3b110d9994f6bbe42bfecdc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bcaa4774ca194284d0d6f63e38830374f3943018eb42fd6d1994b07913841ca160c9da4f6c4f5dd96f5c9e4f20c2c470d43b7e02d87d63c529f51dc542f29d2
|
7
|
+
data.tar.gz: 63e9cc3e52e12fb7aeadbddb32d0cebd96c16406c160ca70acbfe916fb91e311e07c34b3b7c6d68bf764af1c895b7436a519c4bd4a4dfd1ff82adbe00c08360b
|
data/examples/worker.rb
CHANGED
@@ -11,10 +11,8 @@ EM.run do
|
|
11
11
|
|
12
12
|
c = Grenache::Http.new
|
13
13
|
|
14
|
-
c.listen('test', 5004) do |
|
15
|
-
|
16
|
-
req = Grenache::Message.parse(body)
|
17
|
-
"hello #{req.payload}"
|
14
|
+
c.listen('test', 5004) do |msg|
|
15
|
+
"hello #{msg.payload}"
|
18
16
|
end
|
19
17
|
|
20
18
|
end
|
data/grenache-ruby-http.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.add_runtime_dependency "eventmachine", "~> 1.2"
|
20
20
|
spec.add_runtime_dependency "faye-websocket", "~> 0.10"
|
21
|
-
spec.add_runtime_dependency "grenache-ruby-base", "0.1.
|
21
|
+
spec.add_runtime_dependency "grenache-ruby-base", "0.1.4"
|
22
22
|
spec.add_runtime_dependency "httparty", "~> 0.14.0"
|
23
23
|
spec.add_runtime_dependency "oj", "~> 2.17"
|
24
24
|
spec.add_runtime_dependency "thin", "~> 1.7"
|
data/lib/grenache/http.rb
CHANGED
@@ -12,8 +12,9 @@ module Grenache
|
|
12
12
|
def start_http_service(port, &block)
|
13
13
|
EM.defer {
|
14
14
|
app = -> (env) {
|
15
|
-
|
16
|
-
|
15
|
+
req = Message.parse(env['rack.input'].read)
|
16
|
+
resp = block.call(req)
|
17
|
+
[200,nil, Message.response_to(req,resp).to_json]
|
17
18
|
}
|
18
19
|
server = Thin::Server.start('0.0.0.0', port, app, {signals: false})
|
19
20
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grenache-ruby-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bitfinex <info@bitfinex.com>
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.4
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1.
|
54
|
+
version: 0.1.4
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: httparty
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|