cottontail 2.0.0.pre.1 → 2.0.0

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: fffe7fed426e7be9c4107730b1ca60cf85d6e976
4
- data.tar.gz: 93d238e96dafe0b22e3497e41ac9f8041a3b7401
3
+ metadata.gz: d9bee2a9a93ed919f90a527fc37c7ff1ac07077c
4
+ data.tar.gz: 8220742b6ca0c05d36aaaf54bc90befd6aba9992
5
5
  SHA512:
6
- metadata.gz: 6cf61ebc80120a7a4351a11c2a86b541c38bb9c93b0af68d84cfcb184c069b2eb00e2fc9e711e9ff8014736ee15da54a7c3c83a9f490de36ce4e7cb546d9c5f5
7
- data.tar.gz: 62be0c8eac7b7abc0ac355c8c8e1a2bedd9f3817810b9bb349783ae2c2b58ec56062a10d5b3a283513cf757ff556f4adc1021cd8052fae2e16c3f4a1f684e2ea
6
+ metadata.gz: 3ceaaa8c4383d3e0249aefe4e9f870debdb9dd8b367b7988fca7398af4e70683c59b083d0de2a55f13a8bcc712b8a1dc4fa0fe1b68a49914f2c477e3e1cd20d3
7
+ data.tar.gz: 8fac03100e7b0eb3bbe3905dfcd7dda8001623b4c1df38aea096e4653fb21290ab648c7ecf67483d2b8849e0ff4b7886bd4156d9b0375a273c4a8482672d34ae
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ /.DS_Store
1
2
  /.bundle/
2
3
  /.yardoc
3
4
  /Gemfile.lock
@@ -7,3 +8,4 @@
7
8
  /pkg/
8
9
  /spec/reports/
9
10
  /tmp/
11
+ /.byebug_history
@@ -13,3 +13,7 @@ services:
13
13
  notifications:
14
14
  on_success: change
15
15
  on_failure: change
16
+
17
+ addons:
18
+ code_climate:
19
+ repo_token: 6eeabdfc385d32e919fca3b405ca275387c530d13e2f29eb0e4eecb6c8fc514f
data/Gemfile CHANGED
@@ -10,6 +10,5 @@ group :development, :test do
10
10
  gem 'rspec-core', '~> 3'
11
11
  gem 'rspec-expectations', '~> 3'
12
12
 
13
- gem 'simplecov', require: false, platform: :ruby_21
14
- gem 'coveralls', require: false, platform: :ruby_21
13
+ gem 'coveralls', require: false
15
14
  end
data/README.md CHANGED
@@ -31,7 +31,7 @@ require 'cottontail'
31
31
  class Worker
32
32
  include Cottontail::Consumer
33
33
 
34
- session ENV['RABBITMQ_URL'] do |session, worker|
34
+ session ENV['RABBITMQ_URL'] do |worker, session|
35
35
  channel = session.create_channel
36
36
 
37
37
  queue = channel.queue('', durable: true)
@@ -20,6 +20,6 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  s.add_runtime_dependency "bunny", "~> 2"
23
- s.add_runtime_dependency "yell", ">= 2", "<= 3"
24
- s.add_runtime_dependency "activesupport", ">= 3", "<= 4"
23
+ s.add_runtime_dependency "yell", ">= 2", "< 3"
24
+ s.add_runtime_dependency "activesupport", ">= 3", "< 5"
25
25
  end
@@ -15,8 +15,7 @@ module Cottontail #:nodoc:
15
15
  if respond_to?(:superclass) && superclass.respond_to?(:config)
16
16
  superclass.config.inheritable_copy
17
17
  else
18
- # create a new "anonymous" class that will host the compiled
19
- # reader methods
18
+ # create a new "anonymous" class
20
19
  Class.new(Configuration).new
21
20
  end
22
21
  end
@@ -33,8 +32,12 @@ module Cottontail #:nodoc:
33
32
  private
34
33
 
35
34
  class Configuration #:nodoc:
36
- def initialize
35
+ def initialize(parent = nil)
37
36
  reset!
37
+
38
+ if parent.kind_of?(Cottontail::Configuration)
39
+ parent.each { |k, v| set(k, v) }
40
+ end
38
41
  end
39
42
 
