beetle_joevandyk_extensions 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -17,16 +17,11 @@ module BeetleJoevandykExtensions
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
def listen name,
|
20
|
+
def listen name, &block
|
21
21
|
client = Beetle::Client.new
|
22
22
|
client.register_queue name
|
23
|
-
client.register_handler name
|
24
|
-
|
25
|
-
if klass
|
26
|
-
klass.call(json).to_json
|
27
|
-
else
|
28
|
-
block.call(json).to_json
|
29
|
-
end
|
23
|
+
client.register_handler name do |input|
|
24
|
+
block.call(JSON.parse(input.data)).to_json
|
30
25
|
end
|
31
26
|
client.listen do
|
32
27
|
puts "Started #{ name } at #{ Time.now }"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beetle_joevandyk_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-07-
|
12
|
+
date: 2011-07-18 00:00:00.000000000 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: beetle
|
17
|
-
requirement: &
|
17
|
+
requirement: &2157371420 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2157371420
|
26
26
|
description: Extensions to Beetle
|
27
27
|
email:
|
28
28
|
- joe@fixieconsulting.com
|