Sha256: 64a568398301f91c9c21e61ee3fb24582f2147e188c063307a71280ff3bb1035

Contents?: true

Size: 665 Bytes

Versions: 5

Compression:

Stored size: 665 Bytes

Contents

require 'firehose/version'

require 'amqp'

module Firehose
  autoload :Subscription, 'firehose/subscription'
  autoload :Publisher,    'firehose/publisher'
  autoload :Rack,         'firehose/rack'
  autoload :CLI,          'firehose/cli'

  # TODO move this into a configuration or session class.
  # Hang on to AMQP configuration settings.
  def self.amqp
    @amqp ||= Struct.new(:connection).new(AMQP.connect)
  end

  # TODO figure out a better way to memoize AMQP connection for production runtimes, and 
  # make it resetable for testing environment. Some sort of Firehose::Session object is probably
  # in order
  def self.reset!
    @amqp = nil
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
firehose-0.0.10 lib/firehose.rb
firehose-0.0.9 lib/firehose.rb
firehose-0.0.8 lib/firehose.rb
firehose-0.0.7 lib/firehose.rb
firehose-0.0.6 lib/firehose.rb