40
43
  # Set a configuration option.
@@ -43,7 +46,7 @@ module Cottontail #:nodoc:
43
46
  # set :logger, Yell.new($stdout)
44
47
  # set :logger, -> { Yell.new($stdout) }
45
48
  def set(key, value = nil, &block)
46
- @settings[key] = !block.nil? ? block : value
49
+ @settings[key] = block.nil? ? value : block
47
50
  end
48
51
 
49
52
  # Get a configuration option. It will be evalued of the first time
@@ -59,6 +62,16 @@ module Cottontail #:nodoc:
59
62
  @settings[key]
60
63
  end
61
64
 
65
+ # @private
66
+ def each(&block)
67
+ @settings.each(&block)
68
+ end
69
+
70
+ # @private
71
+ def inheritable_copy
72
+ self.class.new(self)
73
+ end
74
+
62
75
  # @private
63
76
  def reset!
64
77
  @settings = {}
@@ -1,4 +1,6 @@
1
1
  require 'active_support/concern'
2
+ require 'active_support/core_ext/class/attribute'
3
+ require 'active_support/callbacks'
2
4
 
3
5
  require File.dirname(__FILE__) + '/configurable'
4
6
  require File.dirname(__FILE__) + '/consumer/launcher'
@@ -57,12 +59,19 @@ module Cottontail
57
59
  extend ActiveSupport::Concern
58
60
 
59
61
  included do
62
+ include ActiveSupport::Callbacks
63
+ define_callbacks :initialize
64
+ define_callbacks :consume
65
+
60
66
  include Cottontail::Configurable
61
67
 
62
- # default settings
63
- set :consumables, -> { Cottontail::Consumer::Collection.new }
64
- set :session, -> { [nil, -> {}] }
65
- set :logger, -> { Cottontail.get(:logger) }
68
+ # default config
69
+ set :consumables, Cottontail::Consumer::Collection.new
70
+ set :session, [nil, -> {}]
71
+ set :logger, Cottontail.get(:logger)
72
+
73
+ # config for consumer behaviour
74
+ set :raise_on_exception, true
66
75
  end
67
76
 
68
77
  module ClassMethods #:nodoc:
@@ -133,7 +142,6 @@ module Cottontail
133
142
  # consume type: ['ChatMessage', 'PushMessage'] do |delivery_info, properties, payload|
134
143
  # # stuff to do
135
144
  # end
136
- #
137
145
  def consume(route = {}, options = {}, &block)
138
146
  options =
139
147
  if route.is_a?(Hash)
@@ -162,9 +170,17 @@ module Cottontail
162
170
  end
163
171
  end
164
172
 
165
- def initialize
166
- @__launcher__ = Cottontail::Consumer::Launcher.new(self)
167
- @__session__ = Cottontail::Consumer::Session.new(self)
173
+ attr_accessor :options
174
+
175
+ def initialize(options = {})
176
+ @options = options
177
+
178
+ run_callbacks :initialize do
179
+ @__running__ = false
180
+
181
+ @__launcher__ = Cottontail::Consumer::Launcher.new(self)
182
+ @__session__ = Cottontail::Consumer::Session.new(self)
183
+ end
168
184
 
169
185
  logger.debug '[Cottontail] initialized'
170
186
  end
@@ -173,14 +189,22 @@ module Cottontail
173
189
  logger.info '[Cottontail] starting up'
174
190
 
175
191
  @__session__.start
192
+ @__running__ = true
176
193
  @__launcher__.start if blocking
177
194
  end
178
195
 
179
196
  def stop
197
+ return unless running?
198
+
180
199
  logger.info '[Cottontail] shutting down'
181
200
 
182
- # @__launcher__.stop
201
+ @__launcher__.stop
183
202
  @__session__.stop
203
+ @__running__ = false
204
+ end
205
+
206
+ def running?
207
+ @__running__
184
208
  end
185
209
 
186
210
  # @private
@@ -190,26 +214,35 @@ module Cottontail
190
214
  end
191
215
  end
192
216
 
217
+ # @private
218
+ def logger
219
+ config.get(:logger)
220
+ end
221
+
193
222
  private
194
223
 
195
224
  def consume(delivery_info, properties, payload)
