qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcpie...@apache.org
Subject [04/31] qpid-proton git commit: PROTON-781: Deleted the Ruby Filter mixin.
Date Mon, 08 Jun 2015 18:13:33 GMT
PROTON-781: Deleted the Ruby Filter mixin.

It was only used by Selectable, which is being refactored based on the
new underlying C Selectable type.


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

Branch: refs/heads/PROTON-781-ruby-reactor-apis
Commit: 4dffce64ff5f4e706043686fce781580322b7acb
Parents: e77477b
Author: Darryl L. Pierce <mcpierce@gmail.com>
Authored: Tue Feb 24 10:55:25 2015 -0500
Committer: Darryl L. Pierce <mcpierce@gmail.com>
Committed: Mon Jun 8 13:57:51 2015 -0400

----------------------------------------------------------------------
 proton-c/bindings/ruby/lib/messenger/filters.rb | 64 --------------------
 .../bindings/ruby/lib/messenger/selectable.rb   |  6 --
 proton-c/bindings/ruby/lib/qpid_proton.rb       |  1 -
 3 files changed, 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4dffce64/proton-c/bindings/ruby/lib/messenger/filters.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/messenger/filters.rb b/proton-c/bindings/ruby/lib/messenger/filters.rb
deleted file mode 100644
index 0ab3407..0000000
--- a/proton-c/bindings/ruby/lib/messenger/filters.rb
+++ /dev/null
@@ -1,64 +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::Messenger
-
-  # @private
-  module Filters
-
-    def self.included(base)
-      base.class_eval do
-        extend ClassMethods
-      end
-    end
-
-    module ClassMethods
-
-      def method_added(method_name)
-        @@hooked_methods ||= []
-        return if @@hooked_methods.include?(method_name)
-        @@hooked_methods << method_name
-        hooks = @@before_hooks[method_name]
-        return if hooks.nil?
-        orig_method = instance_method(method_name)
-        define_method(method_name) do |*args, &block|
-          hooks = @@before_hooks[method_name]
-          hooks.each do |hook|
-            method(hook).call
-          end
-
-          orig_method.bind(self).call(*args, &block)
-        end
-      end
-
-      def call_before(before_method, *methods)
-        @@before_hooks ||= {}
-        methods.each do |method|
-          hooks = @@before_hooks[method] || []
-          raise "Repeat filter: #{before_method}" if hooks.include? before_method
-          hooks << before_method
-          @@before_hooks[method] = hooks
-        end
-      end
-
-    end
-
-  end
-
-end

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4dffce64/proton-c/bindings/ruby/lib/messenger/selectable.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/messenger/selectable.rb b/proton-c/bindings/ruby/lib/messenger/selectable.rb
index ec5174f..da1a3d5 100644
--- a/proton-c/bindings/ruby/lib/messenger/selectable.rb
+++ b/proton-c/bindings/ruby/lib/messenger/selectable.rb
@@ -25,12 +25,6 @@ module Qpid::Proton::Messenger
   # @private
   class Selectable
 
-    include Filters
-
-    call_before :check_is_initialized,
-                :fileno, :capacity, :pending, :deadline,
-                :readable, :writable, :expired,
-                :registered=, :registered?
 
     def initialize(messenger, impl) # :nodoc:
       @messenger = messenger

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4dffce64/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 2791538..21f96a1 100644
--- a/proton-c/bindings/ruby/lib/qpid_proton.rb
+++ b/proton-c/bindings/ruby/lib/qpid_proton.rb
@@ -75,7 +75,6 @@ require "core/ssl"
 require "core/transport"
 
 # Messenger API classes
-require "messenger/filters"
 require "messenger/subscription"
 require "messenger/tracker_status"
 require "messenger/tracker"


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


Mime
View raw message