From b3d18d65587b89596040cce873fa6b356ccf0285 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@1147234 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/bindings/qpid/ruby/lib/qpid.rb | 21 +++++++++++++++++ qpid/cpp/bindings/qpid/ruby/lib/qpid/errors.rb | 30 ++++++++++++++++++++++++ qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb | 31 +++++++++++++++++++++++++ qpid/cpp/bindings/qpid/ruby/test/ts_bindings.rb | 23 ++++++++++++++++++ 4 files changed, 105 insertions(+) create mode 100644 qpid/cpp/bindings/qpid/ruby/lib/qpid.rb create mode 100644 qpid/cpp/bindings/qpid/ruby/lib/qpid/errors.rb create mode 100644 qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb create mode 100644 qpid/cpp/bindings/qpid/ruby/test/ts_bindings.rb (limited to 'qpid/cpp') diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid.rb new file mode 100644 index 0000000000..2cf078829c --- /dev/null +++ b/qpid/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/qpid/cpp/bindings/qpid/ruby/lib/qpid/errors.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/errors.rb new file mode 100644 index 0000000000..7a16d08d84 --- /dev/null +++ b/qpid/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/qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb new file mode 100644 index 0000000000..a791b1638c --- /dev/null +++ b/qpid/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/qpid/cpp/bindings/qpid/ruby/test/ts_bindings.rb b/qpid/cpp/bindings/qpid/ruby/test/ts_bindings.rb new file mode 100644 index 0000000000..f5b7384513 --- /dev/null +++ b/qpid/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