196
- consumable = consumables.find(delivery_info, properties, payload)
197
-
198
- if consumable.nil?
199
- logger.error '[Cottontail] Could not consume message'
200
- else
201
- consumable.exec(self, delivery_info, properties, payload)
225
+ run_callbacks :consume do
226
+ execute(delivery_info, properties, payload)
202
227
  end
203
228
  rescue => exception
204
229
  logger.error exception
205
- end
206
230
 
207
- def consumables
208
- config.get(:consumables)
231
+ if config.get(:raise_on_exception)
232
+ stop
233
+
234
+ raise(exception, caller)
235
+ end
209
236
  end
210
237
 
211
- def logger
212
- config.get(:logger)
238
+ def execute(delivery_info, properties, payload)
239
+ entity = config.get(:consumables).find(delivery_info, properties, payload)
240
+
241
+ if entity.nil?
242
+ logger.warn '[Cottontail] Could not consume message'
243
+ else
244
+ entity.exec(self, delivery_info, properties, payload)
245
+ end
213
246
  end
214
247
  end
215
248
  end
@@ -14,7 +14,7 @@ module Cottontail #:nodoc:
14
14
  stop unless @launcher.nil?
15
15
 
16
16
  SIGNALS.each do |signal|
17
- Signal.trap(signal) { Thread.new { stop } }
17
+ Signal.trap(signal) { Thread.new { @consumer.stop } }
18
18
  end
19
19
 
20
20
  @launcher = Thread.new { sleep }
@@ -22,8 +22,6 @@ module Cottontail #:nodoc:
22
22
  end
23
23
 
24
24
  def stop
25
- @consumer.stop if @consumer.respond_to?(:stop)
26
-
27
25
  @launcher.kill if @launcher.respond_to?(:kill)
28
26
  @launcher = nil
29
27
  end
@@ -1,3 +1,3 @@
1
1
  module Cottontail #:nodoc:
2
- VERSION = '2.0.0.pre.1'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -0,0 +1,30 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe 'Cottontail::Configurable inheritance' do
4
+ let(:base_klass) do
5
+ Class.new do
6
+ include Cottontail::Configurable
7
+
8
+ set :foo, 123
9
+ end
10
+ end
11
+
12
+ let(:child_klass) do
13
+ Class.new(base_klass)
14
+ end
15
+
16
+ let(:base_config) { base_klass.config }
17
+ let(:child_config) { child_klass.config }
18
+
19
+ it 'inherits configuration' do
20
+ expect(base_config.get(:foo)).to eq(123)
21
+ expect(child_config.get(:foo)).to eq(123)
22
+ end
23
+
24
+ it 'does not override configuration of superclass' do
25
+ child_config.set(:foo, 456)
26
+
27
+ expect(child_config.get(:foo)).to eq(456)
28
+ expect(base_config.get(:foo)).to eq(123)
29
+ end
30
+ end
@@ -1,12 +1,13 @@
1
1
  require 'spec_helper'
2
2
 
3
- RSpec.describe Cottontail::Configurable do
4
- class ConfigurationFactory #:nodoc:
5
- include Cottontail::Configurable
3
+ RSpec.describe 'Cottontail::Configurable' do
4
+ let(:base_klass) do
5
+ Class.new do
6
+ include Cottontail::Configurable
7
+ end
6
8
  end
7
9
 
8
- let(:config) { ConfigurationFactory.config }
9
- before { config.reset! }
10
+ let(:config) { base_klass.config }
10
11
 
11
12
  it 'responds to :get' do
12
13
  expect(config).to respond_to(:get)
@@ -16,7 +17,7 @@ RSpec.describe Cottontail::Configurable do
16
17
  expect(config).to respond_to(:set)
17
18
  end
18
19
 
19
- context 'String' do
20
+ context ':set with String' do
20
21
  let(:value) { 'value' }
21
22
  before { config.set(:key, value) }
22
23
 
@@ -25,7 +26,7 @@ RSpec.describe Cottontail::Configurable do
25
26
  end
26
27
  end
27
28
 
28
- context 'Proc' do
29
+ context ':set with Proc' do
29
30
  let(:value) { -> { 'value' } }
30
31
  before { config.set(:key, value) }
31
32
 
