superbolt 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/superbolt/spec_helpers.rb +2 -2
- data/lib/superbolt/version.rb +1 -1
- data/spec/app_spec.rb +11 -11
- data/spec/config_spec.rb +8 -8
- data/spec/connection_spec.rb +7 -7
- data/spec/incoming_message_spec.rb +6 -6
- data/spec/lib/superbolt/error_notifier/airbrake_spec.rb +1 -1
- data/spec/lib/superbolt/error_notifier/none_spec.rb +1 -1
- data/spec/lib/superbolt/runner/pg_spec.rb +1 -1
- data/spec/messenger_spec.rb +16 -16
- data/spec/queue_spec.rb +22 -22
- data/spec/{spec_helper.rb → rails_helper.rb} +0 -0
- data/spec/router_spec.rb +4 -4
- data/spec/superbolt_spec.rb +11 -11
- data/superbolt.gemspec +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5538787ae4effae010bb8945665a50e62475742
|
4
|
+
data.tar.gz: def383a9340e518b5474ee2683a296523605a2df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9d58771dec607c6388428b5178ea5d611d045b2372bf5dbbfbcbb25651afda4331e0cfcedd32c2d36b299e56ca1e4a9bdaad9b6e87d2cb59f561f57431535a4
|
7
|
+
data.tar.gz: 9d53728ce7cd8b8efa63f4e9ad709560658bf95cee5c76e60179a3de36e0686c90ada4425ca490e1646021141e146664af9f365d33a71ec2f11810066eb9bdb8
|
@@ -2,7 +2,7 @@ module Superbolt
|
|
2
2
|
module SpecHelpers
|
3
3
|
def superbolt_message
|
4
4
|
superbolt_message = messenger_class.new
|
5
|
-
superbolt_message.
|
5
|
+
allow(superbolt_message).to receive(:send!) do |args|
|
6
6
|
superbolt_message.data(args)
|
7
7
|
superbolt_messages << superbolt_message
|
8
8
|
end
|
@@ -19,7 +19,7 @@ module Superbolt
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def stub_superbolt_messenger
|
22
|
-
Superbolt.
|
22
|
+
allow(Superbolt).to receive(:message) { |args| superbolt_message }
|
23
23
|
end
|
24
24
|
|
25
25
|
def messenger_class
|
data/lib/superbolt/version.rb
CHANGED
data/spec/app_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe Superbolt::App do
|
4
4
|
let(:app) {
|
@@ -36,11 +36,11 @@ describe Superbolt::App do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
messages.size.
|
40
|
-
messages.
|
39
|
+
expect(messages.size).to eq(2)
|
40
|
+
expect(messages).to eq([
|
41
41
|
{'first' => 1},
|
42
42
|
{'last' => 2}
|
43
|
-
]
|
43
|
+
])
|
44
44
|
end
|
45
45
|
|
46
46
|
it 'removes messages from the queue on successful completion' do
|
@@ -54,7 +54,7 @@ describe Superbolt::App do
|
|
54
54
|
app.quit
|
55
55
|
end
|
56
56
|
end
|
57
|
-
queue.size.
|
57
|
+
expect(queue.size).to eq(0)
|
58
58
|
end
|
59
59
|
|
60
60
|
it "passes a logger to the block" do
|
@@ -62,7 +62,7 @@ describe Superbolt::App do
|
|
62
62
|
app.logger = mock_logger
|
63
63
|
|
64
64
|
message_received = false
|
65
|
-
mock_logger.
|
65
|
+
allow(mock_logger).to receive(:info) do |m|
|
66
66
|
if m == {'write' => 'out'}
|
67
67
|
message_received = true
|
68
68
|
end
|
@@ -75,7 +75,7 @@ describe Superbolt::App do
|
|
75
75
|
app.quit
|
76
76
|
end
|
77
77
|
|
78
|
-
message_received.
|
78
|
+
expect(message_received).to eq(true)
|
79
79
|
end
|
80
80
|
|
81
81
|
context 'notifying errors' do
|
@@ -87,8 +87,8 @@ describe Superbolt::App do
|
|
87
87
|
after { Superbolt.error_notifier = nil }
|
88
88
|
|
89
89
|
it 'uses ErrorNotifiers::Airbrake' do
|
90
|
-
app.error_notifier.
|
91
|
-
app.error_notifier.
|
90
|
+
expect(app.error_notifier).to be_an_instance_of(Superbolt::ErrorNotifier::Airbrake)
|
91
|
+
expect(app.error_notifier).to receive(:error!).with(the_error, message)
|
92
92
|
messages = []
|
93
93
|
|
94
94
|
queue.push(message)
|
@@ -103,8 +103,8 @@ describe Superbolt::App do
|
|
103
103
|
|
104
104
|
context 'default' do
|
105
105
|
it 'does not fail' do
|
106
|
-
app.error_notifier.
|
107
|
-
app.error_notifier.
|
106
|
+
expect(app.error_notifier).to be_an_instance_of(Superbolt::ErrorNotifier::None)
|
107
|
+
expect(app.error_notifier).to receive(:error!).with(the_error, message)
|
108
108
|
messages = []
|
109
109
|
|
110
110
|
queue.push(message)
|
data/spec/config_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe Superbolt::Config do
|
4
4
|
let(:config) {
|
@@ -18,11 +18,11 @@ describe Superbolt::Config do
|
|
18
18
|
}
|
19
19
|
|
20
20
|
it "should make the app name available" do
|
21
|
-
expect(config.app_name).to eq
|
21
|
+
expect(config.app_name).to eq('my_great_app')
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should make the env available" do
|
25
|
-
config.env.
|
25
|
+
expect(config.env).to eq('staging')
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -42,7 +42,7 @@ describe Superbolt::Config do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
it "returns the RABBITMQ_URL" do
|
45
|
-
config.connection_params.
|
45
|
+
expect(config.connection_params).to eq(url)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
@@ -65,7 +65,7 @@ describe Superbolt::Config do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
it "returns the url specified in the env" do
|
68
|
-
config.connection_params.
|
68
|
+
expect(config.connection_params).to eq(url)
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
@@ -73,9 +73,9 @@ describe Superbolt::Config do
|
|
73
73
|
context 'no environmental variables' do
|
74
74
|
context 'default' do
|
75
75
|
it "uses the default url" do
|
76
|
-
config.connection_params.
|
76
|
+
expect(config.connection_params).to eq({
|
77
77
|
:host => '127.0.0.1'
|
78
|
-
}
|
78
|
+
})
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
@@ -89,7 +89,7 @@ describe Superbolt::Config do
|
|
89
89
|
}
|
90
90
|
|
91
91
|
it "uses what it is given" do
|
92
|
-
config.connection_params.
|
92
|
+
expect(config.connection_params).to eq(options[:connection_params])
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
data/spec/connection_spec.rb
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe Superbolt::Adapter::Bunny do
|
4
4
|
let(:connection) { Superbolt::Adapter::Bunny.new }
|
5
5
|
|
6
6
|
it "has an underlying open connection via Bunny" do
|
7
|
-
connection.socket.
|
8
|
-
connection.socket.
|
9
|
-
connection.
|
7
|
+
expect(connection.socket).to be_a Bunny::Session
|
8
|
+
expect(connection.socket).to be_open
|
9
|
+
expect(connection).to be_open
|
10
10
|
end
|
11
11
|
|
12
12
|
it "has a channel" do
|
13
|
-
connection.channel.
|
13
|
+
expect(connection.channel).to be_a Bunny::Channel
|
14
14
|
end
|
15
15
|
|
16
16
|
it "delegates queue creation to the channel" do
|
17
17
|
queue = connection.queue('changelica')
|
18
|
-
queue.
|
19
|
-
connection.queues.keys.
|
18
|
+
expect(queue).to be_a Bunny::Queue
|
19
|
+
expect(connection.queues.keys).to include('changelica')
|
20
20
|
end
|
21
21
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe Superbolt::IncomingMessage do
|
4
4
|
let(:message){ Superbolt::IncomingMessage.new(delivery_info, payload, channel) }
|
@@ -11,26 +11,26 @@ describe Superbolt::IncomingMessage do
|
|
11
11
|
let(:payload) { 'foo' }
|
12
12
|
|
13
13
|
it 'just returns the payload' do
|
14
|
-
message.parse.
|
14
|
+
expect(message.parse).to eq(payload)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
context 'payload is json' do
|
19
19
|
it "parses it to a hash" do
|
20
|
-
message.parse.
|
20
|
+
expect(message.parse).to eq({'some' => 'message'})
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
describe '#reject' do
|
26
26
|
it "calls reject on the channel with the appropritate data and options" do
|
27
|
-
channel.
|
27
|
+
expect(channel).to receive(:reject).with('tag', true)
|
28
28
|
|
29
29
|
message.reject
|
30
30
|
end
|
31
31
|
|
32
32
|
it "can reject without requeuing" do
|
33
|
-
channel.
|
33
|
+
expect(channel).to receive(:reject).with('tag', false)
|
34
34
|
|
35
35
|
message.reject(false)
|
36
36
|
end
|
@@ -38,7 +38,7 @@ describe Superbolt::IncomingMessage do
|
|
38
38
|
|
39
39
|
describe "#ack" do
|
40
40
|
it "calls acknowledge on the channel" do
|
41
|
-
channel.
|
41
|
+
expect(channel).to receive(:acknowledge).with('tag')
|
42
42
|
|
43
43
|
message.ack
|
44
44
|
end
|
data/spec/messenger_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe Superbolt::Messenger do
|
4
4
|
let(:env) { 'test' }
|
@@ -16,19 +16,19 @@ describe Superbolt::Messenger do
|
|
16
16
|
describe 'queue generation' do
|
17
17
|
it "can be instantiated with a queue destination" do
|
18
18
|
m = Superbolt::Messenger.new(to: name)
|
19
|
-
m.name.
|
20
|
-
m.queue.name.
|
19
|
+
expect(m.name).to eq(name)
|
20
|
+
expect(m.queue.name).to eq("#{name}_#{env}")
|
21
21
|
end
|
22
22
|
|
23
23
|
it "destination queue can be set via #from" do
|
24
24
|
messenger.to('activator')
|
25
|
-
messenger.queue.name.
|
25
|
+
expect(messenger.queue.name).to eq("activator_#{env}")
|
26
26
|
end
|
27
27
|
|
28
28
|
it "raises an error if the name is nil" do
|
29
29
|
expect {
|
30
30
|
messenger.queue
|
31
|
-
}.to raise_error
|
31
|
+
}.to raise_error(RuntimeError)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -37,41 +37,41 @@ describe Superbolt::Messenger do
|
|
37
37
|
|
38
38
|
context 'writing' do
|
39
39
|
it "starts its life with no interesting values" do
|
40
|
-
message[:origin].
|
41
|
-
message[:event].
|
42
|
-
message[:arguments].
|
40
|
+
expect(message[:origin]).to eq(nil)
|
41
|
+
expect(message[:event]).to eq('default')
|
42
|
+
expect(message[:arguments]).to eq({})
|
43
43
|
end
|
44
44
|
|
45
45
|
it "calls to #from, set the origin on the message" do
|
46
46
|
messenger.from('linkticounter')
|
47
|
-
message[:origin].
|
47
|
+
expect(message[:origin]).to eq('linkticounter')
|
48
48
|
end
|
49
49
|
|
50
50
|
it "passes event data to the message" do
|
51
51
|
messenger.re('zap')
|
52
|
-
message[:event].
|
52
|
+
expect(message[:event]).to eq('zap')
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
56
|
context 'reading' do
|
57
57
|
it '#to returns the name' do
|
58
58
|
messenger.to('transducer')
|
59
|
-
expect(messenger.to).to eq
|
59
|
+
expect(messenger.to).to eq('transducer')
|
60
60
|
end
|
61
61
|
|
62
62
|
it '#from returns the origin' do
|
63
63
|
messenger.from('activator')
|
64
|
-
messenger.from.
|
64
|
+
expect(messenger.from).to eq('activator')
|
65
65
|
end
|
66
66
|
|
67
67
|
it '#re returns the event' do
|
68
68
|
messenger.re('save')
|
69
|
-
messenger.re.
|
69
|
+
expect(messenger.re).to eq('save')
|
70
70
|
end
|
71
71
|
|
72
72
|
it '#data return the arguments' do
|
73
73
|
messenger.data({foo: 'bar'})
|
74
|
-
messenger.data.
|
74
|
+
expect(messenger.data).to eq({foo: 'bar'})
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
@@ -86,11 +86,11 @@ describe Superbolt::Messenger do
|
|
86
86
|
|
87
87
|
it "returns a hash that gets sent to the right queue" do
|
88
88
|
messenger.send!('none')
|
89
|
-
queue.pop.
|
89
|
+
expect(queue.pop).to eq({
|
90
90
|
'origin' => 'me',
|
91
91
|
'event' => 'love',
|
92
92
|
'arguments' => 'none'
|
93
|
-
}
|
93
|
+
})
|
94
94
|
end
|
95
95
|
end
|
96
96
|
end
|
data/spec/queue_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe 'Superbolt::Queue' do
|
4
4
|
let(:name) { 'superbolt_test' }
|
@@ -11,13 +11,13 @@ describe 'Superbolt::Queue' do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
it "has the right name" do
|
14
|
-
queue.name.
|
14
|
+
expect(queue.name).to eq(name)
|
15
15
|
end
|
16
16
|
|
17
17
|
it "is setup with the right defaults" do
|
18
|
-
queue.exclusive
|
19
|
-
queue.durable
|
20
|
-
queue.auto_delete
|
18
|
+
expect(queue.exclusive?).to eq(false)
|
19
|
+
expect(queue.durable?).to eq(true)
|
20
|
+
expect(queue.auto_delete?).to eq(false)
|
21
21
|
end
|
22
22
|
|
23
23
|
describe 'queue/array operations' do
|
@@ -32,31 +32,31 @@ describe 'Superbolt::Queue' do
|
|
32
32
|
|
33
33
|
it "writes to the queue" do
|
34
34
|
queue.push(message)
|
35
|
-
queue.size.
|
35
|
+
expect(queue.size).to eq(1)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
describe '#peek' do
|
40
40
|
it "returns the message but leaves it in the queue" do
|
41
41
|
queue.push(message)
|
42
|
-
queue.peek.
|
43
|
-
queue.size.
|
42
|
+
expect(queue.peek).to eq(decoded)
|
43
|
+
expect(queue.size).to eq(1)
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
47
|
describe '#pop' do
|
48
48
|
it "returns the message and deletes it from the queue" do
|
49
49
|
queue.push(message)
|
50
|
-
queue.pop.
|
51
|
-
queue.size.
|
50
|
+
expect(queue.pop).to eq(decoded)
|
51
|
+
expect(queue.size).to eq(0)
|
52
52
|
end
|
53
53
|
|
54
54
|
it "leaves all other messages in the queue" do
|
55
55
|
queue.push(message)
|
56
56
|
queue.push(message_two)
|
57
57
|
queue.pop
|
58
|
-
queue.size.
|
59
|
-
queue.all.
|
58
|
+
expect(queue.size).to eq(1)
|
59
|
+
expect(queue.all).to include(decoded_two)
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
@@ -69,12 +69,12 @@ describe 'Superbolt::Queue' do
|
|
69
69
|
|
70
70
|
it "returns all the messages on the queue" do
|
71
71
|
messages = queue.all
|
72
|
-
messages.size.
|
73
|
-
messages.uniq.
|
72
|
+
expect(messages.size).to eq(3)
|
73
|
+
expect(messages.uniq).to eq([decoded])
|
74
74
|
end
|
75
75
|
|
76
76
|
it "does not consume the messages" do
|
77
|
-
queue.size.
|
77
|
+
expect(queue.size).to eq(3)
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
@@ -87,13 +87,13 @@ describe 'Superbolt::Queue' do
|
|
87
87
|
|
88
88
|
it "returns a set of messages determined by the offset and the number requested" do
|
89
89
|
messages = queue.slice(1,3)
|
90
|
-
messages.size.
|
91
|
-
messages.map{|json| json['i']}.
|
90
|
+
expect(messages.size).to eq(3)
|
91
|
+
expect(messages.map{|json| json['i']}).to eq([1,2,3])
|
92
92
|
end
|
93
93
|
|
94
94
|
it "does not consume messages" do
|
95
95
|
queue.slice(1,3)
|
96
|
-
queue.size.
|
96
|
+
expect(queue.size).to eq(10)
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
@@ -106,7 +106,7 @@ describe 'Superbolt::Queue' do
|
|
106
106
|
|
107
107
|
it "return the message at the i-th position without removing it from the queue" do
|
108
108
|
json = queue[3]
|
109
|
-
json['i'].
|
109
|
+
expect(json['i']).to eq(3)
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
@@ -119,12 +119,12 @@ describe 'Superbolt::Queue' do
|
|
119
119
|
|
120
120
|
it "returns all messages where the block is true" do
|
121
121
|
messages = queue.delete{|json| json['i'] > 2 && json['i'] != 6 && json['i'] < 8 }
|
122
|
-
messages.map{|json| json['i']}.
|
122
|
+
expect(messages.map{|json| json['i']}).to eq([3,4,5,7])
|
123
123
|
end
|
124
124
|
|
125
125
|
it "removes those messages from the queue" do
|
126
126
|
queue.delete{|json| json['i'] > 2 && json['i'] != 6 && json['i'] < 8 }
|
127
|
-
queue.size.
|
127
|
+
expect(queue.size).to eq(6)
|
128
128
|
end
|
129
129
|
end
|
130
130
|
end
|
@@ -138,7 +138,7 @@ describe 'Superbolt::Queue' do
|
|
138
138
|
|
139
139
|
it "should store messages to a queue, even when writing before declaring the queue" do
|
140
140
|
new_queue.push({my: 'message'})
|
141
|
-
new_queue.size.
|
141
|
+
expect(new_queue.size).to eq(1)
|
142
142
|
end
|
143
143
|
end
|
144
144
|
end
|
File without changes
|
data/spec/router_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe Superbolt::Router do
|
4
4
|
let(:router) { Superbolt::Router.new(message, logger) }
|
@@ -26,8 +26,8 @@ describe Superbolt::Router do
|
|
26
26
|
}
|
27
27
|
|
28
28
|
it "performs the event handler" do
|
29
|
-
MessageHandler.
|
30
|
-
handler.
|
29
|
+
expect(MessageHandler).to receive(:new).with({yes: 'we can'}, logger).and_return(handler)
|
30
|
+
expect(handler).to receive(:perform)
|
31
31
|
|
32
32
|
router.perform
|
33
33
|
end
|
@@ -44,7 +44,7 @@ describe Superbolt::Router do
|
|
44
44
|
}
|
45
45
|
|
46
46
|
it "logs a warning" do
|
47
|
-
logger.
|
47
|
+
expect(logger).to receive(:warn).with("No Superbolt route for event: 'no_one_home'")
|
48
48
|
|
49
49
|
router.perform
|
50
50
|
end
|
data/spec/superbolt_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe Superbolt, 'the facade' do
|
4
4
|
before do
|
@@ -20,16 +20,16 @@ describe Superbolt, 'the facade' do
|
|
20
20
|
after { Superbolt.error_notifier = nil }
|
21
21
|
|
22
22
|
it "should retain the configuration information" do
|
23
|
-
Superbolt.config.app_name.
|
24
|
-
Superbolt.config.env.
|
25
|
-
Superbolt.config.env_connection_key.
|
26
|
-
Superbolt.config.error_notifier.
|
23
|
+
expect(Superbolt.config.app_name).to eq('bossanova')
|
24
|
+
expect(Superbolt.config.env).to eq('production')
|
25
|
+
expect(Superbolt.config.env_connection_key).to eq('SOME_RABBITMQ_URL')
|
26
|
+
expect(Superbolt.config.error_notifier).to eq(:airbrake)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
30
|
describe '.config' do
|
31
31
|
it "has a default" do
|
32
|
-
Superbolt.config.
|
32
|
+
expect(Superbolt.config).to eq(Superbolt::Config.new({}))
|
33
33
|
end
|
34
34
|
|
35
35
|
it "can be customized" do
|
@@ -37,17 +37,17 @@ describe Superbolt, 'the facade' do
|
|
37
37
|
connection_key: 'SOME_RABBITMQ_URL'
|
38
38
|
}
|
39
39
|
|
40
|
-
Superbolt.config.env_connection_key.
|
40
|
+
expect(Superbolt.config.env_connection_key).to eq('SOME_RABBITMQ_URL')
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
44
|
describe '.queue' do
|
45
45
|
it "creates a queue with the default config" do
|
46
46
|
queue = double('queue')
|
47
|
-
Superbolt::Queue.
|
47
|
+
expect(Superbolt::Queue).to receive(:new)
|
48
48
|
.with('queue_name', Superbolt.config)
|
49
49
|
.and_return(queue)
|
50
|
-
Superbolt.queue('queue_name').
|
50
|
+
expect(Superbolt.queue('queue_name')).to eq(queue)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
@@ -63,13 +63,13 @@ describe Superbolt, 'the facade' do
|
|
63
63
|
.re('update')
|
64
64
|
.send!({class: 'Advocate'})
|
65
65
|
|
66
|
-
queue.pop.
|
66
|
+
expect(queue.pop).to eq({
|
67
67
|
'origin' => 'bossanova',
|
68
68
|
'event' => 'update',
|
69
69
|
'arguments' => {
|
70
70
|
'class' => 'Advocate'
|
71
71
|
}
|
72
|
-
}
|
72
|
+
})
|
73
73
|
end
|
74
74
|
end
|
75
75
|
end
|
data/superbolt.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superbolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- socialchorus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -98,16 +98,16 @@ dependencies:
|
|
98
98
|
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - '
|
101
|
+
- - '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - '
|
108
|
+
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: '0'
|
111
111
|
description: Superbolt is comprised of a standalone app, and a queue-like queue for
|
112
112
|
sending messages between services and applications.
|
113
113
|
email:
|
@@ -159,8 +159,8 @@ files:
|
|
159
159
|
- spec/lib/superbolt/runner/pg_spec.rb
|
160
160
|
- spec/messenger_spec.rb
|
161
161
|
- spec/queue_spec.rb
|
162
|
+
- spec/rails_helper.rb
|
162
163
|
- spec/router_spec.rb
|
163
|
-
- spec/spec_helper.rb
|
164
164
|
- spec/superbolt_spec.rb
|
165
165
|
- spec/support/em_mocking.rb
|
166
166
|
- spec/support/queue_helpers.rb
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.
|
188
|
+
rubygems_version: 2.4.6
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Superbolt is a gem that makes SOA intra-app communication easy, via RabbitMQ
|
@@ -199,8 +199,8 @@ test_files:
|
|
199
199
|
- spec/lib/superbolt/runner/pg_spec.rb
|
200
200
|
- spec/messenger_spec.rb
|
201
201
|
- spec/queue_spec.rb
|
202
|
+
- spec/rails_helper.rb
|
202
203
|
- spec/router_spec.rb
|
203
|
-
- spec/spec_helper.rb
|
204
204
|
- spec/superbolt_spec.rb
|
205
205
|
- spec/support/em_mocking.rb
|
206
206
|
- spec/support/queue_helpers.rb
|