pwwka 0.8.0 → 0.9.0.RC1
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +7 -3
- data/CONTRIBUTING.md +17 -2
- data/Gemfile.lock +29 -7
- data/README.md +144 -128
- data/docker-compose.yml +11 -0
- data/lib/pwwka/configuration.rb +6 -0
- data/lib/pwwka/receiver.rb +19 -2
- data/lib/pwwka/test_handler.rb +1 -0
- data/lib/pwwka/transmitter.rb +1 -0
- data/lib/pwwka/version.rb +1 -1
- data/pwwka.gemspec +3 -0
- data/spec/integration/interrupted_receivers_spec.rb +47 -0
- data/spec/integration/send_and_receive_spec.rb +98 -0
- data/spec/integration/support/integration_test_helpers.rb +5 -0
- data/spec/integration/support/integration_test_setup.rb +40 -0
- data/spec/integration/support/logging_receiver.rb +10 -0
- data/spec/integration/test_handler_spec.rb +78 -0
- data/spec/integration/unhandled_errors_in_receivers_spec.rb +115 -0
- data/spec/{handling_spec.rb → legacy/handling_spec.rb} +1 -1
- data/spec/{receiver_spec.rb → legacy/receiver_spec.rb} +2 -1
- data/spec/{send_message_async_job_spec.rb → legacy/send_message_async_job_spec.rb} +1 -1
- data/spec/{transmitter_spec.rb → legacy/transmitter_spec.rb} +1 -1
- data/spec/spec_helper.rb +32 -6
- data/spec/support/test_configuration.rb +10 -0
- data/spec/unit/channel_connector_spec.rb +40 -0
- data/spec/{logging_spec.rb → unit/logging_spec.rb} +0 -0
- data/spec/{message_queuer_spec.rb → unit/message_queuer_spec.rb} +4 -4
- data/spec/{queue_resque_job_handler_spec.rb → unit/queue_resque_job_handler_spec.rb} +0 -0
- data/spec/unit/test_handler_message_spec.rb +26 -0
- data/spec/unit/transmitter_spec.rb +229 -0
- metadata +83 -18
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper.rb'
|
2
2
|
|
3
|
-
describe Pwwka::Receiver do
|
3
|
+
describe Pwwka::Receiver, :legacy do
|
4
4
|
|
5
5
|
class HandyHandler
|
6
6
|
def self.handle!(delivery_info, properties, payload)
|
@@ -18,6 +18,7 @@ describe Pwwka::Receiver do
|
|
18
18
|
before(:each) do
|
19
19
|
@original_logger = Pwwka.configuration.logger
|
20
20
|
Pwwka.configuration.logger = logger
|
21
|
+
Pwwka.configuration.requeue_on_error = false
|
21
22
|
allow(logger).to receive(:info)
|
22
23
|
allow(logger).to receive(:error)
|
23
24
|
@receiver = Pwwka::Receiver.subscribe(HandyHandler, "receiver_test", block: false)
|
data/spec/spec_helper.rb
CHANGED
@@ -1,22 +1,48 @@
|
|
1
1
|
GEM_ROOT = File.expand_path(File.join(File.dirname(__FILE__),'..'))
|
2
|
+
|
2
3
|
ENV['RAILS_ENV'] ||= 'test'
|
4
|
+
|
5
|
+
require 'simplecov'
|
6
|
+
|
7
|
+
SimpleCov.start do
|
8
|
+
add_filter "/spec/"
|
9
|
+
end
|
10
|
+
|
3
11
|
require 'pwwka'
|
4
12
|
require 'pwwka/test_handler'
|
5
|
-
|
13
|
+
require 'active_support/core_ext/hash'
|
14
|
+
|
15
|
+
# These are required in pwwka proper, but they are guarded to not cause
|
16
|
+
# an error if missing. Requiring here so their absence will fail the tests
|
17
|
+
require 'resque'
|
18
|
+
require 'resque-retry'
|
19
|
+
|
20
|
+
require 'support/test_configuration'
|
21
|
+
|
22
|
+
test_configuration = TestConfiguration.new(File.join(GEM_ROOT,"docker-compose.yml"))
|
6
23
|
|
7
24
|
RSpec.configure do |config|
|
8
25
|
|
9
26
|
config.expect_with :rspec do |c|
|
10
|
-
c.syntax = :expect
|
27
|
+
c.syntax = [:should,:expect] # should is needed to make a resque helper
|
28
|
+
# from resqutils work
|
11
29
|
end
|
12
30
|
|
13
|
-
config.before(:
|
31
|
+
config.before(:suite) do
|
14
32
|
Pwwka.configure do |c|
|
15
|
-
c.topic_exchange_name
|
16
|
-
c.
|
17
|
-
c.
|
33
|
+
c.topic_exchange_name = "topics-test"
|
34
|
+
c.options[:allow_delayed] = true
|
35
|
+
c.requeue_on_error = false
|
36
|
+
c.rabbit_mq_host = "amqp://guest:guest@localhost:#{test_configuration.rabbit_port}"
|
37
|
+
|
38
|
+
unless ENV["SHOW_PWWKA_LOG"] == "true"
|
39
|
+
c.logger = MonoLogger.new("/dev/null")
|
40
|
+
end
|
18
41
|
end
|
42
|
+
Resque.redis = Redis.new(port: test_configuration.resque_redis_port)
|
19
43
|
end
|
20
44
|
|
45
|
+
config.order = :random
|
46
|
+
config.filter_run_excluding :legacy
|
21
47
|
end
|
22
48
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
class TestConfiguration
|
3
|
+
attr_reader :resque_redis_port, :rabbit_port
|
4
|
+
def initialize(docker_compose_file)
|
5
|
+
yaml = YAML.load_file(docker_compose_file)
|
6
|
+
|
7
|
+
@resque_redis_port = (ENV["PWWKA_RESQUE_REDIS_PORT"] || yaml["services"]["resque"]["ports"].first.split(/:/)[0]).to_i
|
8
|
+
@rabbit_port = (ENV["PWWKA_RABBIT_PORT"] || yaml["services"]["rabbit"]["ports"].first.split(/:/)[0]).to_i
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper.rb'
|
2
|
+
|
3
|
+
# Most of this class is just interacting with Rabbit so it's covered
|
4
|
+
# by the integration tests.
|
5
|
+
describe Pwwka::ChannelConnector do
|
6
|
+
let(:bunny_session) { instance_double(Bunny::Session) }
|
7
|
+
|
8
|
+
before do
|
9
|
+
allow(Bunny).to receive(:new).and_return(bunny_session)
|
10
|
+
allow(bunny_session).to receive(:start)
|
11
|
+
allow(bunny_session).to receive(:create_channel)
|
12
|
+
@default_allow_delayed = Pwwka.configuration.options[:allow_delayed]
|
13
|
+
end
|
14
|
+
|
15
|
+
after do
|
16
|
+
Pwwka.configuration.options[:allow_delayed] = @default_allow_delayed
|
17
|
+
end
|
18
|
+
|
19
|
+
subject(:channel_connector) { described_class.new }
|
20
|
+
|
21
|
+
describe "raise_if_delayed_not_allowed" do
|
22
|
+
context "delayed is configured" do
|
23
|
+
it "does not blow up" do
|
24
|
+
Pwwka.configuration.options[:allow_delayed] = true
|
25
|
+
expect {
|
26
|
+
channel_connector.raise_if_delayed_not_allowed
|
27
|
+
}.not_to raise_error
|
28
|
+
end
|
29
|
+
end
|
30
|
+
context "delayed is not configured" do
|
31
|
+
it "blows up" do
|
32
|
+
Pwwka.configuration.options[:allow_delayed] = false
|
33
|
+
expect {
|
34
|
+
channel_connector.raise_if_delayed_not_allowed
|
35
|
+
}.to raise_error(Pwwka::ConfigurationError)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
File without changes
|
@@ -33,8 +33,8 @@ describe Pwwka::MessageQueuer do
|
|
33
33
|
describe "#send_messages_safely" do
|
34
34
|
|
35
35
|
it "should send the queued messages" do
|
36
|
-
expect(message_queuer_with_messages).to receive(:send_message_safely).with(payload1, routing_key1)
|
37
|
-
expect(message_queuer_with_messages).to receive(:send_message_safely).with(payload2, routing_key2, delayed: true, delay_by: 3500)
|
36
|
+
expect(message_queuer_with_messages).to receive(:send_message_safely).with(payload1, routing_key1)
|
37
|
+
expect(message_queuer_with_messages).to receive(:send_message_safely).with(payload2, routing_key2, delayed: true, delay_by: 3500)
|
38
38
|
message_queuer_with_messages.send_messages_safely
|
39
39
|
expect(message_queuer_with_messages.message_queue).to eq([])
|
40
40
|
end
|
@@ -44,8 +44,8 @@ describe Pwwka::MessageQueuer do
|
|
44
44
|
describe "#send_messages!" do
|
45
45
|
|
46
46
|
it "should send the queued messages" do
|
47
|
-
expect(message_queuer_with_messages).to receive(:send_message!).with(payload1, routing_key1)
|
48
|
-
expect(message_queuer_with_messages).to receive(:send_message!).with(payload2, routing_key2, delayed: true, delay_by: 3500)
|
47
|
+
expect(message_queuer_with_messages).to receive(:send_message!).with(payload1, routing_key1)
|
48
|
+
expect(message_queuer_with_messages).to receive(:send_message!).with(payload2, routing_key2, delayed: true, delay_by: 3500)
|
49
49
|
message_queuer_with_messages.send_messages!
|
50
50
|
expect(message_queuer_with_messages.message_queue).to eq([])
|
51
51
|
end
|
File without changes
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Pwwka::TestHandler::Message do
|
4
|
+
let(:delivery_info) { double("delivery info") }
|
5
|
+
let(:properties) { double("properties") }
|
6
|
+
let(:payload) { { foo: "bar" }.to_json }
|
7
|
+
|
8
|
+
subject(:message) { described_class.new(delivery_info,properties,payload) }
|
9
|
+
|
10
|
+
describe "attributes" do
|
11
|
+
specify { expect(message.delivery_info).to eq(delivery_info) }
|
12
|
+
specify { expect(message.properties).to eq(properties) }
|
13
|
+
specify { expect(message.payload).to eq(JSON.parse(payload)) }
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "splatting" do
|
17
|
+
it "extracts pieces during a splat" do
|
18
|
+
extracted_delivery_info,extracted_payload,extracted_properties,extracted_raw_payload = message
|
19
|
+
expect(extracted_delivery_info).to eq(delivery_info)
|
20
|
+
expect(extracted_properties).to eq(properties)
|
21
|
+
expect(extracted_payload).to eq(JSON.parse(payload))
|
22
|
+
expect(extracted_raw_payload).to eq(payload)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
require 'spec_helper.rb'
|
2
|
+
|
3
|
+
describe Pwwka::Transmitter do
|
4
|
+
let(:topic_exchange) { double("topic exchange") }
|
5
|
+
let(:delayed_exchange) { double("delayed exchange") }
|
6
|
+
let(:channel_connector) { instance_double(Pwwka::ChannelConnector, topic_exchange: topic_exchange, delayed_exchange: delayed_exchange) }
|
7
|
+
let(:logger) { double(Logger) }
|
8
|
+
let(:payload) {
|
9
|
+
{
|
10
|
+
foo: { bar: "blah" },
|
11
|
+
crud: 12,
|
12
|
+
}
|
13
|
+
}
|
14
|
+
let(:routing_key) { "sf.foo.bar" }
|
15
|
+
|
16
|
+
|
17
|
+
before do
|
18
|
+
@original_logger = Pwwka.configuration.logger
|
19
|
+
Pwwka.configuration.logger = logger
|
20
|
+
allow(logger).to receive(:info)
|
21
|
+
allow(logger).to receive(:warn)
|
22
|
+
allow(logger).to receive(:error)
|
23
|
+
allow(Pwwka::ChannelConnector).to receive(:new).and_return(channel_connector)
|
24
|
+
allow(channel_connector).to receive(:connection_close)
|
25
|
+
allow(topic_exchange).to receive(:publish)
|
26
|
+
allow(delayed_exchange).to receive(:publish)
|
27
|
+
end
|
28
|
+
|
29
|
+
after do
|
30
|
+
Pwwka.configuration.logger = @original_logger
|
31
|
+
end
|
32
|
+
|
33
|
+
subject(:transmitter) { described_class.new }
|
34
|
+
|
35
|
+
describe ".send_message_async" do
|
36
|
+
before do
|
37
|
+
allow(Resque).to receive(:enqueue_in)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "queues a Resque job" do
|
41
|
+
delay_by_ms = 3_000
|
42
|
+
described_class.send_message_async(payload,routing_key,delay_by_ms: delay_by_ms)
|
43
|
+
expect(Resque).to have_received(:enqueue_in).with(delay_by_ms/1_000,Pwwka::SendMessageAsyncJob,payload,routing_key)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
shared_examples "it passes through to an instance" do
|
48
|
+
context "not using delayed flag" do
|
49
|
+
it "calls through to send_message!" do
|
50
|
+
expect_any_instance_of(described_class).to receive(:send_message!).with(payload,routing_key)
|
51
|
+
described_class.send(method,payload,routing_key)
|
52
|
+
end
|
53
|
+
it "logs after sending" do
|
54
|
+
described_class.send(method,payload,routing_key)
|
55
|
+
expect(logger).to have_received(:info).with(/AFTER Transmitting Message on #{routing_key} ->/)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
context "using delayed flag" do
|
59
|
+
|
60
|
+
it "logs after sending" do
|
61
|
+
allow_any_instance_of(described_class).to receive(:send_delayed_message!)
|
62
|
+
described_class.send(method,payload,routing_key, delayed: true)
|
63
|
+
expect(logger).to have_received(:info).with(/AFTER Transmitting Message on #{routing_key} ->/)
|
64
|
+
end
|
65
|
+
|
66
|
+
context "explicitly setting delay time" do
|
67
|
+
it "calls through to send_delayed_message! using the given delay time" do
|
68
|
+
delay_by = 1_000
|
69
|
+
expect_any_instance_of(described_class).to receive(:send_delayed_message!).with(payload,routing_key,delay_by)
|
70
|
+
described_class.send(method,payload,routing_key,delayed: true, delay_by: delay_by)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
context "using the default delay time" do
|
74
|
+
it "calls through to send_delayed_message! using its default delay time" do
|
75
|
+
expect_any_instance_of(described_class).to receive(:send_delayed_message!).with(payload,routing_key)
|
76
|
+
described_class.send(method,payload,routing_key,delayed: true)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe ".send_message!" do
|
83
|
+
context "no errors" do
|
84
|
+
it_behaves_like "it passes through to an instance" do
|
85
|
+
let(:method) { :send_message! }
|
86
|
+
end
|
87
|
+
end
|
88
|
+
context "when there's an error" do
|
89
|
+
before do
|
90
|
+
allow_any_instance_of(described_class).to receive(:send_message!).and_raise("OH NOES")
|
91
|
+
end
|
92
|
+
it "logs the error" do
|
93
|
+
begin
|
94
|
+
described_class.send_message!(payload,routing_key)
|
95
|
+
rescue => ex
|
96
|
+
end
|
97
|
+
expect(logger).to have_received(:error).with(/ERROR Transmitting Message on #{routing_key} ->/)
|
98
|
+
end
|
99
|
+
context "on_error: :ignore" do
|
100
|
+
it "ignores the error" do
|
101
|
+
expect {
|
102
|
+
described_class.send_message!(payload,routing_key, on_error: :ignore)
|
103
|
+
}.not_to raise_error
|
104
|
+
end
|
105
|
+
end
|
106
|
+
context "on_error: :raise" do
|
107
|
+
it "raises the error" do
|
108
|
+
expect {
|
109
|
+
described_class.send_message!(payload,routing_key, on_error: :raise)
|
110
|
+
}.to raise_error(/OH NOES/)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
context "on_error: :resque" do
|
114
|
+
it "queues a Resque job" do
|
115
|
+
allow(Resque).to receive(:enqueue_in)
|
116
|
+
described_class.send_message!(payload,routing_key, on_error: :resque)
|
117
|
+
expect(Resque).to have_received(:enqueue_in).with(0,Pwwka::SendMessageAsyncJob,payload,routing_key)
|
118
|
+
end
|
119
|
+
context "when there is a problem queueing the resque job" do
|
120
|
+
it "raises the original exception job" do
|
121
|
+
allow(Resque).to receive(:enqueue_in).and_raise("NOPE")
|
122
|
+
expect {
|
123
|
+
described_class.send_message!(payload,routing_key, on_error: :resque)
|
124
|
+
}.to raise_error(/OH NOES/)
|
125
|
+
end
|
126
|
+
it "logs the Resque error as a warning" do
|
127
|
+
allow(Resque).to receive(:enqueue_in).and_raise("NOPE")
|
128
|
+
begin
|
129
|
+
described_class.send_message!(payload,routing_key, on_error: :resque)
|
130
|
+
rescue => ex
|
131
|
+
end
|
132
|
+
expect(logger).to have_received(:warn).with(/NOPE/)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
describe ".send_message_safely" do
|
139
|
+
context "no errors" do
|
140
|
+
it_behaves_like "it passes through to an instance" do
|
141
|
+
let(:method) { :send_message_safely }
|
142
|
+
end
|
143
|
+
end
|
144
|
+
context "when there's an error" do
|
145
|
+
before do
|
146
|
+
allow_any_instance_of(described_class).to receive(:send_message!).and_raise("OH NOES")
|
147
|
+
end
|
148
|
+
it "logs the error" do
|
149
|
+
begin
|
150
|
+
described_class.send_message_safely(payload,routing_key)
|
151
|
+
rescue => ex
|
152
|
+
end
|
153
|
+
expect(logger).to have_received(:error).with(/ERROR Transmitting Message on #{routing_key} ->/)
|
154
|
+
end
|
155
|
+
it "ignores the error" do
|
156
|
+
expect {
|
157
|
+
described_class.send_message_safely(payload,routing_key)
|
158
|
+
}.not_to raise_error
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
describe "#send_message!" do
|
164
|
+
it "returns true" do
|
165
|
+
expect(transmitter.send_message!(payload,routing_key)).to eq(true)
|
166
|
+
end
|
167
|
+
|
168
|
+
it "publishes the message" do
|
169
|
+
transmitter.send_message!(payload,routing_key)
|
170
|
+
expect(topic_exchange).to have_received(:publish).with(payload.to_json,routing_key: routing_key, persistent: true)
|
171
|
+
end
|
172
|
+
|
173
|
+
it "logs the start and end of the transmission" do
|
174
|
+
transmitter.send_message!(payload,routing_key)
|
175
|
+
expect(logger).to have_received(:info).with(/START Transmitting Message on #{routing_key} ->/)
|
176
|
+
expect(logger).to have_received(:info).with(/END Transmitting Message on #{routing_key} ->/)
|
177
|
+
end
|
178
|
+
|
179
|
+
it "closes the channel connector" do
|
180
|
+
transmitter.send_message!(payload,routing_key)
|
181
|
+
expect(channel_connector).to have_received(:connection_close)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
describe "#send_delayed_message!" do
|
186
|
+
context "delayed queue properly configured" do
|
187
|
+
before do
|
188
|
+
allow(channel_connector).to receive(:raise_if_delayed_not_allowed)
|
189
|
+
allow(channel_connector).to receive(:create_delayed_queue)
|
190
|
+
end
|
191
|
+
|
192
|
+
it "returns true" do
|
193
|
+
expect(transmitter.send_delayed_message!(payload,routing_key)).to eq(true)
|
194
|
+
end
|
195
|
+
|
196
|
+
it "creates the delayed queue" do
|
197
|
+
transmitter.send_delayed_message!(payload,routing_key)
|
198
|
+
expect(channel_connector).to have_received(:create_delayed_queue)
|
199
|
+
end
|
200
|
+
|
201
|
+
it "publishes the message to the delayed exchange" do
|
202
|
+
delay_by = 12345
|
203
|
+
transmitter.send_delayed_message!(payload,routing_key, delay_by)
|
204
|
+
expect(delayed_exchange).to have_received(:publish).with(payload.to_json,routing_key: routing_key, expiration: delay_by, persistent: true)
|
205
|
+
end
|
206
|
+
|
207
|
+
it "logs the start and end of the transmission" do
|
208
|
+
transmitter.send_delayed_message!(payload,routing_key)
|
209
|
+
expect(logger).to have_received(:info).with(/START Transmitting Delayed Message on #{routing_key} ->/)
|
210
|
+
expect(logger).to have_received(:info).with(/END Transmitting Delayed Message on #{routing_key} ->/)
|
211
|
+
end
|
212
|
+
it "closes the channel connector" do
|
213
|
+
transmitter.send_delayed_message!(payload,routing_key)
|
214
|
+
expect(channel_connector).to have_received(:connection_close)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
context "delayed queue not configured" do
|
218
|
+
before do
|
219
|
+
allow(channel_connector).to receive(:raise_if_delayed_not_allowed).and_raise("NOPE")
|
220
|
+
end
|
221
|
+
it "blows up" do
|
222
|
+
expect {
|
223
|
+
transmitter.send_delayed_message!(payload,routing_key)
|
224
|
+
}.to raise_error(/NOPE/)
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwwka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0.RC1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stitch Fix Engineering
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date:
|
18
|
+
date: 2017-02-07 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: bunny
|
@@ -115,6 +115,48 @@ dependencies:
|
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
name: resque-retry
|
120
|
+
requirement: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
type: :development
|
126
|
+
prerelease: false
|
127
|
+
version_requirements: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
- !ruby/object:Gem::Dependency
|
133
|
+
name: simplecov
|
134
|
+
requirement: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
type: :development
|
140
|
+
prerelease: false
|
141
|
+
version_requirements: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
name: resqutils
|
148
|
+
requirement: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
type: :development
|
154
|
+
prerelease: false
|
155
|
+
version_requirements: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
118
160
|
description: |-
|
119
161
|
The purpose of this gem is to normalise the sending and
|
120
162
|
receiving of messages between Rails apps using the shared RabbitMQ
|
@@ -143,6 +185,7 @@ files:
|
|
143
185
|
- LICENSE
|
144
186
|
- README.md
|
145
187
|
- Rakefile
|
188
|
+
- docker-compose.yml
|
146
189
|
- docs/images/RabbitMQ_Management-2.png
|
147
190
|
- docs/images/RabbitMQ_Management-3.png
|
148
191
|
- docs/images/RabbitMQ_Management.png
|
@@ -160,14 +203,25 @@ files:
|
|
160
203
|
- lib/pwwka/transmitter.rb
|
161
204
|
- lib/pwwka/version.rb
|
162
205
|
- pwwka.gemspec
|
163
|
-
- spec/
|
164
|
-
- spec/
|
165
|
-
- spec/
|
166
|
-
- spec/
|
167
|
-
- spec/
|
168
|
-
- spec/
|
206
|
+
- spec/integration/interrupted_receivers_spec.rb
|
207
|
+
- spec/integration/send_and_receive_spec.rb
|
208
|
+
- spec/integration/support/integration_test_helpers.rb
|
209
|
+
- spec/integration/support/integration_test_setup.rb
|
210
|
+
- spec/integration/support/logging_receiver.rb
|
211
|
+
- spec/integration/test_handler_spec.rb
|
212
|
+
- spec/integration/unhandled_errors_in_receivers_spec.rb
|
213
|
+
- spec/legacy/handling_spec.rb
|
214
|
+
- spec/legacy/receiver_spec.rb
|
215
|
+
- spec/legacy/send_message_async_job_spec.rb
|
216
|
+
- spec/legacy/transmitter_spec.rb
|
169
217
|
- spec/spec_helper.rb
|
170
|
-
- spec/
|
218
|
+
- spec/support/test_configuration.rb
|
219
|
+
- spec/unit/channel_connector_spec.rb
|
220
|
+
- spec/unit/logging_spec.rb
|
221
|
+
- spec/unit/message_queuer_spec.rb
|
222
|
+
- spec/unit/queue_resque_job_handler_spec.rb
|
223
|
+
- spec/unit/test_handler_message_spec.rb
|
224
|
+
- spec/unit/transmitter_spec.rb
|
171
225
|
homepage: https://github.com/stitchfix/pwwka
|
172
226
|
licenses:
|
173
227
|
- MIT
|
@@ -183,9 +237,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
183
237
|
version: '0'
|
184
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
239
|
requirements:
|
186
|
-
- - "
|
240
|
+
- - ">"
|
187
241
|
- !ruby/object:Gem::Version
|
188
|
-
version:
|
242
|
+
version: 1.3.1
|
189
243
|
requirements: []
|
190
244
|
rubyforge_project:
|
191
245
|
rubygems_version: 2.5.1
|
@@ -193,11 +247,22 @@ signing_key:
|
|
193
247
|
specification_version: 4
|
194
248
|
summary: Send and receive messages via RabbitMQ
|
195
249
|
test_files:
|
196
|
-
- spec/
|
197
|
-
- spec/
|
198
|
-
- spec/
|
199
|
-
- spec/
|
200
|
-
- spec/
|
201
|
-
- spec/
|
250
|
+
- spec/integration/interrupted_receivers_spec.rb
|
251
|
+
- spec/integration/send_and_receive_spec.rb
|
252
|
+
- spec/integration/support/integration_test_helpers.rb
|
253
|
+
- spec/integration/support/integration_test_setup.rb
|
254
|
+
- spec/integration/support/logging_receiver.rb
|
255
|
+
- spec/integration/test_handler_spec.rb
|
256
|
+
- spec/integration/unhandled_errors_in_receivers_spec.rb
|
257
|
+
- spec/legacy/handling_spec.rb
|
258
|
+
- spec/legacy/receiver_spec.rb
|
259
|
+
- spec/legacy/send_message_async_job_spec.rb
|
260
|
+
- spec/legacy/transmitter_spec.rb
|
202
261
|
- spec/spec_helper.rb
|
203
|
-
- spec/
|
262
|
+
- spec/support/test_configuration.rb
|
263
|
+
- spec/unit/channel_connector_spec.rb
|
264
|
+
- spec/unit/logging_spec.rb
|
265
|
+
- spec/unit/message_queuer_spec.rb
|
266
|
+
- spec/unit/queue_resque_job_handler_spec.rb
|
267
|
+
- spec/unit/test_handler_message_spec.rb
|
268
|
+
- spec/unit/transmitter_spec.rb
|