totoro 1.0.6 → 1.0.7
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/lib/totoro/base_queue.rb +4 -4
- data/lib/totoro/version.rb +1 -1
- metadata +1 -97
- data/pkg/totoro-1.0.5/CODE_OF_CONDUCT.md +0 -74
- data/pkg/totoro-1.0.5/Dockerfile +0 -14
- data/pkg/totoro-1.0.5/Gemfile +0 -8
- data/pkg/totoro-1.0.5/Gemfile.lock +0 -68
- data/pkg/totoro-1.0.5/LICENSE.txt +0 -21
- data/pkg/totoro-1.0.5/README.md +0 -169
- data/pkg/totoro-1.0.5/Rakefile +0 -8
- data/pkg/totoro-1.0.5/bin/console +0 -15
- data/pkg/totoro-1.0.5/bin/setup +0 -8
- data/pkg/totoro-1.0.5/bin/totoro +0 -16
- data/pkg/totoro-1.0.5/docker-compose.yml +0 -43
- data/pkg/totoro-1.0.5/lib/generators/totoro/config_generator.rb +0 -12
- data/pkg/totoro-1.0.5/lib/generators/totoro/init_generator.rb +0 -14
- data/pkg/totoro-1.0.5/lib/generators/totoro/templates/create_totoro_failed_messages.rb +0 -12
- data/pkg/totoro-1.0.5/lib/generators/totoro/templates/initializer.rb +0 -1
- data/pkg/totoro-1.0.5/lib/generators/totoro/templates/totoro.yml +0 -33
- data/pkg/totoro-1.0.5/lib/generators/totoro/templates/update_totoro_failed_messages.rb +0 -6
- data/pkg/totoro-1.0.5/lib/generators/totoro/templates/worker.rb.erb +0 -10
- data/pkg/totoro-1.0.5/lib/generators/totoro/update_generator.rb +0 -12
- data/pkg/totoro-1.0.5/lib/generators/totoro/worker_generator.rb +0 -17
- data/pkg/totoro-1.0.5/lib/totoro.rb +0 -21
- data/pkg/totoro-1.0.5/lib/totoro/base_queue.rb +0 -44
- data/pkg/totoro-1.0.5/lib/totoro/base_worker.rb +0 -61
- data/pkg/totoro-1.0.5/lib/totoro/config.rb +0 -44
- data/pkg/totoro-1.0.5/lib/totoro/errors/connection_break_error.rb +0 -6
- data/pkg/totoro-1.0.5/lib/totoro/errors/need_queue_name_error.rb +0 -5
- data/pkg/totoro-1.0.5/lib/totoro/initializer.rb +0 -39
- data/pkg/totoro-1.0.5/lib/totoro/message_resender.rb +0 -17
- data/pkg/totoro-1.0.5/lib/totoro/models/totoro_failed_message.rb +0 -8
- data/pkg/totoro-1.0.5/lib/totoro/railtie.rb +0 -15
- data/pkg/totoro-1.0.5/lib/totoro/services/broadcast_service.rb +0 -33
- data/pkg/totoro-1.0.5/lib/totoro/services/enqueue_service.rb +0 -38
- data/pkg/totoro-1.0.5/lib/totoro/services/resend_service.rb +0 -19
- data/pkg/totoro-1.0.5/lib/totoro/services/subscribe_service.rb +0 -34
- data/pkg/totoro-1.0.5/lib/totoro/tasks/resend_message.rake +0 -8
- data/pkg/totoro-1.0.5/lib/totoro/utils.rb +0 -22
- data/pkg/totoro-1.0.5/lib/totoro/version.rb +0 -5
- data/pkg/totoro-1.0.5/pkg/totoro-1.0.4.gem +0 -0
- data/pkg/totoro-1.0.5/spec/spec_helper.rb +0 -14
- data/pkg/totoro-1.0.5/spec/totoro_spec.rb +0 -9
- data/pkg/totoro-1.0.5/test/rabbitmq_commands.txt +0 -6
- data/pkg/totoro-1.0.5/test/totoro_test/Gemfile +0 -43
- data/pkg/totoro-1.0.5/test/totoro_test/Gemfile.lock +0 -157
- data/pkg/totoro-1.0.5/test/totoro_test/README.md +0 -24
- data/pkg/totoro-1.0.5/test/totoro_test/Rakefile +0 -6
- data/pkg/totoro-1.0.5/test/totoro_test/app/channels/application_cable/channel.rb +0 -4
- data/pkg/totoro-1.0.5/test/totoro_test/app/channels/application_cable/connection.rb +0 -4
- data/pkg/totoro-1.0.5/test/totoro_test/app/controllers/application_controller.rb +0 -2
- data/pkg/totoro-1.0.5/test/totoro_test/app/jobs/application_job.rb +0 -2
- data/pkg/totoro-1.0.5/test/totoro_test/app/mailers/application_mailer.rb +0 -4
- data/pkg/totoro-1.0.5/test/totoro_test/app/models/application_record.rb +0 -3
- data/pkg/totoro-1.0.5/test/totoro_test/app/models/worker/example_queue.rb +0 -10
- data/pkg/totoro-1.0.5/test/totoro_test/app/models/worker/exchange_queue.rb +0 -10
- data/pkg/totoro-1.0.5/test/totoro_test/app/models/worker/shu_queue.rb +0 -10
- data/pkg/totoro-1.0.5/test/totoro_test/app/services/bench_mark.txt +0 -7
- data/pkg/totoro-1.0.5/test/totoro_test/app/services/load_test.rb +0 -19
- data/pkg/totoro-1.0.5/test/totoro_test/app/views/layouts/mailer.html.erb +0 -13
- data/pkg/totoro-1.0.5/test/totoro_test/app/views/layouts/mailer.text.erb +0 -1
- data/pkg/totoro-1.0.5/test/totoro_test/bin/bundle +0 -3
- data/pkg/totoro-1.0.5/test/totoro_test/bin/delayed_job +0 -5
- data/pkg/totoro-1.0.5/test/totoro_test/bin/rails +0 -9
- data/pkg/totoro-1.0.5/test/totoro_test/bin/rake +0 -9
- data/pkg/totoro-1.0.5/test/totoro_test/bin/setup +0 -34
- data/pkg/totoro-1.0.5/test/totoro_test/bin/spring +0 -17
- data/pkg/totoro-1.0.5/test/totoro_test/bin/update +0 -29
- data/pkg/totoro-1.0.5/test/totoro_test/config.ru +0 -5
- data/pkg/totoro-1.0.5/test/totoro_test/config/application.rb +0 -34
- data/pkg/totoro-1.0.5/test/totoro_test/config/boot.rb +0 -3
- data/pkg/totoro-1.0.5/test/totoro_test/config/cable.yml +0 -10
- data/pkg/totoro-1.0.5/test/totoro_test/config/database.yml +0 -55
- data/pkg/totoro-1.0.5/test/totoro_test/config/environment.rb +0 -5
- data/pkg/totoro-1.0.5/test/totoro_test/config/environments/development.rb +0 -47
- data/pkg/totoro-1.0.5/test/totoro_test/config/environments/production.rb +0 -82
- data/pkg/totoro-1.0.5/test/totoro_test/config/environments/test.rb +0 -41
- data/pkg/totoro-1.0.5/test/totoro_test/config/initializers/application_controller_renderer.rb +0 -8
- data/pkg/totoro-1.0.5/test/totoro_test/config/initializers/backtrace_silencers.rb +0 -7
- data/pkg/totoro-1.0.5/test/totoro_test/config/initializers/cors.rb +0 -16
- data/pkg/totoro-1.0.5/test/totoro_test/config/initializers/filter_parameter_logging.rb +0 -4
- data/pkg/totoro-1.0.5/test/totoro_test/config/initializers/inflections.rb +0 -16
- data/pkg/totoro-1.0.5/test/totoro_test/config/initializers/mime_types.rb +0 -4
- data/pkg/totoro-1.0.5/test/totoro_test/config/initializers/totoro.rb +0 -1
- data/pkg/totoro-1.0.5/test/totoro_test/config/initializers/wrap_parameters.rb +0 -14
- data/pkg/totoro-1.0.5/test/totoro_test/config/locales/en.yml +0 -33
- data/pkg/totoro-1.0.5/test/totoro_test/config/puma.rb +0 -56
- data/pkg/totoro-1.0.5/test/totoro_test/config/routes.rb +0 -3
- data/pkg/totoro-1.0.5/test/totoro_test/config/secrets.yml +0 -32
- data/pkg/totoro-1.0.5/test/totoro_test/config/spring.rb +0 -6
- data/pkg/totoro-1.0.5/test/totoro_test/config/totoro.yml +0 -42
- data/pkg/totoro-1.0.5/test/totoro_test/db/migrate/20181019041208_create_delayed_jobs.rb +0 -22
- data/pkg/totoro-1.0.5/test/totoro_test/db/migrate/20181019070846_create_totoro_failed_messages.rb +0 -11
- data/pkg/totoro-1.0.5/test/totoro_test/db/migrate/20181228033422_update_totoro_failed_messages.rb +0 -5
- data/pkg/totoro-1.0.5/test/totoro_test/db/schema.rb +0 -42
- data/pkg/totoro-1.0.5/test/totoro_test/db/seeds.rb +0 -7
- data/pkg/totoro-1.0.5/test/totoro_test/public/robots.txt +0 -1
- data/pkg/totoro-1.0.5/test/totoro_test/test/test_helper.rb +0 -10
- data/pkg/totoro-1.0.5/totoro.gemspec +0 -29
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb6266b350ffe737110b70c01f24df7314cf7b397fe30f9cd854fdd55899f42c
|
|
4
|
+
data.tar.gz: '095c41d069f4cda02d50166dff77838ff81e2421bc8d2ebc6b0973377c55636e'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a835c146420287475f089868069ee1e6bf0664a3aab2d6b6174366c0ef13f81c8c21418a30fa35ffbf0b0173dcb74b00e747849ca4422bed489aa636ec785da9
|
|
7
|
+
data.tar.gz: deb1960a1c4ae21352943e44b05e878023d566d0e8fd1e7af89be215ae1e932fab46ccf51a31cf4d08e97645cee7573e862343ba6f7b9f42936856142539eb16
|
data/lib/totoro/base_queue.rb
CHANGED
|
@@ -13,14 +13,14 @@ module Totoro
|
|
|
13
13
|
@connection ||= Bunny.new(config.connect.merge(threaded: false))
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def broadcast(id, payload)
|
|
17
|
-
Totoro::BroadcastService.new(connection, config).broadcast(id, payload)
|
|
16
|
+
def broadcast(id, payload, attrs = {})
|
|
17
|
+
Totoro::BroadcastService.new(connection, config).broadcast(id, payload, attrs)
|
|
18
18
|
rescue Totoro::ConnectionBreakError => error
|
|
19
19
|
handle_failed_msg(id, payload, error, :broadcast)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
def enqueue(id, payload)
|
|
23
|
-
Totoro::EnqueueService.new(connection, config).enqueue(id, payload)
|
|
22
|
+
def enqueue(id, payload, attrs = {})
|
|
23
|
+
Totoro::EnqueueService.new(connection, config).enqueue(id, payload, attrs)
|
|
24
24
|
rescue Totoro::ConnectionBreakError => error
|
|
25
25
|
handle_failed_msg(id, payload, error, :enqueue)
|
|
26
26
|
end
|
data/lib/totoro/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: totoro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- BlockchainTech
|
|
@@ -141,102 +141,6 @@ files:
|
|
|
141
141
|
- lib/totoro/version.rb
|
|
142
142
|
- pkg/totoro-1.0.4.gem
|
|
143
143
|
- pkg/totoro-1.0.5.gem
|
|
144
|
-
- pkg/totoro-1.0.5/CODE_OF_CONDUCT.md
|
|
145
|
-
- pkg/totoro-1.0.5/Dockerfile
|
|
146
|
-
- pkg/totoro-1.0.5/Gemfile
|
|
147
|
-
- pkg/totoro-1.0.5/Gemfile.lock
|
|
148
|
-
- pkg/totoro-1.0.5/LICENSE.txt
|
|
149
|
-
- pkg/totoro-1.0.5/README.md
|
|
150
|
-
- pkg/totoro-1.0.5/Rakefile
|
|
151
|
-
- pkg/totoro-1.0.5/bin/console
|
|
152
|
-
- pkg/totoro-1.0.5/bin/setup
|
|
153
|
-
- pkg/totoro-1.0.5/bin/totoro
|
|
154
|
-
- pkg/totoro-1.0.5/docker-compose.yml
|
|
155
|
-
- pkg/totoro-1.0.5/lib/generators/totoro/config_generator.rb
|
|
156
|
-
- pkg/totoro-1.0.5/lib/generators/totoro/init_generator.rb
|
|
157
|
-
- pkg/totoro-1.0.5/lib/generators/totoro/templates/create_totoro_failed_messages.rb
|
|
158
|
-
- pkg/totoro-1.0.5/lib/generators/totoro/templates/initializer.rb
|
|
159
|
-
- pkg/totoro-1.0.5/lib/generators/totoro/templates/totoro.yml
|
|
160
|
-
- pkg/totoro-1.0.5/lib/generators/totoro/templates/update_totoro_failed_messages.rb
|
|
161
|
-
- pkg/totoro-1.0.5/lib/generators/totoro/templates/worker.rb.erb
|
|
162
|
-
- pkg/totoro-1.0.5/lib/generators/totoro/update_generator.rb
|
|
163
|
-
- pkg/totoro-1.0.5/lib/generators/totoro/worker_generator.rb
|
|
164
|
-
- pkg/totoro-1.0.5/lib/totoro.rb
|
|
165
|
-
- pkg/totoro-1.0.5/lib/totoro/base_queue.rb
|
|
166
|
-
- pkg/totoro-1.0.5/lib/totoro/base_worker.rb
|
|
167
|
-
- pkg/totoro-1.0.5/lib/totoro/config.rb
|
|
168
|
-
- pkg/totoro-1.0.5/lib/totoro/errors/connection_break_error.rb
|
|
169
|
-
- pkg/totoro-1.0.5/lib/totoro/errors/need_queue_name_error.rb
|
|
170
|
-
- pkg/totoro-1.0.5/lib/totoro/initializer.rb
|
|
171
|
-
- pkg/totoro-1.0.5/lib/totoro/message_resender.rb
|
|
172
|
-
- pkg/totoro-1.0.5/lib/totoro/models/totoro_failed_message.rb
|
|
173
|
-
- pkg/totoro-1.0.5/lib/totoro/railtie.rb
|
|
174
|
-
- pkg/totoro-1.0.5/lib/totoro/services/broadcast_service.rb
|
|
175
|
-
- pkg/totoro-1.0.5/lib/totoro/services/enqueue_service.rb
|
|
176
|
-
- pkg/totoro-1.0.5/lib/totoro/services/resend_service.rb
|
|
177
|
-
- pkg/totoro-1.0.5/lib/totoro/services/subscribe_service.rb
|
|
178
|
-
- pkg/totoro-1.0.5/lib/totoro/tasks/resend_message.rake
|
|
179
|
-
- pkg/totoro-1.0.5/lib/totoro/utils.rb
|
|
180
|
-
- pkg/totoro-1.0.5/lib/totoro/version.rb
|
|
181
|
-
- pkg/totoro-1.0.5/pkg/totoro-1.0.4.gem
|
|
182
|
-
- pkg/totoro-1.0.5/spec/spec_helper.rb
|
|
183
|
-
- pkg/totoro-1.0.5/spec/totoro_spec.rb
|
|
184
|
-
- pkg/totoro-1.0.5/test/rabbitmq_commands.txt
|
|
185
|
-
- pkg/totoro-1.0.5/test/totoro_test/Gemfile
|
|
186
|
-
- pkg/totoro-1.0.5/test/totoro_test/Gemfile.lock
|
|
187
|
-
- pkg/totoro-1.0.5/test/totoro_test/README.md
|
|
188
|
-
- pkg/totoro-1.0.5/test/totoro_test/Rakefile
|
|
189
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/channels/application_cable/channel.rb
|
|
190
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/channels/application_cable/connection.rb
|
|
191
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/controllers/application_controller.rb
|
|
192
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/jobs/application_job.rb
|
|
193
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/mailers/application_mailer.rb
|
|
194
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/models/application_record.rb
|
|
195
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/models/worker/example_queue.rb
|
|
196
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/models/worker/exchange_queue.rb
|
|
197
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/models/worker/shu_queue.rb
|
|
198
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/services/bench_mark.txt
|
|
199
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/services/load_test.rb
|
|
200
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/views/layouts/mailer.html.erb
|
|
201
|
-
- pkg/totoro-1.0.5/test/totoro_test/app/views/layouts/mailer.text.erb
|
|
202
|
-
- pkg/totoro-1.0.5/test/totoro_test/bin/bundle
|
|
203
|
-
- pkg/totoro-1.0.5/test/totoro_test/bin/delayed_job
|
|
204
|
-
- pkg/totoro-1.0.5/test/totoro_test/bin/rails
|
|
205
|
-
- pkg/totoro-1.0.5/test/totoro_test/bin/rake
|
|
206
|
-
- pkg/totoro-1.0.5/test/totoro_test/bin/setup
|
|
207
|
-
- pkg/totoro-1.0.5/test/totoro_test/bin/spring
|
|
208
|
-
- pkg/totoro-1.0.5/test/totoro_test/bin/update
|
|
209
|
-
- pkg/totoro-1.0.5/test/totoro_test/config.ru
|
|
210
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/application.rb
|
|
211
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/boot.rb
|
|
212
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/cable.yml
|
|
213
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/database.yml
|
|
214
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/environment.rb
|
|
215
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/environments/development.rb
|
|
216
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/environments/production.rb
|
|
217
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/environments/test.rb
|
|
218
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/initializers/application_controller_renderer.rb
|
|
219
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/initializers/backtrace_silencers.rb
|
|
220
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/initializers/cors.rb
|
|
221
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/initializers/filter_parameter_logging.rb
|
|
222
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/initializers/inflections.rb
|
|
223
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/initializers/mime_types.rb
|
|
224
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/initializers/totoro.rb
|
|
225
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/initializers/wrap_parameters.rb
|
|
226
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/locales/en.yml
|
|
227
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/puma.rb
|
|
228
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/routes.rb
|
|
229
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/secrets.yml
|
|
230
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/spring.rb
|
|
231
|
-
- pkg/totoro-1.0.5/test/totoro_test/config/totoro.yml
|
|
232
|
-
- pkg/totoro-1.0.5/test/totoro_test/db/migrate/20181019041208_create_delayed_jobs.rb
|
|
233
|
-
- pkg/totoro-1.0.5/test/totoro_test/db/migrate/20181019070846_create_totoro_failed_messages.rb
|
|
234
|
-
- pkg/totoro-1.0.5/test/totoro_test/db/migrate/20181228033422_update_totoro_failed_messages.rb
|
|
235
|
-
- pkg/totoro-1.0.5/test/totoro_test/db/schema.rb
|
|
236
|
-
- pkg/totoro-1.0.5/test/totoro_test/db/seeds.rb
|
|
237
|
-
- pkg/totoro-1.0.5/test/totoro_test/public/robots.txt
|
|
238
|
-
- pkg/totoro-1.0.5/test/totoro_test/test/test_helper.rb
|
|
239
|
-
- pkg/totoro-1.0.5/totoro.gemspec
|
|
240
144
|
- spec/spec_helper.rb
|
|
241
145
|
- spec/totoro_spec.rb
|
|
242
146
|
- test/rabbitmq_commands.txt
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
|
10
|
-
orientation.
|
|
11
|
-
|
|
12
|
-
## Our Standards
|
|
13
|
-
|
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
|
15
|
-
include:
|
|
16
|
-
|
|
17
|
-
* Using welcoming and inclusive language
|
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
|
19
|
-
* Gracefully accepting constructive criticism
|
|
20
|
-
* Focusing on what is best for the community
|
|
21
|
-
* Showing empathy towards other community members
|
|
22
|
-
|
|
23
|
-
Examples of unacceptable behavior by participants include:
|
|
24
|
-
|
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
-
advances
|
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
-
* Public or private harassment
|
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
|
30
|
-
address, without explicit permission
|
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
-
professional setting
|
|
33
|
-
|
|
34
|
-
## Our Responsibilities
|
|
35
|
-
|
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
-
response to any instances of unacceptable behavior.
|
|
39
|
-
|
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
-
threatening, offensive, or harmful.
|
|
45
|
-
|
|
46
|
-
## Scope
|
|
47
|
-
|
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
-
when an individual is representing the project or its community. Examples of
|
|
50
|
-
representing a project or community include using an official project e-mail
|
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
|
53
|
-
further defined and clarified by project maintainers.
|
|
54
|
-
|
|
55
|
-
## Enforcement
|
|
56
|
-
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at shu.hui@blockchaintech.net.au. All
|
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
|
63
|
-
|
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
-
members of the project's leadership.
|
|
67
|
-
|
|
68
|
-
## Attribution
|
|
69
|
-
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
|
72
|
-
|
|
73
|
-
[homepage]: http://contributor-covenant.org
|
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/pkg/totoro-1.0.5/Dockerfile
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
FROM ruby:2.5.0
|
|
2
|
-
|
|
3
|
-
#Cache bundle install
|
|
4
|
-
WORKDIR /tmp
|
|
5
|
-
ADD . /totoro
|
|
6
|
-
ADD ./test/totoro_test/Gemfile Gemfile
|
|
7
|
-
ADD ./test/totoro_test/Gemfile.lock Gemfile.lock
|
|
8
|
-
RUN bundle install
|
|
9
|
-
|
|
10
|
-
RUN mkdir /app
|
|
11
|
-
WORKDIR /app
|
|
12
|
-
ADD ./test/totoro_test /app
|
|
13
|
-
|
|
14
|
-
CMD ["rails", "c"]
|
data/pkg/totoro-1.0.5/Gemfile
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
totoro (1.0.4)
|
|
5
|
-
bunny (~> 2.10)
|
|
6
|
-
delayed_job_active_record (~> 4.1.3)
|
|
7
|
-
delayed_job_recurring (~> 0.3.7)
|
|
8
|
-
|
|
9
|
-
GEM
|
|
10
|
-
remote: https://rubygems.org/
|
|
11
|
-
specs:
|
|
12
|
-
activemodel (5.2.2)
|
|
13
|
-
activesupport (= 5.2.2)
|
|
14
|
-
activerecord (5.2.2)
|
|
15
|
-
activemodel (= 5.2.2)
|
|
16
|
-
activesupport (= 5.2.2)
|
|
17
|
-
arel (>= 9.0)
|
|
18
|
-
activesupport (5.2.2)
|
|
19
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
20
|
-
i18n (>= 0.7, < 2)
|
|
21
|
-
minitest (~> 5.1)
|
|
22
|
-
tzinfo (~> 1.1)
|
|
23
|
-
amq-protocol (2.3.0)
|
|
24
|
-
arel (9.0.0)
|
|
25
|
-
bunny (2.13.0)
|
|
26
|
-
amq-protocol (~> 2.3, >= 2.3.0)
|
|
27
|
-
concurrent-ruby (1.1.4)
|
|
28
|
-
delayed_job (4.1.5)
|
|
29
|
-
activesupport (>= 3.0, < 5.3)
|
|
30
|
-
delayed_job_active_record (4.1.3)
|
|
31
|
-
activerecord (>= 3.0, < 5.3)
|
|
32
|
-
delayed_job (>= 3.0, < 5)
|
|
33
|
-
delayed_job_recurring (0.3.8)
|
|
34
|
-
delayed_job (>= 3.0)
|
|
35
|
-
delayed_job_active_record
|
|
36
|
-
diff-lcs (1.3)
|
|
37
|
-
i18n (1.5.3)
|
|
38
|
-
concurrent-ruby (~> 1.0)
|
|
39
|
-
minitest (5.11.3)
|
|
40
|
-
rake (10.5.0)
|
|
41
|
-
rspec (3.7.0)
|
|
42
|
-
rspec-core (~> 3.7.0)
|
|
43
|
-
rspec-expectations (~> 3.7.0)
|
|
44
|
-
rspec-mocks (~> 3.7.0)
|
|
45
|
-
rspec-core (3.7.1)
|
|
46
|
-
rspec-support (~> 3.7.0)
|
|
47
|
-
rspec-expectations (3.7.0)
|
|
48
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
49
|
-
rspec-support (~> 3.7.0)
|
|
50
|
-
rspec-mocks (3.7.0)
|
|
51
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
52
|
-
rspec-support (~> 3.7.0)
|
|
53
|
-
rspec-support (3.7.1)
|
|
54
|
-
thread_safe (0.3.6)
|
|
55
|
-
tzinfo (1.2.5)
|
|
56
|
-
thread_safe (~> 0.1)
|
|
57
|
-
|
|
58
|
-
PLATFORMS
|
|
59
|
-
ruby
|
|
60
|
-
|
|
61
|
-
DEPENDENCIES
|
|
62
|
-
bundler (~> 1.16)
|
|
63
|
-
rake (~> 10.0)
|
|
64
|
-
rspec (~> 3.0)
|
|
65
|
-
totoro!
|
|
66
|
-
|
|
67
|
-
BUNDLED WITH
|
|
68
|
-
1.16.2
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018 ShuHui18
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
data/pkg/totoro-1.0.5/README.md
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
# Totoro, a RabbitMQ Util
|
|
2
|
-
|
|
3
|
-
Totoro is a RabbitMQ util that focuses on samplify queue operation.
|
|
4
|
-
## Dependencies
|
|
5
|
-
Please install [Delayed Job active record](https://rubygems.org/gems/delayed_job_active_record) and [Delayed Job recurring](https://rubygems.org/gems/delayed_job_recurring) before use Totoro.
|
|
6
|
-
Totoro basically use delayed job to cache and resend falied messages.
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
### Install gem
|
|
10
|
-
Add this line to your application's Gemfile:
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
gem 'totoro'
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
And then execute:
|
|
17
|
-
|
|
18
|
-
$ bundle
|
|
19
|
-
|
|
20
|
-
#### Initialize Totoro for Rails app
|
|
21
|
-
```
|
|
22
|
-
rails g totoro:init
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
This command will generate two files
|
|
26
|
-
|
|
27
|
-
1. `totoro.yml` (Rabbitmq configuration file)
|
|
28
|
-
2. `initilizers/totoro.rb` (Rails initializer)
|
|
29
|
-
3. `db/migrate/[tiemstamp]_create_totoro_failed_messages.rb` (DB migration to create messages caching table)
|
|
30
|
-
|
|
31
|
-
#### if you havn't install gem delayed_jobs, then run initialization scripts
|
|
32
|
-
```
|
|
33
|
-
rails g delayed_job:active_record
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
#### Run DB migraion
|
|
37
|
-
`rake db:migrate`
|
|
38
|
-
|
|
39
|
-
## Sample configuration
|
|
40
|
-
|
|
41
|
-
```yaml
|
|
42
|
-
default: &default
|
|
43
|
-
default:
|
|
44
|
-
connect:
|
|
45
|
-
host: rabbitmq
|
|
46
|
-
port: 5672
|
|
47
|
-
user: app
|
|
48
|
-
pass: app
|
|
49
|
-
queue:
|
|
50
|
-
normal_queue_for_both_enqueue_and_subscribe:
|
|
51
|
-
name: default_exchange.queue.name
|
|
52
|
-
durable: true
|
|
53
|
-
clean_start: false
|
|
54
|
-
exchange_queue_for_subscribe:
|
|
55
|
-
name: fanout.exchange.queue
|
|
56
|
-
durable: true
|
|
57
|
-
exchange: fanout.exchange.name
|
|
58
|
-
exchange:
|
|
59
|
-
exchange_for_fanout_enqueue:
|
|
60
|
-
name: fanout.exchange.name
|
|
61
|
-
|
|
62
|
-
custom:
|
|
63
|
-
connect:
|
|
64
|
-
host: rabbitmq
|
|
65
|
-
port: 5672
|
|
66
|
-
user: app
|
|
67
|
-
pass: app
|
|
68
|
-
queue:
|
|
69
|
-
custom_queue:
|
|
70
|
-
name: custom.queue.name
|
|
71
|
-
durable: true
|
|
72
|
-
|
|
73
|
-
development:
|
|
74
|
-
<<: *default
|
|
75
|
-
|
|
76
|
-
test:
|
|
77
|
-
<<: *default
|
|
78
|
-
|
|
79
|
-
production:
|
|
80
|
-
<<: *default
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
## Quick Start
|
|
84
|
-
|
|
85
|
-
### Resend Failed messages daemon
|
|
86
|
-
|
|
87
|
-
Please run `rake totoro:resend_msg` before you start your app.
|
|
88
|
-
|
|
89
|
-
### Default rabbitmq server
|
|
90
|
-
|
|
91
|
-
#### Enqueue
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
Totoro::Queue.enqueue('queue_id', payload)
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
#### BroadCast (Enqueue to fanout exchange)
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
Totoro::Queue.broadcast('exchange_id', payload)
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
#### Dequeue
|
|
104
|
-
To create a dequeue daemon, first you need to create a worker
|
|
105
|
-
```
|
|
106
|
-
rails g totoro:worker <worker_name> <queue_name>
|
|
107
|
-
```
|
|
108
|
-
after that, add business logic in the process method
|
|
109
|
-
```
|
|
110
|
-
module Worker
|
|
111
|
-
class WorkerClass < Totoro::BaseWorker
|
|
112
|
-
setup queue_name: <queue_name>
|
|
113
|
-
def process(payload, metadata, delivery_info)
|
|
114
|
-
# worker process
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
end
|
|
118
|
-
```
|
|
119
|
-
finally, run the background deamon
|
|
120
|
-
```
|
|
121
|
-
bundle exec totoro worker_class
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Custom rabbitmq server
|
|
125
|
-
|
|
126
|
-
When you have more than one rabbitmq server to connect, you need to add custom configuration.
|
|
127
|
-
|
|
128
|
-
To use the custom rabbitmq server you need to add `ServerName` between `Totoro` and `Queue`
|
|
129
|
-
|
|
130
|
-
For example:
|
|
131
|
-
|
|
132
|
-
#### Enqueue
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
Totoro::<ServerName>::Queue.enqueue('queue', payload)
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
#### Dequeue
|
|
139
|
-
To create a dequeue daemon, first you need to create a worker
|
|
140
|
-
```
|
|
141
|
-
rails g totoro:wroker <worker_name> <queue_name> <prefix>
|
|
142
|
-
```
|
|
143
|
-
after that, add business logic in the process method
|
|
144
|
-
```
|
|
145
|
-
module Worker
|
|
146
|
-
class WorkerClass < Totoro::BaseWorker
|
|
147
|
-
setup queue_name: <queue_name>, prefix: <prefix>
|
|
148
|
-
def process(payload, metadata, delivery_info)
|
|
149
|
-
# worker process
|
|
150
|
-
end
|
|
151
|
-
end
|
|
152
|
-
end
|
|
153
|
-
```
|
|
154
|
-
finally, run the background deamon
|
|
155
|
-
```
|
|
156
|
-
bundle exec totoro worker_class
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## Contributing
|
|
160
|
-
|
|
161
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/blockchaintech-au/totoro. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
162
|
-
|
|
163
|
-
## License
|
|
164
|
-
|
|
165
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
166
|
-
|
|
167
|
-
## Code of Conduct
|
|
168
|
-
|
|
169
|
-
Everyone interacting in the Totoro project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/totoro/blob/master/CODE_OF_CONDUCT.md).
|