@@ -64,7 +64,25 @@ RSpec.describe Cottontail::Consumer::Collection do
64
64
  expect(collection.find(delivery_info_stub('a', 'x', 'x'))).to eq(ann)
65
65
  expect(collection.find(delivery_info_stub('x', 'a', 'x'))).to eq(nan)
66
66
  expect(collection.find(delivery_info_stub('x', 'x', 'a'))).to eq(nna)
67
- expect(collection.find(delivery_info_stub('x', 'x', 'x'))).to eq(nil)
67
+ expect(collection.find(delivery_info_stub('x', 'x', 'x'))).to be_nil
68
+ end
69
+ end
70
+
71
+ context 'find for multiple entities with the same signature' do
72
+ let!(:ann_1) { push_entity('a', nil, nil) }
73
+ let!(:ann_2) { push_entity('a', nil, nil) }
74
+ let!(:nan_1) { push_entity(nil, 'a', nil) }
75
+ let!(:nan_2) { push_entity(nil, 'a', nil) }
76
+ let!(:nna_1) { push_entity(nil, nil, 'a') }
77
+ let!(:nna_2) { push_entity(nil, nil, 'a') }
78
+ let!(:nnn_1) { push_entity(nil, nil, nil) }
79
+ let!(:nnn_2) { push_entity(nil, nil, nil) }
80
+
81
+ it 'returns the last added entity for :exchange, :queue, :route' do
82
+ expect(collection.find(delivery_info_stub('a', 'x', 'x'))).to eq(ann_2)
83
+ expect(collection.find(delivery_info_stub('x', 'a', 'x'))).to eq(nan_2)
84
+ expect(collection.find(delivery_info_stub('x', 'x', 'a'))).to eq(nna_2)
85
+ expect(collection.find(delivery_info_stub('x', 'x', 'x'))).to eq(nnn_2)
68
86
  end
69
87
  end
70
88
 
@@ -3,30 +3,40 @@ require 'spec_helper'
3
3
  RSpec.describe 'A Cottontail::Consumer instance' do
4
4
  pending 'RabbitMQ not running' unless rabbitmq_running?
5
5
 
6
- let(:rand) { SecureRandom.uuid }
7
- let(:topic) { "cottontail-test-#{rand}" }
8
- let(:queue) { "cottontail-test-#{rand}" }
9
- let(:payload) { 'hello world' }
10
-
11
- let :consumer do
12
- CottontailTestConsumer.new(topic, queue)
6
+ let(:payload) { SecureRandom.uuid }
7
+ let(:queue_name) { "cottontail-#{SecureRandom.uuid}" }
8
+
9
+ let(:consumer_class) do
10
+ Class.new(Cottontail::Test::Consumer) do
11
+ session do |worker, session|
12
+ channel = session.create_channel
13
+ queue = channel.queue(
14
+ options[:queue_name],
15
+ auto_delete: true,
16
+ durable: false
17
+ )
18
+
19
+ subscribe(queue, exclusive: false)
20
+ end
21
+ end
13
22
  end
14
- let(:consumable) { consumer.consumable }
23
+
24
+ let(:consumer) { consumer_class.new(queue_name: queue_name) }
15
25
 
16
26
  let :publisher do
17
27
  session = Bunny.new
18
28
  session.start
29
+
19
30
  session
20
31
  end
21
32
 
22
33
  before do
23
- # start consumer
24
34
  consumer.start(false)
25
35
 
26
36
  # publish message
27
37
  channel = publisher.create_channel
28
- channel.topic(topic)
29
- .publish(payload, routing_key: 'cottontail-spec')
38
+ exchange = channel.default_exchange
39
+ exchange.publish(payload, routing_key: queue_name)
30
40
  end
31
41
 
32
42
  after do
@@ -35,7 +45,10 @@ RSpec.describe 'A Cottontail::Consumer instance' do
35
45
  end
36
46
 
37
47
  it 'consumes the message' do
38
- 5.times { sleep 0.1 if consumable.payload.nil? }
39
- expect(consumable.payload).to eq(payload)
48
+ # wait for received message
49
+ 10.times { sleep 0.02 if consumer.running? }
50
+
51
+ message = consumer.messages.last
52
+ expect(message[:payload]).to eq(payload)
40
53
  end
41
54
  end
