diff options
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/bindings/qpid/ruby/ChangeLog | 1 | ||||
| -rw-r--r-- | qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/message.rb | 8 | ||||
| -rw-r--r-- | qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/message_spec.rb | 13 |
3 files changed, 18 insertions, 4 deletions
diff --git a/qpid/cpp/bindings/qpid/ruby/ChangeLog b/qpid/cpp/bindings/qpid/ruby/ChangeLog index 4c96f91026..5fe9690b85 100644 --- a/qpid/cpp/bindings/qpid/ruby/ChangeLog +++ b/qpid/cpp/bindings/qpid/ruby/ChangeLog @@ -1,2 +1,3 @@ Verison 0.22: * Changed Qpid::Messaging::Address to use a URI on creation. + * Changed Qpid::Messaging::Message to allow a URI for reply_to. diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/message.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/message.rb index 9e5425cdd2..aaf62ba93d 100644 --- a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/message.rb +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/message.rb @@ -51,18 +51,18 @@ module Qpid # Sets the address to which replies should be sent for the +Message+. # - # *NOTE:* The address must be an instance of Address. - # # ==== Options # - # * address - an instance of +Address+ + # * address - an instance of +Address+, or an address URI # # ==== Examples # # msg.reply_to = Qpid:Messaging::Address.new "my-responses" + # msg.reply_to = "my-feed/responses" # def reply_to=(address) - raise ArgumentError, "Agument must be an Address" unless address.is_a? Qpid::Messaging::Address + address = Qpid::Messaging::Address.new "#{address}" if !address.is_a? Qpid::Messaging::Address + @message_impl.setReplyTo address.address_impl end diff --git a/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/message_spec.rb b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/message_spec.rb index 17b92c13a5..be19b3591e 100644 --- a/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/message_spec.rb +++ b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/message_spec.rb @@ -45,6 +45,19 @@ module Qpid reply_to.name.should == address.name end + it "can set the reply to from an address string" do + name = "my-queue" + subject = "responses" + address = "#{name}/#{subject}" + + @message.reply_to = address + + reply_to = @message.reply_to + + reply_to.name.should == name + reply_to.subject.should == subject + end + it "should store the content when created" do content = @message.content |
