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 2015/06/03 22:30:50 UTC

[13/34] qpid-proton git commit: PROTON-799: Added the UUID mixin for the Ruby reactive APIs.

PROTON-799: Added the UUID mixin for the Ruby reactive APIs.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/8344ba64
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/8344ba64
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/8344ba64

Branch: refs/heads/master
Commit: 8344ba64e5abc33bb31f42d2982b7550c7d49a10
Parents: bab61a2
Author: Darryl L. Pierce <mc...@gmail.com>
Authored: Thu Feb 26 11:29:07 2015 -0500
Committer: Darryl L. Pierce <mc...@gmail.com>
Committed: Wed Jun 3 16:29:21 2015 -0400

----------------------------------------------------------------------
 proton-c/bindings/ruby/lib/qpid_proton.rb |  3 +++
 proton-c/bindings/ruby/lib/util/uuid.rb   | 32 ++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/8344ba64/proton-c/bindings/ruby/lib/qpid_proton.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/qpid_proton.rb b/proton-c/bindings/ruby/lib/qpid_proton.rb
index bcc7edd..80565dd 100644
--- a/proton-c/bindings/ruby/lib/qpid_proton.rb
+++ b/proton-c/bindings/ruby/lib/qpid_proton.rb
@@ -22,6 +22,8 @@ require "date"
 
 if RUBY_VERSION < "1.9"
 require "kconv"
+else
+  require "securerandom"
 end
 
 # Exception classes
@@ -33,6 +35,7 @@ require "util/error_handler"
 require "util/constants"
 require "util/swig_helper"
 require "util/engine"
+require "util/uuid"
 
 # Types
 require "types/strings"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/8344ba64/proton-c/bindings/ruby/lib/util/uuid.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/util/uuid.rb b/proton-c/bindings/ruby/lib/util/uuid.rb
new file mode 100644
index 0000000..882715b
--- /dev/null
+++ b/proton-c/bindings/ruby/lib/util/uuid.rb
@@ -0,0 +1,32 @@
+#--
+# 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::Proton::Util
+
+  module UUID
+
+    def generate_uuid
+      # generate a UUID based on what APIs are available with the current
+      # version of Ruby
+      SecureRandom.uuid
+    end
+
+  end
+
+end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org