You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2018/03/23 15:08:56 UTC

[2/8] qpid-proton git commit: NO-JIRA: [ruby] Removed unused Timeout module.

NO-JIRA: [ruby] Removed unused Timeout module.


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

Branch: refs/heads/master
Commit: 1108c4e47a439f630d72127f6b00fdd9003cb9b7
Parents: d65528c
Author: Alan Conway <ac...@redhat.com>
Authored: Thu Mar 22 14:46:06 2018 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Fri Mar 23 09:39:39 2018 -0400

----------------------------------------------------------------------
 proton-c/bindings/ruby/lib/qpid_proton.rb       |  1 -
 proton-c/bindings/ruby/lib/util/timeout.rb      | 49 --------------------
 .../ruby/spec/exception_handling_spec.rb        |  2 +-
 3 files changed, 1 insertion(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1108c4e4/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 c446a79..c52310b 100644
--- a/proton-c/bindings/ruby/lib/qpid_proton.rb
+++ b/proton-c/bindings/ruby/lib/qpid_proton.rb
@@ -45,7 +45,6 @@ require "util/deprecation"
 require "util/version"
 require "util/error_handler"
 require "util/wrapper"
-require "util/timeout"
 
 # Types
 require "types/type"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1108c4e4/proton-c/bindings/ruby/lib/util/timeout.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/util/timeout.rb b/proton-c/bindings/ruby/lib/util/timeout.rb
deleted file mode 100644
index 5e299dd..0000000
--- a/proton-c/bindings/ruby/lib/util/timeout.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-# 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
-
-  # Provides methods for converting between milliseconds, seconds
-  # and timeout values.
-  #
-  # @private
-  module Timeout
-
-    def sec_to_millis(s)
-      return (s * 1000).to_int
-    end
-
-    def millis_to_sec(ms)
-      return (ms.to_f / 1000.0).to_int
-    end
-
-    def timeout_to_millis(s)
-      return Cproton::PN_MILLIS_MAX if s.nil?
-
-      return sec_to_millis(s)
-    end
-
-    def millis_to_timeout(ms)
-      return nil if ms == Cproton::PN_MILLIS_MAX
-
-      return millis_to_sec(ms)
-    end
-
-  end
-
-end

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1108c4e4/proton-c/bindings/ruby/spec/exception_handling_spec.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/spec/exception_handling_spec.rb b/proton-c/bindings/ruby/spec/exception_handling_spec.rb
index acfb55e..3d65b40 100644
--- a/proton-c/bindings/ruby/spec/exception_handling_spec.rb
+++ b/proton-c/bindings/ruby/spec/exception_handling_spec.rb
@@ -70,7 +70,7 @@ module Qpid
         }.must_raise(Qpid::Proton::ArgumentError)
       end
 
-      it "raises Timeout on PN_TIMEOUT" do
+      it "raises TimeoutError on PN_TIMEOUT" do
         proc {
           @handler.check_for_error(Qpid::Proton::Error::TIMEOUT)
         }.must_raise(Qpid::Proton::TimeoutError)


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