@@ -0,0 +1,57 @@
1
+ require 'benchmark'
2
+ require 'spec_helper'
3
+
4
+ RSpec.describe 'A Cottontail::Consumer instance', :performance do
5
+ pending 'RabbitMQ not running' unless rabbitmq_running?
6
+
7
+ let(:payload) { SecureRandom.uuid }
8
+ let(:max_messages) { 10_000 }
9
+ let(:queue_name) { "cottontail-#{SecureRandom.uuid}" }
10
+
11
+ let(:consumer_class) do
12
+ Class.new(Cottontail::Test::Consumer) do
13
+ session do |worker, session|
14
+ channel = session.create_channel
15
+ queue = channel.queue(
16
+ options[:queue_name],
17
+ auto_delete: true,
18
+ durable: false
19
+ )
20
+
21
+ subscribe(queue, exclusive: false)
22
+ end
23
+ end
24
+ end
25
+
26
+ let :consumer do
27
+ consumer_class.new(
28
+ queue_name: queue_name,
29
+ max_messages: max_messages
30
+ )
31
+ end
32
+
33
+ let :publisher do
34
+ session = Bunny.new
35
+ session.start
36
+
37
+ session
38
+ end
39
+
40
+ before do
41
+ # publish messages
42
+ channel = publisher.create_channel
43
+ channel.queue(queue_name, auto_delete: true, durable: false) # create queue
44
+
45
+ exchange = channel.default_exchange
46
+ max_messages.times { exchange.publish(payload, routing_key: queue_name) }
47
+ end
48
+
49
+ after do
50
+ publisher.stop
51
+ end
52
+
53
+ it 'consumes the message' do
54
+ seconds = Benchmark.realtime { consumer.start }
55
+ expect(seconds).to be < 2 # seconds
56
+ end
57
+ end
@@ -1,14 +1,30 @@
1
1
  $LOAD_PATH.unshift File.expand_path('..', __FILE__)
2
2
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
3
3
 
4
- require 'cottontail'
5
-
6
4
  require 'json'
7
5
  require 'byebug'
8
6
  require 'securerandom'
9
7
  require 'rspec/core'
10
8
  require 'rspec/expectations'
11
9
 
10
+ begin
11
+ require 'coveralls'
12
+ # Coveralls.wear!
13
+
14
+ require 'simplecov'
15
+ SimpleCov.start do
16
+ formatter = SimpleCov::Formatter::MultiFormatter[
17
+ Coveralls::SimpleCov::Formatter,
18
+ SimpleCov::Formatter::HTMLFormatter
19
+ ]
20
+ add_filter 'spec'
21
+ end
22
+ rescue LoadError
23
+ $stderr.puts 'Not running coverage'
24
+ end
25
+
26
+ require 'cottontail'
27
+
12
28
  Dir[File.dirname(__FILE__) + '/support/**/*.rb'].each { |f| require f }
13
29
 
14
30
  RSpec.configure do |config|
@@ -1,32 +1,33 @@
1
- class CottontailTestConsumer
2
- include Cottontail::Consumer
3
-
4
- set :logger, -> { Yell.new(:null) } # no logging
5
- attr_accessor :consumable
6
-
7
- def initialize(topic = 'cottontail-test-topic', queue = 'cottontail-test-queue')
8
- super()
9
-
10
- @consumable = OpenStruct.new
11
- @topic = topic
12
- @queue = queue
13
- end
14
-
15
- session do |worker, session|
16
- channel = session.create_channel
17
-
18
- exchange = channel.topic(@topic)
19
- queue = channel.queue(@queue, :auto_delete => true, :durable => false)
20
- .bind(exchange, routing_key: '#')
21
-
22
- worker.subscribe(queue, exclusive: true)
23
- end
24
-
25
- consume do |delivery_info, properties, payload|
26
- consumable.delivery_info = delivery_info
27
- consumable.properties = properties
28
- consumable.payload = payload
1
+ module Cottontail #:nodoc
2
+ module Test #:nodoc
3
+ class Consumer #:nodoc:
4
+ include Cottontail::Consumer
5
+ set :logger, -> { Yell.new(:null) }
6
+
7
+ set_callback :initialize, :after do
8
+ @max_messages = options[:max_messages] || 1
9
+ end
10
+
11
+ set_callback :consume, :after do
12
+ stop if stop?
13
+ end
14
+
15
+ consume do |delivery_info, properties, payload|
16
+ messages << {
17
+ consumable: :default,
18
+ delivery_info: delivery_info,
19
+ properties: properties,
20
+ payload: payload
21
+ }
22
+ end
23
+
24
+ def messages
25
+ @messages ||= []
26
+ end
27
+
28
+ def stop?
29
+ messages.count >= @max_messages
30
+ end
31
+ end
29
32
  end
