philotic 0.8.1 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/.travis.yml +5 -6
- data/README.md +10 -13
- data/examples/creating_named_queues/manually.rb +4 -4
- data/examples/creating_named_queues/with_rake.rb +4 -1
- data/examples/publishing/publish.rb +14 -14
- data/examples/simple_instance.rb +4 -4
- data/examples/simple_singleton.rb +3 -3
- data/examples/subscribing/acks.rb +6 -6
- data/examples/subscribing/anonymous_queue.rb +2 -2
- data/examples/subscribing/consumer.rb +47 -0
- data/examples/subscribing/multiple_named_queues.rb +4 -4
- data/examples/subscribing/named_queue.rb +3 -3
- data/lib/philotic.rb +2 -3
- data/lib/philotic/config.rb +1 -1
- data/lib/philotic/connection.rb +1 -0
- data/lib/philotic/constants.rb +1 -1
- data/lib/philotic/consumer.rb +93 -0
- data/lib/philotic/{dummy_event.rb → dummy_message.rb} +3 -3
- data/lib/philotic/logging.rb +1 -1
- data/lib/philotic/logging/logger.rb +6 -6
- data/lib/philotic/logging/{event.rb → message.rb} +2 -2
- data/lib/philotic/message.rb +146 -0
- data/lib/philotic/publisher.rb +24 -24
- data/lib/philotic/subscriber.rb +9 -12
- data/lib/philotic/version.rb +1 -1
- data/philotic.gemspec +8 -11
- data/philotic_queues.yml.example +8 -8
- data/spec/philotic/connection_spec.rb +2 -0
- data/spec/philotic/consumer_spec.rb +186 -0
- data/spec/philotic/logging/logger_spec.rb +15 -15
- data/spec/philotic/message_spec.rb +147 -0
- data/spec/philotic/publisher_spec.rb +39 -38
- data/spec/philotic/subscriber_spec.rb +6 -3
- metadata +173 -144
- data/lib/philotic/event.rb +0 -100
- data/lib/philotic/routable.rb +0 -98
- data/spec/philotic/event_spec.rb +0 -109
- data/spec/philotic/routable_spec.rb +0 -54
@@ -9,7 +9,7 @@ module Philotic
|
|
9
9
|
|
10
10
|
end
|
11
11
|
let(:logger) { Philotic::Logging::Logger.new(device) }
|
12
|
-
let(:
|
12
|
+
let(:expected_message) { 'Hey!' }
|
13
13
|
let(:error_message) { "These are not the droids you're looking for" }
|
14
14
|
|
15
15
|
before do
|
@@ -17,45 +17,45 @@ module Philotic
|
|
17
17
|
end
|
18
18
|
specify do
|
19
19
|
|
20
|
-
expect(logger.connection).to receive(:publish) do |
|
21
|
-
expect(
|
22
|
-
expect(
|
20
|
+
expect(logger.connection).to receive(:publish) do |message|
|
21
|
+
expect(message.message).to eq expected_message
|
22
|
+
expect(message.severity).to eq Logger::INFO
|
23
23
|
|
24
24
|
end
|
25
25
|
|
26
26
|
expect(device).to receive(:write) do |log_message|
|
27
|
-
expect(log_message).to match /#{
|
27
|
+
expect(log_message).to match /#{expected_message}/
|
28
28
|
end
|
29
|
-
logger.info
|
29
|
+
logger.info expected_message
|
30
30
|
|
31
31
|
end
|
32
32
|
|
33
33
|
it 'should accept a block' do
|
34
|
-
expect(logger.connection).to receive(:publish) do |
|
35
|
-
expect(
|
36
|
-
expect(
|
34
|
+
expect(logger.connection).to receive(:publish) do |message|
|
35
|
+
expect(message.message).to eq expected_message
|
36
|
+
expect(message.severity).to eq Logger::INFO
|
37
37
|
|
38
38
|
end
|
39
39
|
|
40
40
|
expect(device).to receive(:write) do |log_message|
|
41
|
-
expect(log_message).to match /#{
|
41
|
+
expect(log_message).to match /#{expected_message}/
|
42
42
|
end
|
43
|
-
logger.info {
|
43
|
+
logger.info { expected_message }
|
44
44
|
end
|
45
45
|
|
46
46
|
it "should not die if it can't log to RabbitMQ" do
|
47
|
-
expect(logger.connection).to receive(:publish) do |
|
47
|
+
expect(logger.connection).to receive(:publish) do |message|
|
48
48
|
raise error_message
|
49
49
|
end
|
50
50
|
|
51
51
|
expect(device).to receive(:write) do |log_message|
|
52
|
-
expect(log_message).to match /#{
|
52
|
+
expect(log_message).to match /#{expected_message}/
|
53
53
|
end
|
54
54
|
|
55
55
|
expect(device).to receive(:write) do |log_message|
|
56
56
|
expect(log_message).to match /#{error_message}/
|
57
57
|
end
|
58
|
-
logger.info
|
58
|
+
logger.info expected_message
|
59
59
|
end
|
60
60
|
|
61
61
|
it 'should behave not log if the severity is too low' do
|
@@ -64,7 +64,7 @@ module Philotic
|
|
64
64
|
|
65
65
|
expect(device).not_to receive(:write)
|
66
66
|
logger.level = Logger::WARN
|
67
|
-
logger.info
|
67
|
+
logger.info expected_message
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
@@ -0,0 +1,147 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'philotic/message'
|
4
|
+
|
5
|
+
# create 'deep' inheritance to test self.inherited
|
6
|
+
class TestEventParent < Philotic::Message
|
7
|
+
end
|
8
|
+
class TestEvent < TestEventParent
|
9
|
+
attr_routable :routable_attr
|
10
|
+
attr_payload :payload_attr
|
11
|
+
end
|
12
|
+
|
13
|
+
describe Philotic::Message do
|
14
|
+
let(:message) { TestEvent.new }
|
15
|
+
subject { message }
|
16
|
+
|
17
|
+
%w[
|
18
|
+
attr_routable_accessors
|
19
|
+
attr_routable
|
20
|
+
attr_payload_accessors
|
21
|
+
attr_payload
|
22
|
+
].each do |method_name|
|
23
|
+
specify { expect(subject.class.methods).to include method_name.to_sym }
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should have proper headers' do
|
27
|
+
expect(subject.headers).to include({routable_attr: nil})
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should have proper payload' do
|
31
|
+
expect(subject.payload).to eq({payload_attr: nil})
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should have proper attributes' do
|
35
|
+
expect(subject.attributes).to include({routable_attr: nil, payload_attr: nil})
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'should have empty metadata, other than timestamp' do
|
39
|
+
expect(subject.metadata.keys).to eq([:timestamp])
|
40
|
+
end
|
41
|
+
|
42
|
+
context 'overriding a value with metadata=' do
|
43
|
+
before do
|
44
|
+
subject.metadata = {mandatory: false}
|
45
|
+
end
|
46
|
+
it 'should work' do
|
47
|
+
expect(subject.metadata).to include({mandatory: false})
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
Philotic::Message.methods.sort.each do |method_name|
|
52
|
+
specify { expect(subject.class.methods).to include method_name.to_sym }
|
53
|
+
end
|
54
|
+
|
55
|
+
Philotic::MESSAGE_OPTIONS.each do |method_name|
|
56
|
+
specify { expect(subject.methods).to include method_name.to_sym }
|
57
|
+
specify { expect(subject.methods).to include "#{method_name}=".to_sym }
|
58
|
+
end
|
59
|
+
|
60
|
+
Philotic::PHILOTIC_HEADERS.each do |method_name|
|
61
|
+
specify { expect(subject.methods).to include method_name.to_sym }
|
62
|
+
specify { expect(subject.methods).to include "#{method_name}=".to_sym }
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'metadata' do
|
66
|
+
it 'should have a timestamp' do
|
67
|
+
Timecop.freeze
|
68
|
+
expect(subject.metadata).to eq(timestamp: Time.now.to_i)
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'should reflect changes in the message properties' do
|
72
|
+
expect(subject.metadata[:app_id]).to eq nil
|
73
|
+
subject.app_id = 'ANSIBLE'
|
74
|
+
expect(subject.metadata[:app_id]).to eq 'ANSIBLE'
|
75
|
+
end
|
76
|
+
end
|
77
|
+
describe 'headers' do
|
78
|
+
it 'should include :philotic_product' do
|
79
|
+
expect(subject.headers.keys).to include :philotic_product
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
context 'generic message' do
|
84
|
+
let(:headers) do
|
85
|
+
{
|
86
|
+
header1: 'h1',
|
87
|
+
header2: 'h2',
|
88
|
+
header3: 'h3',
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
let(:payloads) do
|
93
|
+
{
|
94
|
+
payload1: 'h1',
|
95
|
+
payload2: 'h2',
|
96
|
+
payload3: 'h3',
|
97
|
+
}
|
98
|
+
end
|
99
|
+
it 'builds an message with dynamic headers and payloads' do
|
100
|
+
message = Philotic::Message.new(headers, payloads)
|
101
|
+
|
102
|
+
expect(message.headers).to include(headers)
|
103
|
+
expect(message.payload).to eq payloads
|
104
|
+
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
describe '#publish' do
|
109
|
+
subject { Philotic::Message.new }
|
110
|
+
specify do
|
111
|
+
expect(subject.connection).to receive(:publish).with(subject)
|
112
|
+
|
113
|
+
subject.publish
|
114
|
+
end
|
115
|
+
|
116
|
+
end
|
117
|
+
|
118
|
+
describe '.publish' do
|
119
|
+
let (:connection) { double }
|
120
|
+
let(:headers) do
|
121
|
+
{
|
122
|
+
header1: 'h1',
|
123
|
+
header2: 'h2',
|
124
|
+
header3: 'h3',
|
125
|
+
}
|
126
|
+
end
|
127
|
+
|
128
|
+
let(:payloads) do
|
129
|
+
{
|
130
|
+
payload1: 'h1',
|
131
|
+
payload2: 'h2',
|
132
|
+
payload3: 'h3',
|
133
|
+
}
|
134
|
+
end
|
135
|
+
subject { Philotic::Message }
|
136
|
+
specify do
|
137
|
+
expect_any_instance_of(Philotic::Message).to receive(:connection).and_return(connection)
|
138
|
+
expect(connection).to receive(:publish) do |message|
|
139
|
+
expect(message.headers).to include(headers)
|
140
|
+
expect(message.payload).to eq payloads
|
141
|
+
end
|
142
|
+
|
143
|
+
subject.publish(headers, payloads)
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
end
|
@@ -1,17 +1,18 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
|
2
|
+
|
3
|
+
require 'philotic/dummy_message'
|
3
4
|
require 'philotic/connection'
|
4
5
|
require 'philotic/publisher'
|
5
6
|
|
6
7
|
describe Philotic::Publisher do
|
7
|
-
let(:
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
let(:message) do
|
9
|
+
message = Philotic::DummyMessage.new
|
10
|
+
message.subject = 'Hello'
|
11
|
+
message.message = 'How are you?'
|
12
|
+
message.hue = :M
|
13
|
+
message.available = true
|
14
|
+
|
15
|
+
message
|
15
16
|
end
|
16
17
|
let(:publisher) { Philotic::Connection.new.publisher }
|
17
18
|
subject { publisher }
|
@@ -27,19 +28,19 @@ describe Philotic::Publisher do
|
|
27
28
|
},
|
28
29
|
{
|
29
30
|
headers: {
|
30
|
-
philotic_firehose:
|
31
|
-
philotic_product:
|
32
|
-
philotic_component:
|
33
|
-
|
34
|
-
|
35
|
-
available:
|
31
|
+
philotic_firehose: true,
|
32
|
+
philotic_product: nil,
|
33
|
+
philotic_component: nil,
|
34
|
+
philotic_message_type: nil,
|
35
|
+
hue: :M,
|
36
|
+
available: true,
|
36
37
|
},
|
37
38
|
timestamp: Time.now.to_i
|
38
39
|
}
|
39
40
|
)
|
40
|
-
expect(
|
41
|
-
subject.publish(
|
42
|
-
expect(
|
41
|
+
expect(message).to_not be_published
|
42
|
+
subject.publish(message)
|
43
|
+
expect(message).to_not be_published # not connected
|
43
44
|
end
|
44
45
|
|
45
46
|
it 'should fail gracefully' do
|
@@ -48,10 +49,10 @@ describe Philotic::Publisher do
|
|
48
49
|
end
|
49
50
|
|
50
51
|
expect(subject.logger).to receive(:error).with(publish_error.message)
|
51
|
-
expect(
|
52
|
-
subject.publish(
|
53
|
-
expect(
|
54
|
-
expect(
|
52
|
+
expect(message).to_not be_published
|
53
|
+
subject.publish(message)
|
54
|
+
expect(message).to_not be_published
|
55
|
+
expect(message.publish_error).to eq publish_error
|
55
56
|
|
56
57
|
end
|
57
58
|
|
@@ -60,11 +61,11 @@ describe Philotic::Publisher do
|
|
60
61
|
subject.config.disable_publish = true
|
61
62
|
end
|
62
63
|
it 'should log a warning' do
|
63
|
-
expect(subject).to receive(:
|
64
|
+
expect(subject).to receive(:log_message_published)
|
64
65
|
|
65
|
-
expect(
|
66
|
-
subject.publish(
|
67
|
-
expect(
|
66
|
+
expect(message).to_not be_published
|
67
|
+
subject.publish(message)
|
68
|
+
expect(message).to_not be_published
|
68
69
|
end
|
69
70
|
end
|
70
71
|
end
|
@@ -94,12 +95,12 @@ describe Philotic::Publisher do
|
|
94
95
|
app_id: nil,
|
95
96
|
expiration: nil,
|
96
97
|
headers: {
|
97
|
-
philotic_firehose:
|
98
|
-
philotic_product:
|
99
|
-
philotic_component:
|
100
|
-
|
101
|
-
|
102
|
-
available:
|
98
|
+
philotic_firehose: true,
|
99
|
+
philotic_product: nil,
|
100
|
+
philotic_component: nil,
|
101
|
+
philotic_message_type: nil,
|
102
|
+
hue: :M,
|
103
|
+
available: true,
|
103
104
|
},
|
104
105
|
timestamp: Time.now.to_i
|
105
106
|
}
|
@@ -112,9 +113,9 @@ describe Philotic::Publisher do
|
|
112
113
|
}.to_json,
|
113
114
|
metadata
|
114
115
|
)
|
115
|
-
expect(
|
116
|
-
subject.publish(
|
117
|
-
expect(
|
116
|
+
expect(message).to_not be_published
|
117
|
+
subject.publish(message)
|
118
|
+
expect(message).to be_published
|
118
119
|
end
|
119
120
|
|
120
121
|
it 'should log an error when there is no connection' do
|
@@ -123,9 +124,9 @@ describe Philotic::Publisher do
|
|
123
124
|
expect(subject.connection).to receive(:connected?).once.and_return(false)
|
124
125
|
|
125
126
|
expect(subject.logger).to receive(:error)
|
126
|
-
expect(
|
127
|
-
subject.publish(
|
128
|
-
expect(
|
127
|
+
expect(message).to_not be_published
|
128
|
+
subject.publish(message)
|
129
|
+
expect(message).to_not be_published
|
129
130
|
end
|
130
131
|
|
131
132
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
|
2
|
+
|
3
|
+
require 'philotic/dummy_message'
|
3
4
|
require 'philotic/connection'
|
4
5
|
require 'philotic/constants'
|
5
6
|
require 'philotic/subscriber'
|
@@ -91,11 +92,12 @@ describe Philotic::Subscriber do
|
|
91
92
|
let(:channel) { double }
|
92
93
|
let(:delivery_tag) { double }
|
93
94
|
let(:delivery_info) { double }
|
94
|
-
let(:message) {
|
95
|
+
let(:message) { Philotic::Message.new }
|
95
96
|
subject { Philotic::Connection.new.subscriber }
|
96
97
|
|
97
98
|
specify do
|
98
99
|
expect(subject.connection).to receive(:channel).and_return(channel)
|
100
|
+
expect(message).to receive(:delivery_info).and_return(delivery_info)
|
99
101
|
expect(delivery_info).to receive(:delivery_tag).and_return(delivery_tag)
|
100
102
|
expect(channel).to receive(:acknowledge).with(delivery_tag, false)
|
101
103
|
subject.acknowledge(message)
|
@@ -106,11 +108,12 @@ describe Philotic::Subscriber do
|
|
106
108
|
let(:channel) { double }
|
107
109
|
let(:delivery_tag) { double }
|
108
110
|
let(:delivery_info) { double }
|
109
|
-
let(:message) {
|
111
|
+
let(:message) { Philotic::Message.new }
|
110
112
|
subject { Philotic::Connection.new.subscriber }
|
111
113
|
|
112
114
|
specify do
|
113
115
|
expect(subject.connection).to receive(:channel).and_return(channel)
|
116
|
+
expect(message).to receive(:delivery_info).and_return(delivery_info)
|
114
117
|
expect(delivery_info).to receive(:delivery_tag).and_return(delivery_tag)
|
115
118
|
expect(channel).to receive(:reject).with(delivery_tag, true)
|
116
119
|
subject.reject(message)
|
metadata
CHANGED
@@ -1,166 +1,193 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: philotic
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Nathan Keyes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2015-06-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
15
14
|
name: codeclimate-test-reporter
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: "0"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
23
20
|
type: :development
|
24
|
-
version_requirements: *id001
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: bundler
|
27
21
|
prerelease: false
|
28
|
-
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
-
|
32
|
-
version:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.6'
|
33
34
|
type: :development
|
34
|
-
version_requirements: *id002
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: evented-spec
|
37
35
|
prerelease: false
|
38
|
-
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version:
|
43
|
-
|
44
|
-
version_requirements: *id003
|
45
|
-
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
46
42
|
name: pry
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
version: "0.10"
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.10'
|
53
48
|
type: :development
|
54
|
-
version_requirements: *id004
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rake
|
57
49
|
prerelease: false
|
58
|
-
|
59
|
-
requirements:
|
60
|
-
- -
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.3'
|
63
62
|
type: :development
|
64
|
-
version_requirements: *id005
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: rspec
|
67
63
|
prerelease: false
|
68
|
-
|
69
|
-
requirements:
|
70
|
-
- -
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.1'
|
73
76
|
type: :development
|
74
|
-
version_requirements: *id006
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: rspec-its
|
77
77
|
prerelease: false
|
78
|
-
|
79
|
-
requirements:
|
80
|
-
- -
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-its
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.1'
|
83
90
|
type: :development
|
84
|
-
version_requirements: *id007
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
|
-
name: timecop
|
87
91
|
prerelease: false
|
88
|
-
|
89
|
-
requirements:
|
90
|
-
- -
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version:
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: timecop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.7'
|
93
104
|
type: :development
|
94
|
-
version_requirements: *id008
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: simplecov
|
97
105
|
prerelease: false
|
98
|
-
|
99
|
-
requirements:
|
100
|
-
-
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.7'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
101
118
|
type: :development
|
102
|
-
version_requirements: *id010
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: activesupport
|
105
119
|
prerelease: false
|
106
|
-
|
107
|
-
requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
108
122
|
- - ">="
|
109
|
-
-
|
110
|
-
version:
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: activesupport
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '3.2'
|
111
132
|
type: :runtime
|
112
|
-
version_requirements: *id011
|
113
|
-
- !ruby/object:Gem::Dependency
|
114
|
-
name: activerecord
|
115
133
|
prerelease: false
|
116
|
-
|
117
|
-
requirements:
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
118
136
|
- - ">="
|
119
|
-
-
|
120
|
-
|
121
|
-
|
122
|
-
- !ruby/object:Gem::Dependency
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '3.2'
|
139
|
+
- !ruby/object:Gem::Dependency
|
123
140
|
name: awesome_print
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
version: "1.2"
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '1.2'
|
130
146
|
type: :runtime
|
131
|
-
version_requirements: *id014
|
132
|
-
- !ruby/object:Gem::Dependency
|
133
|
-
name: bunny
|
134
147
|
prerelease: false
|
135
|
-
|
136
|
-
requirements:
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
137
150
|
- - ">="
|
138
|
-
-
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '1.2'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: bunny
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '1.6'
|
139
160
|
type: :runtime
|
140
|
-
version_requirements: *id016
|
141
|
-
- !ruby/object:Gem::Dependency
|
142
|
-
name: json
|
143
161
|
prerelease: false
|
144
|
-
|
145
|
-
requirements:
|
146
|
-
- -
|
147
|
-
- !ruby/object:Gem::Version
|
148
|
-
version:
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '1.6'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: json
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '1.8'
|
149
174
|
type: :runtime
|
150
|
-
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '1.8'
|
151
181
|
description: Lightweight, opinionated wrapper for using RabbitMQ headers exchanges
|
152
|
-
email:
|
182
|
+
email:
|
153
183
|
- nkeyes@gmail.com
|
154
184
|
executables: []
|
155
|
-
|
156
185
|
extensions: []
|
157
|
-
|
158
186
|
extra_rdoc_files: []
|
159
|
-
|
160
|
-
|
161
|
-
- .
|
162
|
-
- .
|
163
|
-
- .travis.yml
|
187
|
+
files:
|
188
|
+
- ".gitignore"
|
189
|
+
- ".rspec"
|
190
|
+
- ".travis.yml"
|
164
191
|
- Gemfile
|
165
192
|
- LICENSE
|
166
193
|
- README.md
|
@@ -172,19 +199,20 @@ files:
|
|
172
199
|
- examples/simple_singleton.rb
|
173
200
|
- examples/subscribing/acks.rb
|
174
201
|
- examples/subscribing/anonymous_queue.rb
|
202
|
+
- examples/subscribing/consumer.rb
|
175
203
|
- examples/subscribing/multiple_named_queues.rb
|
176
204
|
- examples/subscribing/named_queue.rb
|
177
205
|
- lib/philotic.rb
|
178
206
|
- lib/philotic/config.rb
|
179
207
|
- lib/philotic/connection.rb
|
180
208
|
- lib/philotic/constants.rb
|
181
|
-
- lib/philotic/
|
182
|
-
- lib/philotic/
|
209
|
+
- lib/philotic/consumer.rb
|
210
|
+
- lib/philotic/dummy_message.rb
|
183
211
|
- lib/philotic/logging.rb
|
184
|
-
- lib/philotic/logging/event.rb
|
185
212
|
- lib/philotic/logging/logger.rb
|
213
|
+
- lib/philotic/logging/message.rb
|
214
|
+
- lib/philotic/message.rb
|
186
215
|
- lib/philotic/publisher.rb
|
187
|
-
- lib/philotic/routable.rb
|
188
216
|
- lib/philotic/singleton.rb
|
189
217
|
- lib/philotic/subscriber.rb
|
190
218
|
- lib/philotic/tasks.rb
|
@@ -196,44 +224,45 @@ files:
|
|
196
224
|
- repl
|
197
225
|
- spec/philotic/config_spec.rb
|
198
226
|
- spec/philotic/connection_spec.rb
|
199
|
-
- spec/philotic/
|
227
|
+
- spec/philotic/consumer_spec.rb
|
200
228
|
- spec/philotic/logging/logger_spec.rb
|
229
|
+
- spec/philotic/message_spec.rb
|
201
230
|
- spec/philotic/publisher_spec.rb
|
202
|
-
- spec/philotic/routable_spec.rb
|
203
231
|
- spec/philotic/subscriber_spec.rb
|
204
232
|
- spec/philotic_spec.rb
|
205
233
|
- spec/spec_helper.rb
|
206
234
|
- tasks/bump.rake
|
207
235
|
homepage: https://github.com/nkeyes/philotic
|
208
|
-
licenses:
|
236
|
+
licenses:
|
209
237
|
- MIT
|
210
238
|
metadata: {}
|
211
|
-
|
212
239
|
post_install_message:
|
213
240
|
rdoc_options: []
|
214
|
-
|
215
|
-
require_paths:
|
241
|
+
require_paths:
|
216
242
|
- lib
|
217
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
218
|
-
requirements:
|
219
|
-
-
|
220
|
-
|
221
|
-
|
222
|
-
|
243
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
244
|
+
requirements:
|
245
|
+
- - ">="
|
246
|
+
- !ruby/object:Gem::Version
|
247
|
+
version: '0'
|
248
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
249
|
+
requirements:
|
250
|
+
- - ">="
|
251
|
+
- !ruby/object:Gem::Version
|
252
|
+
version: '0'
|
223
253
|
requirements: []
|
224
|
-
|
225
254
|
rubyforge_project:
|
226
|
-
rubygems_version: 2.4.
|
255
|
+
rubygems_version: 2.4.7
|
227
256
|
signing_key:
|
228
257
|
specification_version: 4
|
229
258
|
summary: Lightweight, opinionated wrapper for using RabbitMQ headers exchanges
|
230
|
-
test_files:
|
259
|
+
test_files:
|
231
260
|
- spec/philotic/config_spec.rb
|
232
261
|
- spec/philotic/connection_spec.rb
|
233
|
-
- spec/philotic/
|
262
|
+
- spec/philotic/consumer_spec.rb
|
234
263
|
- spec/philotic/logging/logger_spec.rb
|
264
|
+
- spec/philotic/message_spec.rb
|
235
265
|
- spec/philotic/publisher_spec.rb
|
236
|
-
- spec/philotic/routable_spec.rb
|
237
266
|
- spec/philotic/subscriber_spec.rb
|
238
267
|
- spec/philotic_spec.rb
|
239
268
|
- spec/spec_helper.rb
|