From 9a841e70f1c69d1a009cdf489fda36e29e7cdbeb Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Tue, 9 Dec 2008 21:44:26 +0000 Subject: updated release notes, added a readme, and tweaked examples git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@724905 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/ruby/README.txt | 22 ++++++++++++++++++++++ qpid/ruby/RELEASE_NOTES | 5 +++-- qpid/ruby/examples/hello-world.rb | 10 ++++++++-- qpid/ruby/examples/qmf-libvirt.rb | 1 - 4 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 qpid/ruby/README.txt (limited to 'qpid/ruby') diff --git a/qpid/ruby/README.txt b/qpid/ruby/README.txt new file mode 100644 index 0000000000..b68a41b7b4 --- /dev/null +++ b/qpid/ruby/README.txt @@ -0,0 +1,22 @@ += INSTALLATION = + +Extract the release archive into a directory of your choice and set +your RUBYLIB environment variable accordingly: + + tar -xzf qpid-ruby-.tar.gz -C + export RUBYLIB=/qpid-/ruby/lib + += GETTING STARTED = + +The ruby client includes a simple hello-world example that publishes +and consumes a message: + + cp /qpid-/ruby/examples/hello-world.rb . + ./hello-world.rb + += RUNNING THE TESTS = + +The "tests" directory contains a collection of unit tests for the ruby +client. These can be run with the Rakefile provided: + + ./rake test diff --git a/qpid/ruby/RELEASE_NOTES b/qpid/ruby/RELEASE_NOTES index 6b40f54eb0..29760bd83a 100644 --- a/qpid/ruby/RELEASE_NOTES +++ b/qpid/ruby/RELEASE_NOTES @@ -2,8 +2,7 @@ Apache Qpid Ruby M4 Release Notes --------------------------------- The Qpid M4 release of the ruby client contains support the for AMQP -0-10 & 0-8 specifications (as well as support for the non-WIP portion -of the 0-9 specification). See: +0-10 & 0-8 specifications. See: http://jira.amqp.org/confluence/display/AMQP/Download @@ -12,3 +11,5 @@ our project page at: http://cwiki.apache.org/confluence/display/qpid/Index +The README file provided contains some details on installing and using +the ruby client that is included with this distribution. diff --git a/qpid/ruby/examples/hello-world.rb b/qpid/ruby/examples/hello-world.rb index 9cddf93ae0..755d13bd54 100644 --- a/qpid/ruby/examples/hello-world.rb +++ b/qpid/ruby/examples/hello-world.rb @@ -18,11 +18,17 @@ # under the License. # -require "rubygems" require "qpid" require "socket" -conn = Qpid::Connection.new(TCPSocket.new("localhost", 5672)) +broker = if ARGV.length > 0 then ARGV[0] else "localhost" end +port = if ARGV.length > 1 then ARGV[1].to_i else 5672 end +if ARGV.length > 2 then + puts "usage: hello-world.rb [ [ ] ]" + exit 1 +end + +conn = Qpid::Connection.new(TCPSocket.new(broker, port)) conn.start(10) ssn = conn.session("test") diff --git a/qpid/ruby/examples/qmf-libvirt.rb b/qpid/ruby/examples/qmf-libvirt.rb index 128cfb95ee..492f4fe8d6 100644 --- a/qpid/ruby/examples/qmf-libvirt.rb +++ b/qpid/ruby/examples/qmf-libvirt.rb @@ -18,7 +18,6 @@ # under the License. # -require "rubygems" require "qpid" s = Qpid::Qmf::Session.new() -- cgit v1.2.1