30
33
  end
31
-
32
-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cottontail
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rudolf Schmidt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-07 00:00:00.000000000 Z
11
+ date: 2016-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -31,7 +31,7 @@ dependencies:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2'
34
- - - "<="
34
+ - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: '3'
37
37
  type: :runtime
@@ -41,7 +41,7 @@ dependencies:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '2'
44
- - - "<="
44
+ - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '3'
47
47
  - !ruby/object:Gem::Dependency
@@ -51,9 +51,9 @@ dependencies:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '3'
54
- - - "<="
54
+ - - "<"
55
55
  - !ruby/object:Gem::Version
56
- version: '4'
56
+ version: '5'
57
57
  type: :runtime
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
@@ -61,9 +61,9 @@ dependencies:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
63
  version: '3'
64
- - - "<="
64
+ - - "<"
65
65
  - !ruby/object:Gem::Version
66
- version: '4'
66
+ version: '5'
67
67
  description: Convenience wrapper around the AMQP Bunny gem to better handle routing_key
68
68
  specific messages
69
69
  email:
@@ -87,12 +87,13 @@ files:
87
87
  - lib/cottontail/consumer/launcher.rb
88
88
  - lib/cottontail/consumer/session.rb
89
89
  - lib/cottontail/version.rb
90
+ - spec/cottontail/configurable_inheritance_spec.rb
90
91
  - spec/cottontail/configurable_spec.rb
91
92
  - spec/cottontail/consumer/collection_spec.rb
92
93
  - spec/cottontail/consumer/entity_spec.rb
93
94
  - spec/integration/consumer_simple_spec.rb
95
+ - spec/performance/consumer_simple_spec.rb
94
96
  - spec/spec_helper.rb
95
- - spec/support/coverage.rb
96
97
  - spec/support/rabbitmq.rb
97
98
  - spec/support/test_consumer.rb
98
99
  homepage: http://github.com/rudionrails/cottontail
@@ -110,22 +111,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
111
  version: '0'
111
112
  required_rubygems_version: !ruby/object:Gem::Requirement
112
113
  requirements:
113
- - - ">"
114
+ - - ">="
114
115
  - !ruby/object:Gem::Version
115
- version: 1.3.1
116
+ version: '0'
116
117
  requirements: []
117
118
  rubyforge_project: cottontail
118
- rubygems_version: 2.4.5.1
119
+ rubygems_version: 2.5.1
119
120
  signing_key:
120
121
  specification_version: 4
121
122
  summary: Sinatra inspired wrapper around the AMQP Bunny gem
122
123
  test_files:
124
+ - spec/cottontail/configurable_inheritance_spec.rb
123
125
  - spec/cottontail/configurable_spec.rb
124
126
  - spec/cottontail/consumer/collection_spec.rb
125
127
  - spec/cottontail/consumer/entity_spec.rb
126
128
  - spec/integration/consumer_simple_spec.rb
129
+ - spec/performance/consumer_simple_spec.rb
127
130
  - spec/spec_helper.rb
128
- - spec/support/coverage.rb
129
131
  - spec/support/rabbitmq.rb
130
132
  - spec/support/test_consumer.rb
131
- has_rdoc:
@@ -1,16 +0,0 @@
1
- begin
2
- require 'coveralls'
3
- require 'simplecov'
4
-
5
- $stdout.puts 'Running coverage...'
6
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
7
- SimpleCov::Formatter::HTMLFormatter,
8
- Coveralls::SimpleCov::Formatter
9
- ]
10
-
11
- SimpleCov.start do
12
- add_filter 'spec'
13
- end
14
- rescue LoadError
15
- $stderr.puts 'Not running coverage'
16
- end