Sha256: 3253e4c858908462dbdf9b203adef8720b57121c52479b3efc6b52296820dccc

Contents?: true

Size: 669 Bytes

Versions: 2

Compression:

Stored size: 669 Bytes

Contents

require 'firehose/version'

require 'amqp'

module Firehose
  autoload :Subscription, 'firehose/subscription'
  autoload :Publisher,    'firehose/publisher'
  autoload :Goliath,      'firehose/goliath'
  autoload :Rack,         'firehose/rack'

  # 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

2 entries across 2 versions & 1 rubygems

Version Path
firehose-0.0.4 lib/firehose.rb
firehose-0.0.3 lib/firehose.rb