diff options
author | Rafael H. Schloming <rhs@apache.org> | 2008-12-09 21:44:26 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2008-12-09 21:44:26 +0000 |
commit | 9a841e70f1c69d1a009cdf489fda36e29e7cdbeb (patch) | |
tree | d19b659a7a3c8ceaf4d2aafaa0e06865970797c2 | |
parent | b8d419092b87652996ab341eff482bff32c2f386 (diff) | |
download | qpid-python-9a841e70f1c69d1a009cdf489fda36e29e7cdbeb.tar.gz |
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
-rw-r--r-- | qpid/ruby/README.txt | 22 | ||||
-rw-r--r-- | qpid/ruby/RELEASE_NOTES | 5 | ||||
-rw-r--r-- | qpid/ruby/examples/hello-world.rb | 10 | ||||
-rw-r--r-- | qpid/ruby/examples/qmf-libvirt.rb | 1 |
4 files changed, 33 insertions, 5 deletions
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-<version>.tar.gz -C <install-prefix> + export RUBYLIB=<install-prefix>/qpid-<version>/ruby/lib + += GETTING STARTED = + +The ruby client includes a simple hello-world example that publishes +and consumes a message: + + cp <install-prefix>/qpid-<version>/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 [ <broker> [ <port> ] ]" + 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() |