From b099a05a39a817d0e217f4faae6abe383924c957 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Fri, 15 Jul 2011 16:54:16 +0000 Subject: QPID-3306 - Provides a more Ruby-like set of APIs on top of the bindings created by swig. Applied patch from Darryl Pierce Created the Qpid Ruby libraries. The libraries provide a more Ruby-esque way of using the Qpid libraries that are generated via SWIG. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1147234 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/bindings/qpid/ruby/lib/qpid.rb | 21 ++++++++++++++++++++ cpp/bindings/qpid/ruby/lib/qpid/errors.rb | 30 +++++++++++++++++++++++++++++ cpp/bindings/qpid/ruby/lib/qpid/version.rb | 31 ++++++++++++++++++++++++++++++ cpp/bindings/qpid/ruby/test/ts_bindings.rb | 23 ++++++++++++++++++++++ 4 files changed, 105 insertions(+) create mode 100644 cpp/bindings/qpid/ruby/lib/qpid.rb create mode 100644 cpp/bindings/qpid/ruby/lib/qpid/errors.rb create mode 100644 cpp/bindings/qpid/ruby/lib/qpid/version.rb create mode 100644 cpp/bindings/qpid/ruby/test/ts_bindings.rb (limited to 'cpp') diff --git a/cpp/bindings/qpid/ruby/lib/qpid.rb b/cpp/bindings/qpid/ruby/lib/qpid.rb new file mode 100644 index 0000000000..2cf078829c --- /dev/null +++ b/cpp/bindings/qpid/ruby/lib/qpid.rb @@ -0,0 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, 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. +# + +require 'qpid/errors' + diff --git a/cpp/bindings/qpid/ruby/lib/qpid/errors.rb b/cpp/bindings/qpid/ruby/lib/qpid/errors.rb new file mode 100644 index 0000000000..7a16d08d84 --- /dev/null +++ b/cpp/bindings/qpid/ruby/lib/qpid/errors.rb @@ -0,0 +1,30 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, 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. +# + +module Qpid + + module Messaging + + class KeyError < RuntimeError + end + + end + +end + diff --git a/cpp/bindings/qpid/ruby/lib/qpid/version.rb b/cpp/bindings/qpid/ruby/lib/qpid/version.rb new file mode 100644 index 0000000000..a791b1638c --- /dev/null +++ b/cpp/bindings/qpid/ruby/lib/qpid/version.rb @@ -0,0 +1,31 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, 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. +# + +module Qpid + + module Version + + NUMBERS = [MAJOR = 0, + MINOR = 10, + BUILD = 0] + end + + VERSION = Version::NUMBERS.join('.') + +end diff --git a/cpp/bindings/qpid/ruby/test/ts_bindings.rb b/cpp/bindings/qpid/ruby/test/ts_bindings.rb new file mode 100644 index 0000000000..f5b7384513 --- /dev/null +++ b/cpp/bindings/qpid/ruby/test/ts_bindings.rb @@ -0,0 +1,23 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, 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. +# + +$:.unshift File.join(File.dirname(__FILE__), "..", "lib") + +require 'test/unit' + -- cgit v1.2.1