You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Darryl L. Pierce" <dp...@redhat.com> on 2011/07/11 14:43:07 UTC

[PATCH 01/11] Created the Qpid Ruby libraries.

From: "Darryl L. Pierce" <dp...@redhat.com>

The libraries provide a more Ruby-esque way of using the Qpid libraries
that are generated via SWIG.
---
 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(+), 0 deletions(-)
 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

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 0000000..2cf0788
--- /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 0000000..7a16d08
--- /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 0000000..a791b16
--- /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 0000000..f5b7384
--- /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'
+
-- 
1.7.6


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org