summaryrefslogtreecommitdiff
path: root/qpid/ruby
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2010-11-22 23:34:33 +0000
committerRobert Gemmell <robbie@apache.org>2010-11-22 23:34:33 +0000
commitbfd07dc5e87c63803dcb45c492a4746d8a9fc391 (patch)
tree64a174bd50bdfeb5a0fd7df69b143824b6b86ad2 /qpid/ruby
parentf8c3956720ffa7277f801372e2aa7614800bfdec (diff)
downloadqpid-python-bfd07dc5e87c63803dcb45c492a4746d8a9fc391.tar.gz
copy updated readme files from trunk, because I cant be bothered doing that many merges :)
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.8-release-candidates@1037942 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