eventq_rabbitmq 1.7.4 → 1.7.5

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
  SHA1:
3
- metadata.gz: ef29e3c0fa13bdf02257d93104ea0417c1dc0167
4
- data.tar.gz: e1195448affe16f8e18e6ac58ffbaa303eac1e2e
3
+ metadata.gz: 25c015004bf8773e5d5f2c3da4ce6e38b45c6a7a
4
+ data.tar.gz: 0d7105bdb58f133db78e220934534f768ca0c97a
5
5
  SHA512:
6
- metadata.gz: c0ed0050996ed1f17cf9e1439fc1002bc9192eb9ab1d725fe4d5c5df1967382c84c2d05af050cf466db6fdad518cad894eb792ca38e263215780a42830fa9655
7
- data.tar.gz: 828e1890723410c02cf3b79319affd71f70980905108b2f5537e3c50f52713ae53c82970d6bb849428385e9c85f9de572403f34c4a2242e04223e16b4e0b2abb
6
+ metadata.gz: 09f012c5fb377ca593c6e407a30dc66dde4f8426617c6872a7fb55d97058a107550b709254405a59db64fe429f3487d1a0b4e0f606790a3fb53cbd4eed56f0ec
7
+ data.tar.gz: 0a85b575336762855dbf6de244fa09381ca989caa0b6dd689d2c649a0fdaa933338697e547597ea51c0b2af16c13237a16da7adc5c9099e44e7ecfc569a1d740
@@ -2,7 +2,7 @@ module EventQ
2
2
  module RabbitMq
3
3
  class DefaultQueue < Queue
4
4
  def initialize
5
- @name = 'Default'
5
+ @name = 'Default'.freeze
6
6
  @allow_retry = false
7
7
  @max_retry_attempts = 1
8
8
  end
@@ -5,7 +5,7 @@ module EventQ
5
5
  def initialize(options={})
6
6
 
7
7
  if options[:client] == nil
8
- raise ':client (QueueClient) must be specified.'
8
+ raise ':client (QueueClient) must be specified.'.freeze
9
9
  end
10
10
 
11
11
  @client = options[:client]
@@ -30,7 +30,7 @@ module EventQ
30
30
  channel.close
31
31
  channel.connection.close
32
32
 
33
- EventQ.logger.debug "[EVENTQ_RABBITMQ] - Raised event. Message: #{message} | Type: #{event_type}."
33
+ EventQ.logger.debug "[#{self.class}] - Raised event. Message: #{message} | Type: #{event_type}."
34
34
 
35
35
  return true
36
36
  end
@@ -2,19 +2,21 @@ module EventQ
2
2
  module RabbitMq
3
3
  class QueueClient
4
4
 
5
+ GUEST = 'guest'.freeze
6
+
5
7
  def initialize(options = {})
6
8
 
7
9
  if options[:endpoint] == nil
8
- raise ':endpoint must be specified.'
10
+ raise ':endpoint must be specified.'.freeze
9
11
  end
10
12
 
11
13
  @endpoint = options[:endpoint]
12
14
 
13
15
  @port = Integer(options[:port] || 5672)
14
16
 
15
- @user = options[:user] || 'guest'
17
+ @user = options[:user] || GUEST
16
18
 
17
- @password = options[:password] || 'guest'
19
+ @password = options[:password] || GUEST
18
20
 
19
21
  @ssl = options[:ssl] == true || false
20
22
 
@@ -2,6 +2,9 @@ module EventQ
2
2
  module RabbitMq
3
3
  class QueueManager
4
4
 
5
+ X_DEAD_LETTER_EXCHANGE = 'x-dead-letter-exchange'.freeze
6
+ X_MESSAGE_TTL = 'x-message-ttl'.freeze
7
+
5
8
  def initialize
6
9
  @event_raised_exchange = EventQ::EventRaisedExchange.new
7
10
  end
@@ -39,13 +42,13 @@ module EventQ
39
42
 
40
43
  EventQ.log(:debug, "[#{self.class}] - Requesting retry queue. x-dead-letter-exchange: #{subscriber_exchange.name} | x-message-ttl: #{queue.max_retry_delay}")
41
44
 
42
- return channel.queue("#{queue.name}.r", :durable => true, :arguments => { "x-dead-letter-exchange" => subscriber_exchange.name, "x-message-ttl" => queue.max_retry_delay })
45
+ return channel.queue("#{queue.name}.r", :durable => true, :arguments => { X_DEAD_LETTER_EXCHANGE => subscriber_exchange.name, X_MESSAGE_TTL => queue.max_retry_delay })
43
46
 
44
47
  else
45
48
 
46
49
  EventQ.log(:debug, "[#{self.class}] - Requesting retry queue. x-dead-letter-exchange: #{subscriber_exchange.name} | x-message-ttl: #{queue.retry_delay}")
47
50
 
48
- return channel.queue("#{queue.name}.r", :durable => true, :arguments => { "x-dead-letter-exchange" => subscriber_exchange.name, "x-message-ttl" => queue.retry_delay })
51
+ return channel.queue("#{queue.name}.r", :durable => true, :arguments => { X_DEAD_LETTER_EXCHANGE => subscriber_exchange.name, X_MESSAGE_TTL => queue.retry_delay })
49
52
 
50
53
  end
51
54
 
@@ -4,7 +4,7 @@ module EventQ
4
4
 
5
5
  def initialize(options = {})
6
6
  if options[:client] == nil
7
- raise ':client (QueueClient) must be specified.'
7
+ raise ':client (QueueClient) must be specified.'.freeze
8
8
  end
9
9
  @client = options[:client]
10
10
  @queue_manager = QueueManager.new
@@ -1,3 +1,3 @@
1
1
  module EventqRabbitmq
2
- VERSION = "1.7.4"
2
+ VERSION = "1.7.5"
3
3
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventq_rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.4
4
+ version: 1.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-09 00:00:00.000000000 Z
11
+ date: 2016-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.11'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.11'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bunny
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: eventq_base
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: hash_kit
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: This is the rabbitmq implementation for EventQ
@@ -117,7 +117,6 @@ extra_rdoc_files: []
117
117
  files:
118
118
  - bin/console
119
119
  - bin/setup
120
- - lib/eventq_rabbitmq.rb
121
120
  - lib/eventq_rabbitmq/default_queue.rb
122
121
  - lib/eventq_rabbitmq/rabbitmq_eventq_client.rb
123
122
  - lib/eventq_rabbitmq/rabbitmq_queue_client.rb
@@ -125,6 +124,7 @@ files:
125
124
  - lib/eventq_rabbitmq/rabbitmq_queue_worker.rb
126
125
  - lib/eventq_rabbitmq/rabbitmq_subscription_manager.rb
127
126
  - lib/eventq_rabbitmq/version.rb
127
+ - lib/eventq_rabbitmq.rb
128
128
  homepage: https://github.com/vaughanbrittonsage/eventq
129
129
  licenses:
130
130
  - MIT
@@ -135,18 +135,19 @@ require_paths:
135
135
  - lib
136
136
  required_ruby_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - ">="
138
+ - - '>='
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - '>='
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.5.1
148
+ rubygems_version: 2.0.14.1
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: This is the rabbitmq implementation for EventQ
152
152
  test_files: []
153
+ has_rdoc: