diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2012-08-03 12:13:32 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2012-08-03 12:13:32 +0000 |
| commit | d43d1912b376322e27fdcda551a73f9ff5487972 (patch) | |
| tree | ce493e10baa95f44be8beb5778ce51783463196d /cpp/bindings/qpid/ruby | |
| parent | 04877fec0c6346edec67072d7f2d247740cf2af5 (diff) | |
| download | qpid-python-d43d1912b376322e27fdcda551a73f9ff5487972.tar.gz | |
QPID-3858: Updated branch - merged from trunk r.1368650
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1368910 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/ruby')
9 files changed, 33 insertions, 44 deletions
diff --git a/cpp/bindings/qpid/ruby/CMakeLists.txt b/cpp/bindings/qpid/ruby/CMakeLists.txt index 8a8c88b595..9b32ff5728 100644 --- a/cpp/bindings/qpid/ruby/CMakeLists.txt +++ b/cpp/bindings/qpid/ruby/CMakeLists.txt @@ -30,12 +30,13 @@ set(GEM_OUTPUT_FILE ${GEM_OUTPUT_PATH}/pkg/qpid-${qpidc_version}.0.gem) ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON) -set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") + +include_directories(${RUBY_INCLUDE_DIRS} ${qpid-cpp_SOURCE_DIR}/include) swig_add_module(cqpid_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i) swig_link_libraries(cqpid_ruby qpidmessaging qpidtypes qmf2 ${RUBY_LIBRARY}) -set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include") +set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") ##---------------------------------- ## Install the complete Ruby binding diff --git a/cpp/bindings/qpid/ruby/LICENSE b/cpp/bindings/qpid/ruby/LICENSE index cff2a5e25d..232fd660d6 100644 --- a/cpp/bindings/qpid/ruby/LICENSE +++ b/cpp/bindings/qpid/ruby/LICENSE @@ -203,32 +203,3 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -========================================================================= -== Boost License == -========================================================================= - -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - diff --git a/cpp/bindings/qpid/ruby/README.rdoc b/cpp/bindings/qpid/ruby/README.rdoc index 478fc939d9..5c60a15588 100644 --- a/cpp/bindings/qpid/ruby/README.rdoc +++ b/cpp/bindings/qpid/ruby/README.rdoc @@ -2,7 +2,7 @@ Qpid is an cross-platform enterprise messaging system. -Version :: 0.17.0 +Version :: 0.19.0 = Links diff --git a/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature b/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature index f509f49115..1f758153af 100644 --- a/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature +++ b/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature @@ -21,9 +21,9 @@ Feature: Creating a receiver Scenario: The address string is fine Given an open session - Then creating a receiver with "my-queue;{create:always}" succeeds + Then creating a receiver with "my-queue;{create:always,delete:always}" succeeds Scenario: Using an Address object Given an open session - And an Address with the name "create-receiver-test" and subject "foo" and option "create" set to "always" + And an Address with the name "create-receiver-test" and subject "foo" and option "create" set to "always" and "delete" set to "always" Then creating a receiver with an Address succeeds diff --git a/cpp/bindings/qpid/ruby/features/creating_a_sender.feature b/cpp/bindings/qpid/ruby/features/creating_a_sender.feature index ac75543c2d..1c09ff837d 100644 --- a/cpp/bindings/qpid/ruby/features/creating_a_sender.feature +++ b/cpp/bindings/qpid/ruby/features/creating_a_sender.feature @@ -5,11 +5,11 @@ Feature: Creating a sender Scenario: The session is closed Given a closed session - Then creating a sender with "my-queue;{create:always}" raises an exception + Then creating a sender with "my-queue;{create:always,delete:always}" raises an exception Scenario: The connection is closed Given an open session with a closed connection - Then creating a sender with "my-queue;{create:always}" raises an exception + Then creating a sender with "my-queue;{create:always,delete:always}" raises an exception Scenario: The address is malformed Given an open session @@ -17,7 +17,7 @@ Feature: Creating a sender Scenario: The address string is valid Given an open session - Then creating a sender with "my-queue;{create:always}" succeeds + Then creating a sender with "my-queue;{create:always,delete:always}" succeeds Scenario: Using an Address object Given an open session diff --git a/cpp/bindings/qpid/ruby/features/receiving_a_message.feature b/cpp/bindings/qpid/ruby/features/receiving_a_message.feature index b68a78c337..7b6db4a5ac 100644 --- a/cpp/bindings/qpid/ruby/features/receiving_a_message.feature +++ b/cpp/bindings/qpid/ruby/features/receiving_a_message.feature @@ -4,24 +4,26 @@ Feature: Receving a message I need to be able to receive messages Scenario: Receiving after the session is closed - Given a sender and receiver for "my-queue;{create:always}" + Given a sender and receiver for "my-queue;{create:always,delete:always}" And the message "this is a test" is sent And the session is closed Then getting the next message raises an error Scenario: Receiving after the connection is closed - Given a sender and receiver for "my-queue;{create:always}" + Given a sender and receiver for "my-queue;{create:always,delete:always}" And the message "this is a test" is sent And the connection is closed Then getting the next message raises an error Scenario: No message is received on an empty queue - Given an existing receiver for "my-queue;{create:always}" + Given an existing receiver for "my-queue;{create:always,delete:always}" And the receiver has no pending messages Then getting the next message raises an error Scenario: A message is pending - Given a sender and receiver for "my-queue;{create:always}" + Given an open session + And given a sender for "my-queue;{create:always}" + And given a receiver for "my-queue;{create:always,delete:always}" And the receiver has a capacity of 1 And the message "this is a test" is sent Then the receiver should have 1 message available diff --git a/cpp/bindings/qpid/ruby/features/sending_a_message.feature b/cpp/bindings/qpid/ruby/features/sending_a_message.feature index b1127d3664..45cbd42f06 100644 --- a/cpp/bindings/qpid/ruby/features/sending_a_message.feature +++ b/cpp/bindings/qpid/ruby/features/sending_a_message.feature @@ -5,17 +5,17 @@ Feature: Sending a message Scenario: The session is closed Given an open session - And creating a sender with "my-queue;{create:always}" succeeds + And creating a sender with "my-queue;{create:always,delete:always}" succeeds And the session is closed Then sending the message "This is a test" should raise an error Scenario: The connection is closed Given an open session - And creating a sender with "my-queue;{create:always}" succeeds + And creating a sender with "my-queue;{create:always,delete:always}" succeeds And the connection is closed Then sending the message "This is a test" should raise an error Scenario: The message sends successfully Given an open session - And creating a sender with "my-queue;{create:always}" succeeds + And creating a sender with "my-queue;{create:always,delete:always}" succeeds Then sending the message "This is a test" succeeds
\ No newline at end of file diff --git a/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb b/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb index 845cc2b116..0531e5ee69 100644 --- a/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb +++ b/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb @@ -22,3 +22,10 @@ Given /^an Address with the name "([^"]*)" and subject "([^"]*)" and option "([^ options["#{key}"] = "#{value}" @address = Qpid::Messaging::Address.new "#{name}", "#{subject}", options end + +Given /^an Address with the name "([^"]*)" and subject "([^"]*)" and option "([^"]*)" set to "([^"]*)" and "([^"]*)" set to "([^"]*)"$/ do |name, subject, key1, value1, key2, value2| + options = Hash.new + options["#{key1}"] = "#{value1}" + options["#{key2}"] = "#{value2}" + @address = Qpid::Messaging::Address.new "#{name}", "#{subject}", options +end diff --git a/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb b/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb index a8c8aa4a43..e454dac345 100644 --- a/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb +++ b/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb @@ -59,3 +59,11 @@ Then /^the receiver should have (\d+) message available$/ do |available| sleep 1 @receiver.available.should == available.to_i end + +Given /^given a sender for "([^"]*)"$/ do |address| + @sender = @session.create_sender "#{address}" +end + +Given /^given a receiver for "([^"]*)"$/ do |address| + @receiver = @session.create_receiver "#{address}" +end |
