cloudist 0.2.1 → 0.4.1
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.
- data/Gemfile +15 -11
- data/Gemfile.lock +20 -7
- data/README.md +61 -39
- data/VERSION +1 -1
- data/cloudist.gemspec +50 -16
- data/examples/amqp/Gemfile +3 -0
- data/examples/amqp/Gemfile.lock +12 -0
- data/examples/amqp/amqp_consumer.rb +56 -0
- data/examples/amqp/amqp_publisher.rb +50 -0
- data/examples/queue_message.rb +7 -7
- data/examples/sandwich_client_with_custom_listener.rb +77 -0
- data/examples/sandwich_worker_with_class.rb +22 -7
- data/lib/cloudist.rb +113 -56
- data/lib/cloudist/application.rb +60 -0
- data/lib/cloudist/core_ext/class.rb +139 -0
- data/lib/cloudist/core_ext/kernel.rb +13 -0
- data/lib/cloudist/core_ext/module.rb +11 -0
- data/lib/cloudist/encoding.rb +13 -0
- data/lib/cloudist/errors.rb +2 -0
- data/lib/cloudist/job.rb +21 -18
- data/lib/cloudist/listener.rb +108 -54
- data/lib/cloudist/message.rb +97 -0
- data/lib/cloudist/messaging.rb +29 -0
- data/lib/cloudist/payload.rb +45 -105
- data/lib/cloudist/payload_old.rb +155 -0
- data/lib/cloudist/publisher.rb +7 -2
- data/lib/cloudist/queue.rb +152 -0
- data/lib/cloudist/queues/basic_queue.rb +83 -53
- data/lib/cloudist/queues/job_queue.rb +13 -24
- data/lib/cloudist/queues/reply_queue.rb +13 -21
- data/lib/cloudist/request.rb +33 -7
- data/lib/cloudist/worker.rb +9 -2
- data/lib/cloudist_old.rb +300 -0
- data/lib/em/em_timer_utils.rb +55 -0
- data/lib/em/iterator.rb +27 -0
- data/spec/cloudist/message_spec.rb +91 -0
- data/spec/cloudist/messaging_spec.rb +19 -0
- data/spec/cloudist/payload_spec.rb +10 -4
- data/spec/cloudist/payload_spec_2_spec.rb +78 -0
- data/spec/cloudist/queue_spec.rb +16 -0
- data/spec/cloudist_spec.rb +49 -45
- data/spec/spec_helper.rb +0 -1
- data/spec/support/amqp.rb +16 -0
- metadata +112 -102
- data/examples/extending_values.rb +0 -44
- data/examples/sandwich_client.rb +0 -57
- data/lib/cloudist/callback.rb +0 -16
- data/lib/cloudist/callback_methods.rb +0 -19
- data/lib/cloudist/callbacks/error_callback.rb +0 -14
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
2
|
+
|
3
|
+
describe Cloudist::Messaging do
|
4
|
+
|
5
|
+
it "should add queue to queues list" do
|
6
|
+
queue = mock("Cloudist::Queue")
|
7
|
+
queue.stubs(:name).returns("test.queue")
|
8
|
+
Cloudist::Messaging.add_queue(queue)
|
9
|
+
Cloudist::Messaging.active_queues.keys.should include('test.queue')
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should be able to remove queues from list" do
|
13
|
+
queue = mock("Cloudist::Queue")
|
14
|
+
queue.stubs(:name).returns("test.queue")
|
15
|
+
Cloudist::Messaging.add_queue(queue).keys.should == ['test.queue']
|
16
|
+
Cloudist::Messaging.remove_queue('test.queue').keys.should == []
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -65,7 +65,7 @@ describe Cloudist::Payload do
|
|
65
65
|
|
66
66
|
it "should format payload for sending" do
|
67
67
|
payload = Cloudist::Payload.new({:bread => 'white'}, {:event_hash => 'foo', :message_type => 'reply'})
|
68
|
-
body, popts = payload.
|
68
|
+
body, popts = payload.to_a
|
69
69
|
headers = popts[:headers]
|
70
70
|
|
71
71
|
body.should == Marshal.dump({:bread => 'white'})
|
@@ -104,10 +104,10 @@ describe Cloudist::Payload do
|
|
104
104
|
payload.headers[:reply_to].should be_nil
|
105
105
|
payload.set_reply_to("my_custom_queue")
|
106
106
|
payload.headers[:reply_to].should_not be_nil
|
107
|
-
payload.headers[:reply_to].should match /^temp\.reply\.my_custom_queue
|
108
|
-
body,
|
107
|
+
payload.headers[:reply_to].should match /^temp\.reply\.my_custom_queue/
|
108
|
+
body, popts = payload.to_a
|
109
|
+
headers = popts[:headers]
|
109
110
|
headers[:reply_to].should == payload.headers[:reply_to]
|
110
|
-
|
111
111
|
end
|
112
112
|
|
113
113
|
it "should not overwrite passed in headers" do
|
@@ -128,4 +128,10 @@ describe Cloudist::Payload do
|
|
128
128
|
payload = Cloudist::Payload.new(e, {:message_type => 'error'})
|
129
129
|
end
|
130
130
|
|
131
|
+
it "should be able to query payload keys with key?" do
|
132
|
+
payload = Cloudist::Payload.new({:bread => 'white'}, {:ttl => 25, :event_hash => 'foo', :published_on => 12345, :message_id => 1})
|
133
|
+
payload.bread?.should be_true
|
134
|
+
payload.cheese?.should be_false
|
135
|
+
end
|
136
|
+
|
131
137
|
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '../../spec_helper')
|
2
|
+
|
3
|
+
describe Cloudist::Payload do
|
4
|
+
include Cloudist::Encoding
|
5
|
+
|
6
|
+
it "should accept a hash for data" do
|
7
|
+
pl = Cloudist::Payload.new({:bread => 'white'})
|
8
|
+
pl.body.bread.should == "white"
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should accept encoded message" do
|
12
|
+
pl = Cloudist::Payload.new(encode({:bread => 'white'}))
|
13
|
+
pl.body.bread.should == "white"
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should retrieve id from headers" do
|
17
|
+
pl = Cloudist::Payload.new({:bread => 'white'}, {:message_id => "12345"})
|
18
|
+
pl.id.should == "12345"
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should prepare headers" do
|
22
|
+
payload = Cloudist::Payload.new({:bread => 'white'})
|
23
|
+
payload.body.bread.should == "white"
|
24
|
+
payload.headers.has_key?("ttl").should be_true
|
25
|
+
# payload.headers.has_key?(:content_type).should be_true
|
26
|
+
# payload.headers[:content_type].should == "application/json"
|
27
|
+
payload.headers.has_key?("published_on").should be_true
|
28
|
+
payload.headers.has_key?("message_id").should be_true
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should extract published_on from data" do
|
32
|
+
time = Time.now.to_f
|
33
|
+
payload = Cloudist::Payload.new({:bread => 'white', :timestamp => time})
|
34
|
+
payload.headers[:published_on].should == time
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should not override timestamp if already present in headers" do
|
38
|
+
time = (Time.now.to_f - 10.0)
|
39
|
+
payload = Cloudist::Payload.new({:bread => 'white'}, {:published_on => time})
|
40
|
+
payload.headers[:published_on].should == time
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should override timestamp if not present" do
|
44
|
+
payload = Cloudist::Payload.new({:bread => 'white'})
|
45
|
+
payload.headers[:published_on].should be_within(0.1).of Time.now.to_f
|
46
|
+
payload.timestamp.should be_within(0.1).of Time.now.to_f
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should parse custom headers" do
|
50
|
+
payload = Cloudist::Payload.new(Marshal.dump({:bread => 'white'}), {:published_on => 12345, :message_id => "foo"})
|
51
|
+
payload.headers.to_hash.should == { "published_on"=>12345, "message_id"=>"foo", "ttl"=>300 }
|
52
|
+
end
|
53
|
+
|
54
|
+
it "should create a unique event hash" do
|
55
|
+
payload = Cloudist::Payload.new({:bread => 'white'})
|
56
|
+
payload.id.size.should == 36
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should not create a new message_id unless it doesn't have one" do
|
60
|
+
payload = Cloudist::Payload.new({:bread => 'white'})
|
61
|
+
payload.id.size.should == 36
|
62
|
+
payload = Cloudist::Payload.new({:bread => 'white'}, {:message_id => 'foo'})
|
63
|
+
payload.id.should == 'foo'
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should format payload for sending" do
|
67
|
+
payload = Cloudist::Payload.new({:bread => 'white'}, {:message_id => 'foo', :message_type => 'reply'})
|
68
|
+
body, popts = payload.to_a
|
69
|
+
headers = popts[:headers]
|
70
|
+
|
71
|
+
body.should == encode(Hashie::Mash.new({:bread => 'white'}))
|
72
|
+
headers[:ttl].should == "300"
|
73
|
+
headers[:message_type].should == 'reply'
|
74
|
+
end
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
2
|
+
|
3
|
+
describe Cloudist::Queue do
|
4
|
+
before(:each) do
|
5
|
+
stub_amqp!
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should cache new queues" do
|
9
|
+
q1 = Cloudist::Queue.new("test.queue")
|
10
|
+
q2 = Cloudist::Queue.new("test.queue")
|
11
|
+
|
12
|
+
# q1.cached_queues.should == {}
|
13
|
+
q1.q.should == q2.q
|
14
|
+
Cloudist::Queue.cached_queues.should == {}
|
15
|
+
end
|
16
|
+
end
|
data/spec/cloudist_spec.rb
CHANGED
@@ -1,55 +1,59 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
2
|
require "moqueue"
|
3
3
|
|
4
|
-
class SandwichWorker < Cloudist::Worker
|
5
|
-
def process
|
6
|
-
Cloudist.log.info(job.data.inspect)
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
4
|
describe "Cloudist" do
|
11
|
-
|
12
5
|
before(:each) do
|
13
|
-
|
14
|
-
reset_broker
|
15
|
-
Cloudist.remove_workers
|
16
|
-
|
17
|
-
@mq = mock("MQ")
|
18
|
-
@queue, @exchange = mock_queue_and_exchange('make.sandwich')
|
19
|
-
|
20
|
-
@qobj = Cloudist::JobQueue.any_instance
|
21
|
-
@qobj.stubs(:q).returns(@queue)
|
22
|
-
@qobj.stubs(:mq).returns(@mq)
|
23
|
-
@qobj.stubs(:ex).returns(@exchange)
|
24
|
-
@qobj.stubs(:setup)
|
6
|
+
stub_amqp!
|
25
7
|
end
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
Cloudist.
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
it "should support handle syntax" do
|
34
|
-
Cloudist.workers.should == {}
|
35
|
-
Cloudist.handle('make.sandwich').with(SandwichWorker)
|
36
|
-
Cloudist.workers.should have_key("make.sandwich")
|
37
|
-
Cloudist.workers["make.sandwich"].size.should == 1
|
8
|
+
it "should start an AMQP instance" do
|
9
|
+
AMQP.expects(:start).once
|
10
|
+
|
11
|
+
Cloudist.start do
|
12
|
+
|
13
|
+
end
|
38
14
|
end
|
39
15
|
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
end
|
16
|
+
# before(:each) do
|
17
|
+
# overload_amqp
|
18
|
+
# reset_broker
|
19
|
+
# Cloudist.remove_workers
|
20
|
+
#
|
21
|
+
# @mq = mock("MQ")
|
22
|
+
# @queue, @exchange = mock_queue_and_exchange('make.sandwich')
|
23
|
+
#
|
24
|
+
# @qobj = Cloudist::JobQueue.any_instance
|
25
|
+
# @qobj.stubs(:q).returns(@queue)
|
26
|
+
# @qobj.stubs(:mq).returns(@mq)
|
27
|
+
# @qobj.stubs(:ex).returns(@exchange)
|
28
|
+
# @qobj.stubs(:setup)
|
29
|
+
# end
|
30
|
+
#
|
31
|
+
# it "should register a worker" do
|
32
|
+
# Cloudist.register_worker('make.sandwich', SandwichWorker)
|
33
|
+
# Cloudist.workers.should have_key("make.sandwich")
|
34
|
+
# Cloudist.workers["make.sandwich"].size.should == 1
|
35
|
+
# end
|
36
|
+
#
|
37
|
+
# it "should support handle syntax" do
|
38
|
+
# Cloudist.workers.should == {}
|
39
|
+
# Cloudist.handle('make.sandwich').with(SandwichWorker)
|
40
|
+
# Cloudist.workers.should have_key("make.sandwich")
|
41
|
+
# Cloudist.workers["make.sandwich"].size.should == 1
|
42
|
+
# end
|
43
|
+
#
|
44
|
+
# # it "should support handle syntax with multiple queues" do
|
45
|
+
# # Cloudist.workers.should == {}
|
46
|
+
# # Cloudist.handle('make.sandwich', 'eat.sandwich').with(SandwichWorker)
|
47
|
+
# # # Cloudist.workers.should == {"make.sandwich"=>[SandwichWorker], "eat.sandwich"=>[SandwichWorker]}
|
48
|
+
# # end
|
49
|
+
#
|
50
|
+
# it "should call process on worker when job arrives" do
|
51
|
+
# job = Cloudist.enqueue('make.sandwich', {:bread => 'white'})
|
52
|
+
# job.payload.published?.should be_true
|
53
|
+
# SandwichWorker.any_instance.expects(:process)
|
54
|
+
# Cloudist.handle('make.sandwich').with(SandwichWorker)
|
55
|
+
# Cloudist.workers.should have_key("make.sandwich")
|
56
|
+
# Cloudist.workers["make.sandwich"].size.should == 1
|
57
|
+
# end
|
54
58
|
|
55
59
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
def stub_amqp!
|
2
|
+
AMQP.stubs(:start)
|
3
|
+
mock_queue = mock("AMQP::Queue")
|
4
|
+
mock_queue.stubs(:bind)
|
5
|
+
mock_queue.stubs(:name).returns("test.queue")
|
6
|
+
|
7
|
+
mock_ex = mock("AMQP::Exchange")
|
8
|
+
mock_ex.stubs(:name).returns("test.queue")
|
9
|
+
|
10
|
+
mock_channel = mock("AMQP::Channel")
|
11
|
+
mock_channel.stubs(:prefetch).with(1)
|
12
|
+
mock_channel.stubs(:queue).returns(mock_queue)
|
13
|
+
mock_channel.stubs(:direct).returns(mock_ex)
|
14
|
+
|
15
|
+
AMQP::Channel.stubs(:new).returns(mock_channel)
|
16
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 1
|
10
|
-
version: 0.2.1
|
4
|
+
prerelease:
|
5
|
+
version: 0.4.1
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Ivan Vanderbyl
|
@@ -15,179 +10,174 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2011-
|
13
|
+
date: 2011-05-23 00:00:00 +10:00
|
19
14
|
default_executable:
|
20
15
|
dependencies:
|
21
16
|
- !ruby/object:Gem::Dependency
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
17
|
name: amqp
|
25
|
-
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
19
|
none: false
|
27
20
|
requirements:
|
28
21
|
- - ~>
|
29
22
|
- !ruby/object:Gem::Version
|
30
|
-
|
31
|
-
segments:
|
32
|
-
- 0
|
33
|
-
- 6
|
34
|
-
- 7
|
35
|
-
version: 0.6.7
|
36
|
-
requirement: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
23
|
+
version: 0.8.0.rc12
|
38
24
|
type: :runtime
|
39
25
|
prerelease: false
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
40
28
|
name: json
|
41
|
-
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
30
|
none: false
|
43
31
|
requirements:
|
44
32
|
- - ~>
|
45
33
|
- !ruby/object:Gem::Version
|
46
|
-
hash: 11
|
47
|
-
segments:
|
48
|
-
- 1
|
49
|
-
- 4
|
50
|
-
- 6
|
51
34
|
version: 1.4.6
|
52
|
-
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: *id002
|
53
38
|
- !ruby/object:Gem::Dependency
|
39
|
+
name: i18n
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: "0"
|
54
46
|
type: :runtime
|
55
47
|
prerelease: false
|
48
|
+
version_requirements: *id003
|
49
|
+
- !ruby/object:Gem::Dependency
|
56
50
|
name: activesupport
|
57
|
-
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
58
52
|
none: false
|
59
53
|
requirements:
|
60
54
|
- - ~>
|
61
55
|
- !ruby/object:Gem::Version
|
62
|
-
hash: 1
|
63
|
-
segments:
|
64
|
-
- 3
|
65
|
-
- 0
|
66
|
-
- 3
|
67
56
|
version: 3.0.3
|
68
|
-
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: *id004
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: hashie
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: "0"
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: uuid
|
73
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
type: :runtime
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: *id006
|
69
82
|
- !ruby/object:Gem::Dependency
|
83
|
+
name: rake
|
84
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.8.7
|
70
90
|
type: :development
|
71
91
|
prerelease: false
|
92
|
+
version_requirements: *id007
|
93
|
+
- !ruby/object:Gem::Dependency
|
72
94
|
name: rspec
|
73
|
-
|
95
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
74
96
|
none: false
|
75
97
|
requirements:
|
76
98
|
- - ~>
|
77
99
|
- !ruby/object:Gem::Version
|
78
|
-
hash: 3
|
79
|
-
segments:
|
80
|
-
- 2
|
81
|
-
- 3
|
82
|
-
- 0
|
83
100
|
version: 2.3.0
|
84
|
-
requirement: *id004
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
101
|
type: :development
|
87
102
|
prerelease: false
|
103
|
+
version_requirements: *id008
|
104
|
+
- !ruby/object:Gem::Dependency
|
88
105
|
name: moqueue
|
89
|
-
|
106
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
90
107
|
none: false
|
91
108
|
requirements:
|
92
109
|
- - ">="
|
93
110
|
- !ruby/object:Gem::Version
|
94
|
-
hash: 3
|
95
|
-
segments:
|
96
|
-
- 0
|
97
111
|
version: "0"
|
98
|
-
requirement: *id005
|
99
|
-
- !ruby/object:Gem::Dependency
|
100
112
|
type: :development
|
101
113
|
prerelease: false
|
114
|
+
version_requirements: *id009
|
115
|
+
- !ruby/object:Gem::Dependency
|
102
116
|
name: mocha
|
103
|
-
|
117
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
104
118
|
none: false
|
105
119
|
requirements:
|
106
120
|
- - ">="
|
107
121
|
- !ruby/object:Gem::Version
|
108
|
-
hash: 3
|
109
|
-
segments:
|
110
|
-
- 0
|
111
122
|
version: "0"
|
112
|
-
requirement: *id006
|
113
|
-
- !ruby/object:Gem::Dependency
|
114
123
|
type: :development
|
115
124
|
prerelease: false
|
125
|
+
version_requirements: *id010
|
126
|
+
- !ruby/object:Gem::Dependency
|
116
127
|
name: bundler
|
117
|
-
|
128
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
118
129
|
none: false
|
119
130
|
requirements:
|
120
131
|
- - ~>
|
121
132
|
- !ruby/object:Gem::Version
|
122
|
-
hash: 23
|
123
|
-
segments:
|
124
|
-
- 1
|
125
|
-
- 0
|
126
|
-
- 0
|
127
133
|
version: 1.0.0
|
128
|
-
requirement: *id007
|
129
|
-
- !ruby/object:Gem::Dependency
|
130
134
|
type: :development
|
131
135
|
prerelease: false
|
136
|
+
version_requirements: *id011
|
137
|
+
- !ruby/object:Gem::Dependency
|
132
138
|
name: jeweler
|
133
|
-
|
139
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
134
140
|
none: false
|
135
141
|
requirements:
|
136
142
|
- - ~>
|
137
143
|
- !ruby/object:Gem::Version
|
138
|
-
hash: 7
|
139
|
-
segments:
|
140
|
-
- 1
|
141
|
-
- 5
|
142
|
-
- 2
|
143
144
|
version: 1.5.2
|
144
|
-
requirement: *id008
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
145
|
type: :development
|
147
146
|
prerelease: false
|
147
|
+
version_requirements: *id012
|
148
|
+
- !ruby/object:Gem::Dependency
|
148
149
|
name: rcov
|
149
|
-
|
150
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
150
151
|
none: false
|
151
152
|
requirements:
|
152
153
|
- - ">="
|
153
154
|
- !ruby/object:Gem::Version
|
154
|
-
hash: 3
|
155
|
-
segments:
|
156
|
-
- 0
|
157
155
|
version: "0"
|
158
|
-
requirement: *id009
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
156
|
type: :development
|
161
157
|
prerelease: false
|
158
|
+
version_requirements: *id013
|
159
|
+
- !ruby/object:Gem::Dependency
|
162
160
|
name: reek
|
163
|
-
|
161
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
164
162
|
none: false
|
165
163
|
requirements:
|
166
164
|
- - ~>
|
167
165
|
- !ruby/object:Gem::Version
|
168
|
-
hash: 15
|
169
|
-
segments:
|
170
|
-
- 1
|
171
|
-
- 2
|
172
|
-
- 8
|
173
166
|
version: 1.2.8
|
174
|
-
requirement: *id010
|
175
|
-
- !ruby/object:Gem::Dependency
|
176
167
|
type: :development
|
177
168
|
prerelease: false
|
169
|
+
version_requirements: *id014
|
170
|
+
- !ruby/object:Gem::Dependency
|
178
171
|
name: roodi
|
179
|
-
|
172
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
180
173
|
none: false
|
181
174
|
requirements:
|
182
175
|
- - ~>
|
183
176
|
- !ruby/object:Gem::Version
|
184
|
-
hash: 11
|
185
|
-
segments:
|
186
|
-
- 2
|
187
|
-
- 1
|
188
|
-
- 0
|
189
177
|
version: 2.1.0
|
190
|
-
|
178
|
+
type: :development
|
179
|
+
prerelease: false
|
180
|
+
version_requirements: *id015
|
191
181
|
description: Cloudist is a simple, highly scalable job queue for Ruby applications, it can run within Rails, DaemonKit or your own custom application. Refer to github page for examples
|
192
182
|
email: ivanvanderbyl@me.com
|
193
183
|
executables: []
|
@@ -207,36 +197,53 @@ files:
|
|
207
197
|
- Rakefile
|
208
198
|
- VERSION
|
209
199
|
- cloudist.gemspec
|
210
|
-
- examples/
|
200
|
+
- examples/amqp/Gemfile
|
201
|
+
- examples/amqp/Gemfile.lock
|
202
|
+
- examples/amqp/amqp_consumer.rb
|
203
|
+
- examples/amqp/amqp_publisher.rb
|
211
204
|
- examples/queue_message.rb
|
212
|
-
- examples/
|
205
|
+
- examples/sandwich_client_with_custom_listener.rb
|
213
206
|
- examples/sandwich_worker.rb
|
214
207
|
- examples/sandwich_worker_with_class.rb
|
215
208
|
- lib/cloudist.rb
|
216
|
-
- lib/cloudist/
|
217
|
-
- lib/cloudist/
|
218
|
-
- lib/cloudist/
|
209
|
+
- lib/cloudist/application.rb
|
210
|
+
- lib/cloudist/core_ext/class.rb
|
211
|
+
- lib/cloudist/core_ext/kernel.rb
|
212
|
+
- lib/cloudist/core_ext/module.rb
|
219
213
|
- lib/cloudist/core_ext/object.rb
|
220
214
|
- lib/cloudist/core_ext/string.rb
|
215
|
+
- lib/cloudist/encoding.rb
|
221
216
|
- lib/cloudist/errors.rb
|
222
217
|
- lib/cloudist/job.rb
|
223
218
|
- lib/cloudist/listener.rb
|
219
|
+
- lib/cloudist/message.rb
|
220
|
+
- lib/cloudist/messaging.rb
|
224
221
|
- lib/cloudist/payload.rb
|
222
|
+
- lib/cloudist/payload_old.rb
|
225
223
|
- lib/cloudist/publisher.rb
|
224
|
+
- lib/cloudist/queue.rb
|
226
225
|
- lib/cloudist/queues/basic_queue.rb
|
227
226
|
- lib/cloudist/queues/job_queue.rb
|
228
227
|
- lib/cloudist/queues/reply_queue.rb
|
229
228
|
- lib/cloudist/request.rb
|
230
229
|
- lib/cloudist/utils.rb
|
231
230
|
- lib/cloudist/worker.rb
|
231
|
+
- lib/cloudist_old.rb
|
232
|
+
- lib/em/em_timer_utils.rb
|
233
|
+
- lib/em/iterator.rb
|
232
234
|
- spec/cloudist/basic_queue_spec.rb
|
233
235
|
- spec/cloudist/job_spec.rb
|
236
|
+
- spec/cloudist/message_spec.rb
|
237
|
+
- spec/cloudist/messaging_spec.rb
|
234
238
|
- spec/cloudist/payload_spec.rb
|
239
|
+
- spec/cloudist/payload_spec_2_spec.rb
|
240
|
+
- spec/cloudist/queue_spec.rb
|
235
241
|
- spec/cloudist/request_spec.rb
|
236
242
|
- spec/cloudist/utils_spec.rb
|
237
243
|
- spec/cloudist_spec.rb
|
238
244
|
- spec/core_ext/string_spec.rb
|
239
245
|
- spec/spec_helper.rb
|
246
|
+
- spec/support/amqp.rb
|
240
247
|
has_rdoc: true
|
241
248
|
homepage: http://github.com/ivanvanderbyl/cloudist
|
242
249
|
licenses:
|
@@ -251,7 +258,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
251
258
|
requirements:
|
252
259
|
- - ">="
|
253
260
|
- !ruby/object:Gem::Version
|
254
|
-
hash:
|
261
|
+
hash: 599422849760493927
|
255
262
|
segments:
|
256
263
|
- 0
|
257
264
|
version: "0"
|
@@ -260,28 +267,31 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
267
|
requirements:
|
261
268
|
- - ">="
|
262
269
|
- !ruby/object:Gem::Version
|
263
|
-
hash: 3
|
264
|
-
segments:
|
265
|
-
- 0
|
266
270
|
version: "0"
|
267
271
|
requirements: []
|
268
272
|
|
269
273
|
rubyforge_project:
|
270
|
-
rubygems_version: 1.
|
274
|
+
rubygems_version: 1.6.2
|
271
275
|
signing_key:
|
272
276
|
specification_version: 3
|
273
277
|
summary: Super fast job queue using AMQP
|
274
278
|
test_files:
|
275
|
-
- examples/
|
279
|
+
- examples/amqp/amqp_consumer.rb
|
280
|
+
- examples/amqp/amqp_publisher.rb
|
276
281
|
- examples/queue_message.rb
|
277
|
-
- examples/
|
282
|
+
- examples/sandwich_client_with_custom_listener.rb
|
278
283
|
- examples/sandwich_worker.rb
|
279
284
|
- examples/sandwich_worker_with_class.rb
|
280
285
|
- spec/cloudist/basic_queue_spec.rb
|
281
286
|
- spec/cloudist/job_spec.rb
|
287
|
+
- spec/cloudist/message_spec.rb
|
288
|
+
- spec/cloudist/messaging_spec.rb
|
282
289
|
- spec/cloudist/payload_spec.rb
|
290
|
+
- spec/cloudist/payload_spec_2_spec.rb
|
291
|
+
- spec/cloudist/queue_spec.rb
|
283
292
|
- spec/cloudist/request_spec.rb
|
284
293
|
- spec/cloudist/utils_spec.rb
|
285
294
|
- spec/cloudist_spec.rb
|
286
295
|
- spec/core_ext/string_spec.rb
|
287
296
|
- spec/spec_helper.rb
|
297
|
+
- spec/support/amqp.rb
|