Permalink
Browse files

Merge pull request #4 from alphagov/remove-marples

Remove dependency on marples and the associated initialisers
  • Loading branch information...
2 parents 251d3fb + e125553 commit 9f9662b6e1b1588b056e6e8075eee26354696fa9 @fatbusinessman fatbusinessman committed Jun 22, 2012
Showing with 0 additions and 57 deletions.
  1. +0 −1 Gemfile
  2. +0 −5 Gemfile.lock
  3. +0 −17 config/initializers/messenger.rb
  4. +0 −22 features/support/fake_transport.rb
  5. +0 −12 lib/messenger.rb
View
@@ -12,7 +12,6 @@ gem 'plek', '~> 0'
gem 'formtastic', git: 'git://github.com/justinfrench/formtastic.git', branch: '2.1-stable'
gem 'formtastic-bootstrap', git: 'git://github.com/cgunther/formtastic-bootstrap.git', branch: 'bootstrap-2'
gem 'stomp'
-gem 'marples', '~> 1.0'
gem 'whenever'
gem 'ansi'
gem 'gelf'
View
@@ -141,10 +141,6 @@ GEM
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- marples (1.0.5)
- activesupport
- i18n
- null_logger
mechanize (2.0.1)
net-http-digest_auth (~> 1.1, >= 1.1.1)
net-http-persistent (~> 1.8)
@@ -284,7 +280,6 @@ DEPENDENCIES
gelf
govuk_content_models (~> 0.1.00)
launchy
- marples (~> 1.0)
minitest
mocha
mongo (= 1.5.2)
@@ -1,17 +0,0 @@
-require 'messenger'
-
-if Rails.env.test? or ENV['NO_MESSENGER'].present?
- Messenger.transport = Marples::NullTransport.instance
-else
- stomp_url = "failover://(stomp://support.cluster:61613,stomp://support.cluster:61613)"
-
- if defined?(PhusionPassenger)
- PhusionPassenger.on_event(:starting_worker_process) do |forked|
- if forked
- Messenger.transport = Stomp::Client.new stomp_url
- end
- end
- else
- Messenger.transport = Stomp::Client.new stomp_url
- end
-end
@@ -1,22 +0,0 @@
-class FakeTransport
- include Singleton
-
- attr_reader :notifications
-
- def initialize
- flush
- end
-
- def flush
- self.notifications = []
- end
-
- def publish(destination, message, headers = {})
- notifications << { destination: destination, message: Hash.from_xml(message).with_indifferent_access, headers: headers }
- end
-
- private
- attr_writer :notifications
-end
-
-Messenger.transport = FakeTransport.instance
View
@@ -1,12 +0,0 @@
-class Messenger
- include Singleton
- cattr_accessor :transport
-
- def method_missing *args
- client.send *args
- end
-
- def client
- @client ||= Marples::Client.new self.class.transport, "panopticon", Rails.logger
- end
-end

0 comments on commit 9f9662b

Please sign in to comment.