You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by mc...@apache.org on 2013/10/01 23:15:05 UTC
svn commit: r1528216 - in /qpid/proton/trunk:
examples/messenger/ruby/mailserver.rb examples/messenger/ruby/recv.rb
examples/messenger/ruby/send.rb
proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb
Author: mcpierce
Date: Tue Oct 1 21:15:05 2013
New Revision: 1528216
URL: http://svn.apache.org/r1528216
Log:
PROTON-273: Removed the content Rspec test for Ruby.
Since the body of the message is accessed by the body property and not
by content, this test is no longer necessary.
Changed example apps to use body instead of content.
Modified:
qpid/proton/trunk/examples/messenger/ruby/mailserver.rb
qpid/proton/trunk/examples/messenger/ruby/recv.rb
qpid/proton/trunk/examples/messenger/ruby/send.rb
qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb
Modified: qpid/proton/trunk/examples/messenger/ruby/mailserver.rb
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/ruby/mailserver.rb?rev=1528216&r1=1528215&r2=1528216&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/ruby/mailserver.rb (original)
+++ qpid/proton/trunk/examples/messenger/ruby/mailserver.rb Tue Oct 1 21:15:05 2013
@@ -73,7 +73,7 @@ loop do
puts msg.reply_to
reply.address = msg.reply_to
reply.correlation_id = msg.correlation_id
- reply.content = msg.content
+ reply.body = msg.body
end
dispatch(msg, reply)
msgr.put(reply)
Modified: qpid/proton/trunk/examples/messenger/ruby/recv.rb
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/ruby/recv.rb?rev=1528216&r1=1528215&r2=1528216&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/ruby/recv.rb (original)
+++ qpid/proton/trunk/examples/messenger/ruby/recv.rb Tue Oct 1 21:15:05 2013
@@ -68,15 +68,13 @@ loop do
exit
end
- (cd, body) = msg.content
puts "Address: #{msg.address}"
subject = msg.subject || "(no subject)"
puts "Subject: #{subject}"
- puts "Content: #{body}"
+ puts "Body: #{msg.body}"
puts "Properties: #{msg.properties}"
puts "Instructions: #{msg.instructions}"
puts "Annotations: #{msg.annotations}"
- puts "Body: #{msg.body}"
end
end
Modified: qpid/proton/trunk/examples/messenger/ruby/send.rb
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/ruby/send.rb?rev=1528216&r1=1528215&r2=1528216&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/ruby/send.rb (original)
+++ qpid/proton/trunk/examples/messenger/ruby/send.rb Tue Oct 1 21:15:05 2013
@@ -44,7 +44,6 @@ msg = Qpid::Proton::Message.new
messages.each do |message|
msg.address = options[:address]
msg.subject = "How are you?"
- msg.content = message
msg["sent"] = Time.new
msg["hostname"] = ENV["HOSTNAME"]
msg.instructions["fold"] = "yes"
@@ -52,7 +51,7 @@ messages.each do |message|
msg.instructions["mutilate"] = "no"
msg.annotations["version"] = 1.0
msg.annotations["pill"] = :RED
- msg.body = "This is a message body. There are many like it but this one is mine."
+ msg.body = message
begin
messenger.put(msg)
Modified: qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb?rev=1528216&r1=1528215&r2=1528216&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb (original)
+++ qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb Tue Oct 1 21:15:05 2013
@@ -401,11 +401,6 @@ module Qpid
@message.reply_to_group_id.should eq(id)
end
- xit "can have nil content" do
- @message.content = nil
- @message.content.should be_nil
- end
-
it "can have an empty string as content" do
@message.content = ""
@message.content.should eq("")
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org