summaryrefslogtreecommitdiff
path: root/qpid/ruby
diff options
context:
space:
mode:
authorJonathan Robie <jonathan@apache.org>2010-11-17 20:13:15 +0000
committerJonathan Robie <jonathan@apache.org>2010-11-17 20:13:15 +0000
commit829e90b4d94092ab4cf040e0f84f57e7a492e0db (patch)
treee82cff53143b47550fce7ca60ef53734060f2252 /qpid/ruby
parentcac1b88440584a9d69a212f01486bc9041278c66 (diff)
downloadqpid-python-829e90b4d94092ab4cf040e0f84f57e7a492e0db.tar.gz
Fixed README.txt to give correct instructions.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1036193 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/ruby')
-rw-r--r--qpid/ruby/README.txt30
1 files changed, 17 insertions, 13 deletions
diff --git a/qpid/ruby/README.txt b/qpid/ruby/README.txt
index 3c483f996b..330f9c6f61 100644
--- a/qpid/ruby/README.txt
+++ b/qpid/ruby/README.txt
@@ -1,22 +1,26 @@
-= INSTALLATION =
+= Running hello-world.rb =
-Extract the release archive into a directory of your choice and set
-your RUBYLIB environment variable accordingly:
+The ruby client includes a simple hello-world example that publishes
+and consumes a message. You can find this in the examples
+directory. This example requires a running broker.
- tar -xzf qpid-ruby-<version>.tar.gz -C <install-prefix>
- export RUBYLIB=<install-prefix>/qpid-<version>/ruby/lib
+You can set RUBYLIB to the directories containing the Qpid ruby
+library and the SASL extension, then run the example from the command
+line. These are found in the ./lib and ./ext/sasl subdirectories.
-= GETTING STARTED =
+$ export RUBYLIB=/home/me/qpid/ruby/lib:/home/me/qpid/ruby/ext/sasl
+$ ./hello-world.rb
+#<Qpid::Message:0xb761c378 @headers=[#<struct Struct::Qpid_Message_properties content_length=nil, message_id=nil, correlation_id=nil, reply_to=nil, content_type="text/plain", content_encoding=nil, user_id=nil, app_id=nil, application_headers=nil, st_type=message_properties, id=nil>, #<struct Struct::Qpid_Delivery_properties discard_unroutable=nil, immediate=nil, redelivered=nil, priority=nil, delivery_mode=nil, ttl=nil, timestamp=nil, expiration=nil, exchange="", routing_key="test-queue", resume_id=nil, resume_ttl=nil, st_type=delivery_properties, id=nil>], @body="Hello World!", @id=#<Qpid::Serial:0xb76450fc @value=0>>
-The ruby client includes a simple hello-world example that publishes
-and consumes a message:
+Alternatively, you can specify the library paths using $ ruby -I:
- cp <install-prefix>/qpid-<version>/ruby/examples/hello-world.rb .
- ./hello-world.rb
+$ ruby -I /home/me/qpid/ruby/lib:/home/me/qpid/ruby/ext/sasl hello-world.rb
+#<Qpid::Message:0xb7504a44 @headers=[#<struct Struct::Qpid_Message_properties content_length=nil, message_id=nil, correlation_id=nil, reply_to=nil, content_type="text/plain", content_encoding=nil, user_id=nil, app_id=nil, application_headers=nil, st_type=message_properties, id=nil>, #<struct Struct::Qpid_Delivery_properties discard_unroutable=nil, immediate=nil, redelivered=nil, priority=nil, delivery_mode=nil, ttl=nil, timestamp=nil, expiration=nil, exchange="", routing_key="test-queue", resume_id=nil, resume_ttl=nil, st_type=delivery_properties, id=nil>], @body="Hello World!", @id=#<Qpid::Serial:0xb752d548 @value=0>>
-= RUNNING THE TESTS =
+= Running the Tests =
The "tests" directory contains a collection of unit tests for the ruby
-client. These can be run with the Rakefile provided:
+client. These can be run from the 'ruby' directory with the Rakefile
+provided:
- rake test
+$ rake test