totoro 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19763f23001b05dcb72f6af2e44c533da4b7f297945c1073b0e46086e122fd21
4
- data.tar.gz: eb012a5806d7494dc2f033d6f6b223579b9e4d35355ce93da7e10a914195f4c2
3
+ metadata.gz: 7f4c7f10ea818adbe2fa42308e54e93572e70a714d744e7e71429af98fd7dbcc
4
+ data.tar.gz: 9168aa729f1f0aab8eb64da8b0475e9a272990d0ca7744b65f4fb5d70dcdeba3
5
5
  SHA512:
6
- metadata.gz: bbd7442af6046ffe82472e84299d52e34d706161dd25b313e3f76cdd080fef43f03cbd9c4dfa3dd0f137e2c352f8849348c06c4d8ed76a12de2def01f0fc868c
7
- data.tar.gz: 62c9608d8de53ef43f9d80cb97ab45a12d647cf5f7d85cde54b261ff5ec10a21eb417aa9c42a4b701632c1d2bffda383b164ca0719ac84ac35e91fbb1422e307
6
+ metadata.gz: a00e4ebd5d2eb76ff624e8fdf7ceda3aaa4a3f50484651d74f1b63ab3bc5163212e85cd0cce0039d6678b827df86468c598d4277bd70b8c29982f32e6c7e911a
7
+ data.tar.gz: 518fd37374c5fbff31b67ecadc1a2a3bd96de078de5811e6abee644dcceb7f906380809b710ed50bcd8925d2a2596265d242749ed2d491f197cd566bd0e36cf1
@@ -1,16 +1,42 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- totoro (0.4.1)
4
+ totoro (1.0.4)
5
5
  bunny (~> 2.10)
6
+ delayed_job_active_record (~> 4.1.3)
7
+ delayed_job_recurring (~> 0.3.7)
6
8
 
7
9
  GEM
8
10
  remote: https://rubygems.org/
9
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)
10
23
  amq-protocol (2.3.0)
11
- bunny (2.10.0)
12
- 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
13
36
  diff-lcs (1.3)
37
+ i18n (1.5.3)
38
+ concurrent-ruby (~> 1.0)
39
+ minitest (5.11.3)
14
40
  rake (10.5.0)
15
41
  rspec (3.7.0)
16
42
  rspec-core (~> 3.7.0)
@@ -25,6 +51,9 @@ GEM
25
51
  diff-lcs (>= 1.2.0, < 2.0)
26
52
  rspec-support (~> 3.7.0)
27
53
  rspec-support (3.7.1)
54
+ thread_safe (0.3.6)
55
+ tzinfo (1.2.5)
56
+ thread_safe (~> 0.1)
28
57
 
29
58
  PLATFORMS
30
59
  ruby
data/README.md CHANGED
@@ -45,6 +45,7 @@ default: &default
45
45
  normal_queue_for_both_enqueue_and_subscribe:
46
46
  name: default_exchange.queue.name
47
47
  durable: true
48
+ clean_start: false
48
49
  exchange_queue_for_subscribe:
49
50
  name: fanout.exchange.queue
50
51
  durable: true
@@ -9,6 +9,7 @@ default: &default
9
9
  example_queue:
10
10
  name: real.queue.name
11
11
  durable: true
12
+ clean_start: false
12
13
 
13
14
  custom:
14
15
  connect:
@@ -23,6 +23,10 @@ module Totoro
23
23
  @data[:queue][queue_id][:exchange]
24
24
  end
25
25
 
26
+ def clean_start?
27
+ @data[:queue][id][:clean_start]
28
+ end
29
+
26
30
  def queue(id)
27
31
  name = @data[:queue][id][:name]
28
32
  settings = { durable: @data[:queue][id][:durable] }
@@ -8,6 +8,7 @@ module Totoro
8
8
 
9
9
  def subscribe(id)
10
10
  queue = bind_queue(id)
11
+ queue.purge if @config.clean_start?
11
12
  queue.subscribe do |delivery_info, metadata, payload|
12
13
  yield(delivery_info, metadata, payload)
13
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Totoro
4
- VERSION = '1.0.3'
4
+ VERSION = '1.0.4'
5
5
  end
@@ -7,8 +7,8 @@ require 'totoro/version'
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'totoro'
9
9
  spec.version = Totoro::VERSION
10
- spec.authors = ['ShuHui18']
11
- spec.email = ['shu.hui@blockchaintech.net.au']
10
+ spec.authors = ['BlockchainTech']
11
+ spec.email = ['cex.demo@blockchaintech.net.au']
12
12
 
13
13
  spec.summary = 'tool for rabbitmq'
14
14
  spec.description = 'Enpower rabbitmq to make it configrable'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: totoro
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
- - ShuHui18
7
+ - BlockchainTech
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-24 00:00:00.000000000 Z
11
+ date: 2019-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -96,7 +96,7 @@ dependencies:
96
96
  version: '3.0'
97
97
  description: Enpower rabbitmq to make it configrable
98
98
  email:
99
- - shu.hui@blockchaintech.net.au
99
+ - cex.demo@blockchaintech.net.au
100
100
  executables:
101
101
  - totoro
102
102
  extensions: []
@@ -139,7 +139,6 @@ files:
139
139
  - lib/totoro/tasks/resend_message.rake
140
140
  - lib/totoro/utils.rb
141
141
  - lib/totoro/version.rb
142
- - pkg/totoro-1.0.3.gem
143
142
  - spec/spec_helper.rb
144
143
  - spec/totoro_spec.rb
145
144
  - test/rabbitmq_commands.txt
Binary file