From c9c964d7c4898780195963a6575a9523c975f6ed Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 17 Nov 2012 08:27:12 -0500 Subject: [PATCH] Using amqp uri env var in jruby implementation --- sylvilagus/jruby/lib/sylvilagus/ch02/hello_world.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sylvilagus/jruby/lib/sylvilagus/ch02/hello_world.rb b/sylvilagus/jruby/lib/sylvilagus/ch02/hello_world.rb index 506258c..0991495 100644 --- a/sylvilagus/jruby/lib/sylvilagus/ch02/hello_world.rb +++ b/sylvilagus/jruby/lib/sylvilagus/ch02/hello_world.rb @@ -8,7 +8,7 @@ module Sylvilagus::Ch02::HelloWorld module ClassMethods def with_hello_world_conn(&block) factory = ConnectionFactory.new - factory.uri = 'amqp://guest:guest@localhost:5672' + factory.uri = ENV.fetch('SYLVILAGUS_AMQP_URI') conn = factory.new_connection channel = conn.create_channel channel.exchange_declare('hello-exchange', 'direct', true)