dispatch-rider 1.4.0 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +20 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +50 -0
- data/.travis.yml +6 -0
- data/CHANGELOG.md +363 -0
- data/Gemfile +25 -0
- data/LICENSE.txt +1 -1
- data/README.md +32 -3
- data/Rakefile +38 -0
- data/dispatch-rider.gemspec +46 -0
- data/lib/dispatch-rider/notification_services/aws_sns.rb +9 -0
- data/lib/dispatch-rider/version.rb +1 -1
- data/spec/fixtures/handlers/another_test_handler.rb +2 -0
- data/spec/fixtures/handlers/test_handler.rb +2 -0
- data/spec/lib/dispatch-rider/airbrake_error_handler_spec.rb +16 -0
- data/spec/lib/dispatch-rider/callbacks/access_spec.rb +62 -0
- data/spec/lib/dispatch-rider/callbacks/storage_spec.rb +43 -0
- data/spec/lib/dispatch-rider/configuration_spec.rb +74 -0
- data/spec/lib/dispatch-rider/default_error_handler_spec.rb +14 -0
- data/spec/lib/dispatch-rider/demultiplexer_spec.rb +117 -0
- data/spec/lib/dispatch-rider/dispatcher_spec.rb +69 -0
- data/spec/lib/dispatch-rider/handlers/base_spec.rb +81 -0
- data/spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb +27 -0
- data/spec/lib/dispatch-rider/message_spec.rb +59 -0
- data/spec/lib/dispatch-rider/notification_services/aws_sns_spec.rb +28 -0
- data/spec/lib/dispatch-rider/notification_services/base_spec.rb +65 -0
- data/spec/lib/dispatch-rider/notification_services/file_system/channel_spec.rb +28 -0
- data/spec/lib/dispatch-rider/notification_services/file_system/notifier_spec.rb +14 -0
- data/spec/lib/dispatch-rider/notification_services/file_system_spec.rb +23 -0
- data/spec/lib/dispatch-rider/notification_services_spec.rb +4 -0
- data/spec/lib/dispatch-rider/publisher/base_spec.rb +79 -0
- data/spec/lib/dispatch-rider/publisher/configuration/destination_spec.rb +100 -0
- data/spec/lib/dispatch-rider/publisher/configuration/notification_service_spec.rb +53 -0
- data/spec/lib/dispatch-rider/publisher/configuration_reader_spec.rb +129 -0
- data/spec/lib/dispatch-rider/publisher/configuration_spec.rb +149 -0
- data/spec/lib/dispatch-rider/publisher/configuration_support_spec.rb +89 -0
- data/spec/lib/dispatch-rider/publisher_spec.rb +123 -0
- data/spec/lib/dispatch-rider/queue_services/aws_sqs_spec.rb +193 -0
- data/spec/lib/dispatch-rider/queue_services/base_spec.rb +147 -0
- data/spec/lib/dispatch-rider/queue_services/file_system_spec.rb +88 -0
- data/spec/lib/dispatch-rider/queue_services/received_message_spec.rb +23 -0
- data/spec/lib/dispatch-rider/queue_services/simple_spec.rb +63 -0
- data/spec/lib/dispatch-rider/queue_services_spec.rb +6 -0
- data/spec/lib/dispatch-rider/registrars/base_spec.rb +68 -0
- data/spec/lib/dispatch-rider/registrars/file_system_channel_spec.rb +12 -0
- data/spec/lib/dispatch-rider/registrars/handler_spec.rb +16 -0
- data/spec/lib/dispatch-rider/registrars/notification_service_spec.rb +13 -0
- data/spec/lib/dispatch-rider/registrars/publishing_destination_spec.rb +11 -0
- data/spec/lib/dispatch-rider/registrars/queue_service_spec.rb +13 -0
- data/spec/lib/dispatch-rider/registrars/sns_channel_spec.rb +14 -0
- data/spec/lib/dispatch-rider/registrars_spec.rb +4 -0
- data/spec/lib/dispatch-rider/runner_spec.rb +25 -0
- data/spec/lib/dispatch-rider/subscriber_spec.rb +140 -0
- data/spec/lib/dispatch-rider_spec.rb +27 -0
- data/spec/spec_helper.rb +21 -0
- metadata +107 -86
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe DispatchRider do
|
4
|
+
|
5
|
+
describe ".configuration" do
|
6
|
+
example do
|
7
|
+
described_class.configuration.should be_a(DispatchRider::Configuration)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe ".config" do
|
12
|
+
example do
|
13
|
+
described_class.config.should be_a(DispatchRider::Configuration)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe ".configure" do
|
18
|
+
example do
|
19
|
+
described_class.configure do |config|
|
20
|
+
config.queue_kind = :test_queue
|
21
|
+
end
|
22
|
+
|
23
|
+
described_class.config.queue_kind.should == :test_queue
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
|
4
|
+
require 'aws'
|
5
|
+
require 'rake'
|
6
|
+
require 'tempfile'
|
7
|
+
|
8
|
+
RSpec.configure do |config|
|
9
|
+
config.mock_with :rspec
|
10
|
+
config.order = 'random'
|
11
|
+
config.color = true
|
12
|
+
config.tty = true
|
13
|
+
config.mock_with :rspec do |mocks|
|
14
|
+
mocks.yield_receiver_to_any_instance_implementation_blocks = false
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# Airbrake dummy module
|
19
|
+
module Airbrake; end
|
20
|
+
|
21
|
+
require 'dispatch-rider'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dispatch-rider
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suman Mukherjee
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-
|
14
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -56,104 +56,41 @@ dependencies:
|
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0'
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
|
-
name:
|
59
|
+
name: retries
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
62
|
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '0'
|
65
|
-
type: :
|
66
|
-
prerelease: false
|
67
|
-
version_requirements: !ruby/object:Gem::Requirement
|
68
|
-
requirements:
|
69
|
-
- - ">="
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: '0'
|
72
|
-
- !ruby/object:Gem::Dependency
|
73
|
-
name: jeweler
|
74
|
-
requirement: !ruby/object:Gem::Requirement
|
75
|
-
requirements:
|
76
|
-
- - "~>"
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: 1.8.4
|
79
|
-
type: :development
|
80
|
-
prerelease: false
|
81
|
-
version_requirements: !ruby/object:Gem::Requirement
|
82
|
-
requirements:
|
83
|
-
- - "~>"
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: 1.8.4
|
86
|
-
- !ruby/object:Gem::Dependency
|
87
|
-
name: rake
|
88
|
-
requirement: !ruby/object:Gem::Requirement
|
89
|
-
requirements:
|
90
|
-
- - ">="
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: '0'
|
93
|
-
type: :development
|
94
|
-
prerelease: false
|
95
|
-
version_requirements: !ruby/object:Gem::Requirement
|
96
|
-
requirements:
|
97
|
-
- - ">="
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '0'
|
100
|
-
- !ruby/object:Gem::Dependency
|
101
|
-
name: travis-lint
|
102
|
-
requirement: !ruby/object:Gem::Requirement
|
103
|
-
requirements:
|
104
|
-
- - ">="
|
105
|
-
- !ruby/object:Gem::Version
|
106
|
-
version: '0'
|
107
|
-
type: :development
|
108
|
-
prerelease: false
|
109
|
-
version_requirements: !ruby/object:Gem::Requirement
|
110
|
-
requirements:
|
111
|
-
- - ">="
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
version: '0'
|
114
|
-
- !ruby/object:Gem::Dependency
|
115
|
-
name: rspec
|
116
|
-
requirement: !ruby/object:Gem::Requirement
|
117
|
-
requirements:
|
118
|
-
- - "~>"
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: '2.0'
|
121
|
-
type: :development
|
122
|
-
prerelease: false
|
123
|
-
version_requirements: !ruby/object:Gem::Requirement
|
124
|
-
requirements:
|
125
|
-
- - "~>"
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: '2.0'
|
128
|
-
- !ruby/object:Gem::Dependency
|
129
|
-
name: byebug
|
130
|
-
requirement: !ruby/object:Gem::Requirement
|
131
|
-
requirements:
|
132
|
-
- - ">="
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version: '0'
|
135
|
-
type: :development
|
65
|
+
type: :runtime
|
136
66
|
prerelease: false
|
137
67
|
version_requirements: !ruby/object:Gem::Requirement
|
138
68
|
requirements:
|
139
69
|
- - ">="
|
140
70
|
- !ruby/object:Gem::Version
|
141
71
|
version: '0'
|
142
|
-
description: Messaging system
|
143
|
-
|
72
|
+
description: "\n Messaging system based on the reactor pattern.\n\n You can
|
73
|
+
publish messages to a queue and then a demultiplexer\n runs an event loop which
|
74
|
+
pops items from the queue and hands\n it over to a dispatcher.\n\n The dispatcher
|
75
|
+
hands over the message to the appropriate\n handler.\n\n You can choose your
|
76
|
+
own queueing service.\n "
|
144
77
|
email:
|
145
|
-
- suman@payrollhero.com
|
146
|
-
- dnatoli@payrollhero.com
|
147
78
|
- piotr@payrollhero.com
|
148
79
|
- rmaravilla@payrollhero.com
|
149
80
|
executables: []
|
150
81
|
extensions: []
|
151
|
-
extra_rdoc_files:
|
152
|
-
- LICENSE.txt
|
153
|
-
- README.md
|
82
|
+
extra_rdoc_files: []
|
154
83
|
files:
|
84
|
+
- ".gitignore"
|
85
|
+
- ".hound.yml"
|
86
|
+
- ".rubocop.yml"
|
87
|
+
- ".travis.yml"
|
88
|
+
- CHANGELOG.md
|
89
|
+
- Gemfile
|
155
90
|
- LICENSE.txt
|
156
91
|
- README.md
|
92
|
+
- Rakefile
|
93
|
+
- dispatch-rider.gemspec
|
157
94
|
- lib/dispatch-rider.rb
|
158
95
|
- lib/dispatch-rider/callbacks.rb
|
159
96
|
- lib/dispatch-rider/callbacks/access.rb
|
@@ -214,6 +151,49 @@ files:
|
|
214
151
|
- lib/generators/dispatch_rider/job/templates/handler/handler_spec.rb.erb
|
215
152
|
- lib/generators/dispatch_rider/job/templates/publisher/publisher.rb.erb
|
216
153
|
- lib/generators/dispatch_rider/job/templates/publisher/publisher_spec.rb.erb
|
154
|
+
- spec/fixtures/handlers/another_test_handler.rb
|
155
|
+
- spec/fixtures/handlers/test_handler.rb
|
156
|
+
- spec/lib/dispatch-rider/airbrake_error_handler_spec.rb
|
157
|
+
- spec/lib/dispatch-rider/callbacks/access_spec.rb
|
158
|
+
- spec/lib/dispatch-rider/callbacks/storage_spec.rb
|
159
|
+
- spec/lib/dispatch-rider/configuration_spec.rb
|
160
|
+
- spec/lib/dispatch-rider/default_error_handler_spec.rb
|
161
|
+
- spec/lib/dispatch-rider/demultiplexer_spec.rb
|
162
|
+
- spec/lib/dispatch-rider/dispatcher_spec.rb
|
163
|
+
- spec/lib/dispatch-rider/handlers/base_spec.rb
|
164
|
+
- spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
|
165
|
+
- spec/lib/dispatch-rider/message_spec.rb
|
166
|
+
- spec/lib/dispatch-rider/notification_services/aws_sns_spec.rb
|
167
|
+
- spec/lib/dispatch-rider/notification_services/base_spec.rb
|
168
|
+
- spec/lib/dispatch-rider/notification_services/file_system/channel_spec.rb
|
169
|
+
- spec/lib/dispatch-rider/notification_services/file_system/notifier_spec.rb
|
170
|
+
- spec/lib/dispatch-rider/notification_services/file_system_spec.rb
|
171
|
+
- spec/lib/dispatch-rider/notification_services_spec.rb
|
172
|
+
- spec/lib/dispatch-rider/publisher/base_spec.rb
|
173
|
+
- spec/lib/dispatch-rider/publisher/configuration/destination_spec.rb
|
174
|
+
- spec/lib/dispatch-rider/publisher/configuration/notification_service_spec.rb
|
175
|
+
- spec/lib/dispatch-rider/publisher/configuration_reader_spec.rb
|
176
|
+
- spec/lib/dispatch-rider/publisher/configuration_spec.rb
|
177
|
+
- spec/lib/dispatch-rider/publisher/configuration_support_spec.rb
|
178
|
+
- spec/lib/dispatch-rider/publisher_spec.rb
|
179
|
+
- spec/lib/dispatch-rider/queue_services/aws_sqs_spec.rb
|
180
|
+
- spec/lib/dispatch-rider/queue_services/base_spec.rb
|
181
|
+
- spec/lib/dispatch-rider/queue_services/file_system_spec.rb
|
182
|
+
- spec/lib/dispatch-rider/queue_services/received_message_spec.rb
|
183
|
+
- spec/lib/dispatch-rider/queue_services/simple_spec.rb
|
184
|
+
- spec/lib/dispatch-rider/queue_services_spec.rb
|
185
|
+
- spec/lib/dispatch-rider/registrars/base_spec.rb
|
186
|
+
- spec/lib/dispatch-rider/registrars/file_system_channel_spec.rb
|
187
|
+
- spec/lib/dispatch-rider/registrars/handler_spec.rb
|
188
|
+
- spec/lib/dispatch-rider/registrars/notification_service_spec.rb
|
189
|
+
- spec/lib/dispatch-rider/registrars/publishing_destination_spec.rb
|
190
|
+
- spec/lib/dispatch-rider/registrars/queue_service_spec.rb
|
191
|
+
- spec/lib/dispatch-rider/registrars/sns_channel_spec.rb
|
192
|
+
- spec/lib/dispatch-rider/registrars_spec.rb
|
193
|
+
- spec/lib/dispatch-rider/runner_spec.rb
|
194
|
+
- spec/lib/dispatch-rider/subscriber_spec.rb
|
195
|
+
- spec/lib/dispatch-rider_spec.rb
|
196
|
+
- spec/spec_helper.rb
|
217
197
|
homepage: https://github.com/payrollhero/dispatch-rider
|
218
198
|
licenses:
|
219
199
|
- MIT
|
@@ -237,8 +217,49 @@ rubyforge_project:
|
|
237
217
|
rubygems_version: 2.2.2
|
238
218
|
signing_key:
|
239
219
|
specification_version: 4
|
240
|
-
summary: Messaging system
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
220
|
+
summary: Messaging system that is customizable based on which queueing system we are
|
221
|
+
using.
|
222
|
+
test_files:
|
223
|
+
- spec/fixtures/handlers/another_test_handler.rb
|
224
|
+
- spec/fixtures/handlers/test_handler.rb
|
225
|
+
- spec/lib/dispatch-rider/airbrake_error_handler_spec.rb
|
226
|
+
- spec/lib/dispatch-rider/callbacks/access_spec.rb
|
227
|
+
- spec/lib/dispatch-rider/callbacks/storage_spec.rb
|
228
|
+
- spec/lib/dispatch-rider/configuration_spec.rb
|
229
|
+
- spec/lib/dispatch-rider/default_error_handler_spec.rb
|
230
|
+
- spec/lib/dispatch-rider/demultiplexer_spec.rb
|
231
|
+
- spec/lib/dispatch-rider/dispatcher_spec.rb
|
232
|
+
- spec/lib/dispatch-rider/handlers/base_spec.rb
|
233
|
+
- spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
|
234
|
+
- spec/lib/dispatch-rider/message_spec.rb
|
235
|
+
- spec/lib/dispatch-rider/notification_services/aws_sns_spec.rb
|
236
|
+
- spec/lib/dispatch-rider/notification_services/base_spec.rb
|
237
|
+
- spec/lib/dispatch-rider/notification_services/file_system/channel_spec.rb
|
238
|
+
- spec/lib/dispatch-rider/notification_services/file_system/notifier_spec.rb
|
239
|
+
- spec/lib/dispatch-rider/notification_services/file_system_spec.rb
|
240
|
+
- spec/lib/dispatch-rider/notification_services_spec.rb
|
241
|
+
- spec/lib/dispatch-rider/publisher/base_spec.rb
|
242
|
+
- spec/lib/dispatch-rider/publisher/configuration/destination_spec.rb
|
243
|
+
- spec/lib/dispatch-rider/publisher/configuration/notification_service_spec.rb
|
244
|
+
- spec/lib/dispatch-rider/publisher/configuration_reader_spec.rb
|
245
|
+
- spec/lib/dispatch-rider/publisher/configuration_spec.rb
|
246
|
+
- spec/lib/dispatch-rider/publisher/configuration_support_spec.rb
|
247
|
+
- spec/lib/dispatch-rider/publisher_spec.rb
|
248
|
+
- spec/lib/dispatch-rider/queue_services/aws_sqs_spec.rb
|
249
|
+
- spec/lib/dispatch-rider/queue_services/base_spec.rb
|
250
|
+
- spec/lib/dispatch-rider/queue_services/file_system_spec.rb
|
251
|
+
- spec/lib/dispatch-rider/queue_services/received_message_spec.rb
|
252
|
+
- spec/lib/dispatch-rider/queue_services/simple_spec.rb
|
253
|
+
- spec/lib/dispatch-rider/queue_services_spec.rb
|
254
|
+
- spec/lib/dispatch-rider/registrars/base_spec.rb
|
255
|
+
- spec/lib/dispatch-rider/registrars/file_system_channel_spec.rb
|
256
|
+
- spec/lib/dispatch-rider/registrars/handler_spec.rb
|
257
|
+
- spec/lib/dispatch-rider/registrars/notification_service_spec.rb
|
258
|
+
- spec/lib/dispatch-rider/registrars/publishing_destination_spec.rb
|
259
|
+
- spec/lib/dispatch-rider/registrars/queue_service_spec.rb
|
260
|
+
- spec/lib/dispatch-rider/registrars/sns_channel_spec.rb
|
261
|
+
- spec/lib/dispatch-rider/registrars_spec.rb
|
262
|
+
- spec/lib/dispatch-rider/runner_spec.rb
|
263
|
+
- spec/lib/dispatch-rider/subscriber_spec.rb
|
264
|
+
- spec/lib/dispatch-rider_spec.rb
|
265
|
+
- spec/spec_helper.rb
|