[DRE-commits] [SCM] ruby-right-http-connection.git branch, master, updated. upstream/1.3.0-7-g8b5d544

Minto Joseph mintojoseph at yahoo.com
Sun Jun 23 07:19:45 UTC 2013


The following commit has been merged in the master branch:
commit 3ee3bb9c29161a9deacdc75297598ed422e96b70
Author: Minto Joseph <mintojoseph at yahoo.com>
Date:   Sun Jun 23 12:43:17 2013 +0530

            Added patch for fixing the library paths.

diff --git a/debian/patches/lib-path-fix.patch b/debian/patches/lib-path-fix.patch
new file mode 100644
index 0000000..84f205a
--- /dev/null
+++ b/debian/patches/lib-path-fix.patch
@@ -0,0 +1,667 @@
+Description: Fixed library paths
+ Fixed library paths to be specific
+Forwarded: No
+Author: Minto Joseph <mintojoseph at yahoo.com>
+Last-Update: 2013-06-22
+
+--- ruby-right-http-connection-orig/lib/base/net_fix.rb	2013-06-22 20:38:58.448143089 +0530
++++ ruby-right-http-connection/lib/base/net_fix.rb	1970-01-01 05:30:00.000000000 +0530
+@@ -1,178 +0,0 @@
+-#
+-# Copyright (c) 2008 RightScale Inc
+-#
+-# Permission is hereby granted, free of charge, to any person obtaining
+-# a copy of this software and associated documentation files (the
+-# "Software"), to deal in the Software without restriction, including
+-# without limitation the rights to use, copy, modify, merge, publish,
+-# distribute, sublicense, and/or sell copies of the Software, and to
+-# permit persons to whom the Software is furnished to do so, subject to
+-# the following conditions:
+-#
+-# The above copyright notice and this permission notice shall be
+-# included in all copies or substantial portions of the Software.
+-#
+-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-#
+-#
+-
+-# Net::HTTP and Net::HTTPGenericRequest fixes to support 100-continue on 
+-# POST and PUT. The request must have 'expect' field set to '100-continue'.
+-
+-
+-module Net
+-  
+-  class BufferedIO #:nodoc:
+-    # Monkey-patch Net::BufferedIO to read > 1024 bytes from the socket at a time
+-
+-    # Default size (in bytes) of the max read from a socket into the user space read buffers for socket IO
+-    DEFAULT_SOCKET_READ_SIZE = 16*1024
+-
+-    @@socket_read_size = DEFAULT_SOCKET_READ_SIZE
+-
+-    def self.socket_read_size=(readsize)
+-      if(readsize <= 0)
+-        return
+-      end
+-      @@socket_read_size = readsize
+-    end
+-
+-    def self.socket_read_size?()
+-      @@socket_read_size
+-    end
+-
+-    def rbuf_fill
+-      timeout(@read_timeout) {
+-        @rbuf << @io.sysread(@@socket_read_size)
+-      }
+-    end
+-  end
+-
+-
+-  #-- Net::HTTPGenericRequest --
+-
+-  class HTTPGenericRequest
+-    # Monkey-patch Net::HTTPGenericRequest to read > 1024 bytes from the local data
+-    # source at a time (used in streaming PUTs)
+-
+-    # Default size (in bytes) of the max read from a local source (File, String,
+-    # etc.) to the user space write buffers for socket IO.
+-    DEFAULT_LOCAL_READ_SIZE = 16*1024
+-
+-    @@local_read_size = DEFAULT_LOCAL_READ_SIZE
+-
+-    def self.local_read_size=(readsize)
+-      if(readsize <= 0)
+-        return
+-      end
+-      @@local_read_size = readsize
+-    end
+-
+-    def self.local_read_size?()
+-      @@local_read_size
+-    end
+-
+-    def exec(sock, ver, path, send_only=nil)   #:nodoc: internal use only
+-      if @body
+-        send_request_with_body sock, ver, path, @body, send_only
+-      elsif @body_stream
+-        send_request_with_body_stream sock, ver, path, @body_stream, send_only
+-      else
+-        write_header(sock, ver, path)
+-      end
+-    end
+-
+-    private
+-
+-    def send_request_with_body(sock, ver, path, body, send_only=nil)
+-      self.content_length = body.respond_to?(:bytesize) ? body.bytesize : body.length
+-      delete 'Transfer-Encoding'
+-      supply_default_content_type
+-      write_header(sock, ver, path) unless send_only == :body
+-      sock.write(body && body.to_s) unless send_only == :header
+-    end
+-
+-    def send_request_with_body_stream(sock, ver, path, f, send_only=nil)
+-      # KD: Fix 'content-length': it must not be greater than a piece of file left to be read.
+-      # Otherwise the connection may behave like crazy causing 4xx or 5xx responses
+-      #
+-      # Only do this helpful thing if the stream responds to :pos (it may be something
+-      # that responds to :read and :size but not :pos).
+-      if f.respond_to?(:pos)
+-        file_size           = f.respond_to?(:lstat) ? f.lstat.size : f.size
+-        bytes_to_read       = [ file_size - f.pos, self.content_length.to_i ].sort.first
+-        self.content_length = bytes_to_read
+-      end
+-
+-      unless content_length() or chunked?
+-        raise ArgumentError,
+-            "Content-Length not given and Transfer-Encoding is not `chunked'"
+-      end
+-      bytes_to_read ||= content_length()
+-      supply_default_content_type
+-      write_header(sock, ver, path) unless send_only == :body
+-      unless send_only == :header
+-        if chunked?
+-          while s = f.read(@@local_read_size)
+-            sock.write(sprintf("%x\r\n", s.length) << s << "\r\n")
+-          end
+-          sock.write "0\r\n\r\n"
+-        else
+-          # KD: When we read/write over file EOF it sometimes make the connection unstable
+-          read_size = [ @@local_read_size, bytes_to_read ].sort.first
+-          while s = f.read(read_size)
+-            sock.write s
+-            # Make sure we do not read over EOF or more than expected content-length
+-            bytes_to_read -= read_size
+-            break if bytes_to_read <= 0
+-            read_size = bytes_to_read if bytes_to_read < read_size
+-          end
+-        end
+-      end
+-    end    
+-  end
+-
+-
+-  #-- Net::HTTP --
+-  
+-  class HTTP
+-    def request(req, body = nil, &block)  # :yield: +response+
+-      unless started?
+-        start {
+-          req['connection'] ||= 'close'
+-          return request(req, body, &block)
+-        }
+-      end
+-      if proxy_user()
+-        unless use_ssl?
+-          req.proxy_basic_auth proxy_user(), proxy_pass()
+-        end
+-      end
+-      # set body
+-      req.set_body_internal body
+-      begin_transport req
+-        # if we expect 100-continue then send a header first
+-        send_only = ((req.is_a?(Post)||req.is_a?(Put)) && (req['expect']=='100-continue')) ? :header : nil
+-        req.exec @socket, @curr_http_version, edit_path(req.path), send_only
+-        begin
+-          res = HTTPResponse.read_new(@socket)
+-          # if we expected 100-continue then send a body
+-          if res.is_a?(HTTPContinue) && send_only && req['content-length'].to_i > 0
+-            req.exec @socket, @curr_http_version, edit_path(req.path), :body
+-          end
+-        end while res.kind_of?(HTTPContinue)
+-        res.reading_body(@socket, req.response_body_permitted?) {
+-          yield res if block_given?
+-        }
+-      end_transport req, res
+-      res
+-    end
+-  end
+-
+-end
+diff -Naur ruby-right-http-connection-orig/lib/base/support.rb ruby-right-http-connection/lib/base/support.rb
+--- ruby-right-http-connection-orig/lib/base/support.rb	2013-06-22 20:38:58.448143089 +0530
++++ ruby-right-http-connection/lib/base/support.rb	1970-01-01 05:30:00.000000000 +0530
+@@ -1,109 +0,0 @@
+-  # These are ActiveSupport-;like extensions to do a few handy things in the gems
+-  # Derived from ActiveSupport, so the AS copyright notice applies:
+-  #
+-  #
+-  #
+-  # Copyright (c) 2005 David Heinemeier Hansson
+-  #
+-  # Permission is hereby granted, free of charge, to any person obtaining
+-  # a copy of this software and associated documentation files (the
+-  # "Software"), to deal in the Software without restriction, including
+-  # without limitation the rights to use, copy, modify, merge, publish,
+-  # distribute, sublicense, and/or sell copies of the Software, and to
+-  # permit persons to whom the Software is furnished to do so, subject to
+-  # the following conditions:
+-  #
+-  # The above copyright notice and this permission notice shall be
+-  # included in all copies or substantial portions of the Software.
+-  #
+-  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+-  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+-  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+-  # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+-  # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+-  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+-  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-  #++
+-  #
+-  #
+-  class String #:nodoc:
+-
+-    # Constantize tries to find a declared constant with the name specified
+-    # in the string. It raises a NameError when the name is not in CamelCase
+-    # or is not initialized.
+-    #
+-    # Examples
+-    #   "Module".constantize #=> Module
+-    #   "Class".constantize #=> Class
+-    def right_constantize()
+-      unless /\A(?:::)?([A-Z]\w*(?:::[A-Z]\w*)*)\z/ =~ self
+-        raise NameError, "#{self.inspect} is not a valid constant name!"
+-      end
+-      Object.module_eval("::#{$1}", __FILE__, __LINE__)
+-    end
+-
+-    def right_camelize()
+-      self.dup.split(/_/).map{ |word| word.capitalize }.join('')
+-    end
+-
+-  end
+-
+-
+-  class Object #:nodoc:
+-    # "", "   ", nil, [], and {} are blank
+-    def right_blank?
+-      if respond_to?(:empty?) && respond_to?(:strip)
+-        empty? or strip.empty?
+-      elsif respond_to?(:empty?)
+-        empty?
+-      else
+-        !self
+-      end
+-    end
+-  end
+-
+-  class NilClass #:nodoc:
+-    def right_blank?
+-      true
+-    end
+-  end
+-
+-  class FalseClass #:nodoc:
+-    def right_blank?
+-      true
+-    end
+-  end
+-
+-  class TrueClass #:nodoc:
+-    def right_blank?
+-      false
+-    end
+-  end
+-
+-  class Array #:nodoc:
+-    alias_method :right_blank?, :empty?
+-  end
+-
+-  class Hash #:nodoc:
+-    alias_method :right_blank?, :empty?
+-
+-    # Return a new hash with all keys converted to symbols.
+-    def right_symbolize_keys
+-      inject({}) do |options, (key, value)|
+-        options[key.to_sym] = value
+-        options
+-      end
+-    end
+-  end
+-
+-  class String #:nodoc:
+-    def right_blank?
+-      empty? || strip.empty?
+-    end
+-  end
+-
+-  class Numeric #:nodoc:
+-    def right_blank?
+-      false
+-    end
+-  end
+diff -Naur ruby-right-http-connection-orig/lib/base/version.rb ruby-right-http-connection/lib/base/version.rb
+--- ruby-right-http-connection-orig/lib/base/version.rb	2013-06-22 20:38:58.448143089 +0530
++++ ruby-right-http-connection/lib/base/version.rb	1970-01-01 05:30:00.000000000 +0530
+@@ -1,32 +0,0 @@
+-#--  -*- mode: ruby; encoding: utf-8 -*-
+-# Copyright: Copyright (c) 2010 RightScale, Inc.
+-#
+-# Permission is hereby granted, free of charge, to any person obtaining
+-# a copy of this software and associated documentation files (the
+-# 'Software'), to deal in the Software without restriction, including
+-# without limitation the rights to use, copy, modify, merge, publish,
+-# distribute, sublicense, and/or sell copies of the Software, and to
+-# permit persons to whom the Software is furnished to do so, subject to
+-# the following conditions:
+-#
+-# The above copyright notice and this permission notice shall be
+-# included in all copies or substantial portions of the Software.
+-#
+-# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-#++
+-
+-module RightHttpConnection #:nodoc:
+-  module VERSION #:nodoc:
+-    MAJOR = 1  unless defined?(MAJOR)
+-    MINOR = 4  unless defined?(MINOR)
+-    TINY  = 0  unless defined?(TINY)
+-
+-    STRING = [MAJOR, MINOR, TINY].join('.') unless defined?(STRING)
+-  end
+-end
+diff -Naur ruby-right-http-connection-orig/lib/right_http_connection/net_fix.rb ruby-right-http-connection/lib/right_http_connection/net_fix.rb
+--- ruby-right-http-connection-orig/lib/right_http_connection/net_fix.rb	1970-01-01 05:30:00.000000000 +0530
++++ ruby-right-http-connection/lib/right_http_connection/net_fix.rb	2013-06-22 20:41:10.280147169 +0530
+@@ -0,0 +1,178 @@
++#
++# Copyright (c) 2008 RightScale Inc
++#
++# Permission is hereby granted, free of charge, to any person obtaining
++# a copy of this software and associated documentation files (the
++# "Software"), to deal in the Software without restriction, including
++# without limitation the rights to use, copy, modify, merge, publish,
++# distribute, sublicense, and/or sell copies of the Software, and to
++# permit persons to whom the Software is furnished to do so, subject to
++# the following conditions:
++#
++# The above copyright notice and this permission notice shall be
++# included in all copies or substantial portions of the Software.
++#
++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++#
++#
++
++# Net::HTTP and Net::HTTPGenericRequest fixes to support 100-continue on 
++# POST and PUT. The request must have 'expect' field set to '100-continue'.
++
++
++module Net
++  
++  class BufferedIO #:nodoc:
++    # Monkey-patch Net::BufferedIO to read > 1024 bytes from the socket at a time
++
++    # Default size (in bytes) of the max read from a socket into the user space read buffers for socket IO
++    DEFAULT_SOCKET_READ_SIZE = 16*1024
++
++    @@socket_read_size = DEFAULT_SOCKET_READ_SIZE
++
++    def self.socket_read_size=(readsize)
++      if(readsize <= 0)
++        return
++      end
++      @@socket_read_size = readsize
++    end
++
++    def self.socket_read_size?()
++      @@socket_read_size
++    end
++
++    def rbuf_fill
++      timeout(@read_timeout) {
++        @rbuf << @io.sysread(@@socket_read_size)
++      }
++    end
++  end
++
++
++  #-- Net::HTTPGenericRequest --
++
++  class HTTPGenericRequest
++    # Monkey-patch Net::HTTPGenericRequest to read > 1024 bytes from the local data
++    # source at a time (used in streaming PUTs)
++
++    # Default size (in bytes) of the max read from a local source (File, String,
++    # etc.) to the user space write buffers for socket IO.
++    DEFAULT_LOCAL_READ_SIZE = 16*1024
++
++    @@local_read_size = DEFAULT_LOCAL_READ_SIZE
++
++    def self.local_read_size=(readsize)
++      if(readsize <= 0)
++        return
++      end
++      @@local_read_size = readsize
++    end
++
++    def self.local_read_size?()
++      @@local_read_size
++    end
++
++    def exec(sock, ver, path, send_only=nil)   #:nodoc: internal use only
++      if @body
++        send_request_with_body sock, ver, path, @body, send_only
++      elsif @body_stream
++        send_request_with_body_stream sock, ver, path, @body_stream, send_only
++      else
++        write_header(sock, ver, path)
++      end
++    end
++
++    private
++
++    def send_request_with_body(sock, ver, path, body, send_only=nil)
++      self.content_length = body.respond_to?(:bytesize) ? body.bytesize : body.length
++      delete 'Transfer-Encoding'
++      supply_default_content_type
++      write_header(sock, ver, path) unless send_only == :body
++      sock.write(body && body.to_s) unless send_only == :header
++    end
++
++    def send_request_with_body_stream(sock, ver, path, f, send_only=nil)
++      # KD: Fix 'content-length': it must not be greater than a piece of file left to be read.
++      # Otherwise the connection may behave like crazy causing 4xx or 5xx responses
++      #
++      # Only do this helpful thing if the stream responds to :pos (it may be something
++      # that responds to :read and :size but not :pos).
++      if f.respond_to?(:pos)
++        file_size           = f.respond_to?(:lstat) ? f.lstat.size : f.size
++        bytes_to_read       = [ file_size - f.pos, self.content_length.to_i ].sort.first
++        self.content_length = bytes_to_read
++      end
++
++      unless content_length() or chunked?
++        raise ArgumentError,
++            "Content-Length not given and Transfer-Encoding is not `chunked'"
++      end
++      bytes_to_read ||= content_length()
++      supply_default_content_type
++      write_header(sock, ver, path) unless send_only == :body
++      unless send_only == :header
++        if chunked?
++          while s = f.read(@@local_read_size)
++            sock.write(sprintf("%x\r\n", s.length) << s << "\r\n")
++          end
++          sock.write "0\r\n\r\n"
++        else
++          # KD: When we read/write over file EOF it sometimes make the connection unstable
++          read_size = [ @@local_read_size, bytes_to_read ].sort.first
++          while s = f.read(read_size)
++            sock.write s
++            # Make sure we do not read over EOF or more than expected content-length
++            bytes_to_read -= read_size
++            break if bytes_to_read <= 0
++            read_size = bytes_to_read if bytes_to_read < read_size
++          end
++        end
++      end
++    end    
++  end
++
++
++  #-- Net::HTTP --
++  
++  class HTTP
++    def request(req, body = nil, &block)  # :yield: +response+
++      unless started?
++        start {
++          req['connection'] ||= 'close'
++          return request(req, body, &block)
++        }
++      end
++      if proxy_user()
++        unless use_ssl?
++          req.proxy_basic_auth proxy_user(), proxy_pass()
++        end
++      end
++      # set body
++      req.set_body_internal body
++      begin_transport req
++        # if we expect 100-continue then send a header first
++        send_only = ((req.is_a?(Post)||req.is_a?(Put)) && (req['expect']=='100-continue')) ? :header : nil
++        req.exec @socket, @curr_http_version, edit_path(req.path), send_only
++        begin
++          res = HTTPResponse.read_new(@socket)
++          # if we expected 100-continue then send a body
++          if res.is_a?(HTTPContinue) && send_only && req['content-length'].to_i > 0
++            req.exec @socket, @curr_http_version, edit_path(req.path), :body
++          end
++        end while res.kind_of?(HTTPContinue)
++        res.reading_body(@socket, req.response_body_permitted?) {
++          yield res if block_given?
++        }
++      end_transport req, res
++      res
++    end
++  end
++
++end
+diff -Naur ruby-right-http-connection-orig/lib/right_http_connection/support.rb ruby-right-http-connection/lib/right_http_connection/support.rb
+--- ruby-right-http-connection-orig/lib/right_http_connection/support.rb	1970-01-01 05:30:00.000000000 +0530
++++ ruby-right-http-connection/lib/right_http_connection/support.rb	2013-06-22 20:41:10.280147169 +0530
+@@ -0,0 +1,109 @@
++  # These are ActiveSupport-;like extensions to do a few handy things in the gems
++  # Derived from ActiveSupport, so the AS copyright notice applies:
++  #
++  #
++  #
++  # Copyright (c) 2005 David Heinemeier Hansson
++  #
++  # Permission is hereby granted, free of charge, to any person obtaining
++  # a copy of this software and associated documentation files (the
++  # "Software"), to deal in the Software without restriction, including
++  # without limitation the rights to use, copy, modify, merge, publish,
++  # distribute, sublicense, and/or sell copies of the Software, and to
++  # permit persons to whom the Software is furnished to do so, subject to
++  # the following conditions:
++  #
++  # The above copyright notice and this permission notice shall be
++  # included in all copies or substantial portions of the Software.
++  #
++  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++  # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++  # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++  #++
++  #
++  #
++  class String #:nodoc:
++
++    # Constantize tries to find a declared constant with the name specified
++    # in the string. It raises a NameError when the name is not in CamelCase
++    # or is not initialized.
++    #
++    # Examples
++    #   "Module".constantize #=> Module
++    #   "Class".constantize #=> Class
++    def right_constantize()
++      unless /\A(?:::)?([A-Z]\w*(?:::[A-Z]\w*)*)\z/ =~ self
++        raise NameError, "#{self.inspect} is not a valid constant name!"
++      end
++      Object.module_eval("::#{$1}", __FILE__, __LINE__)
++    end
++
++    def right_camelize()
++      self.dup.split(/_/).map{ |word| word.capitalize }.join('')
++    end
++
++  end
++
++
++  class Object #:nodoc:
++    # "", "   ", nil, [], and {} are blank
++    def right_blank?
++      if respond_to?(:empty?) && respond_to?(:strip)
++        empty? or strip.empty?
++      elsif respond_to?(:empty?)
++        empty?
++      else
++        !self
++      end
++    end
++  end
++
++  class NilClass #:nodoc:
++    def right_blank?
++      true
++    end
++  end
++
++  class FalseClass #:nodoc:
++    def right_blank?
++      true
++    end
++  end
++
++  class TrueClass #:nodoc:
++    def right_blank?
++      false
++    end
++  end
++
++  class Array #:nodoc:
++    alias_method :right_blank?, :empty?
++  end
++
++  class Hash #:nodoc:
++    alias_method :right_blank?, :empty?
++
++    # Return a new hash with all keys converted to symbols.
++    def right_symbolize_keys
++      inject({}) do |options, (key, value)|
++        options[key.to_sym] = value
++        options
++      end
++    end
++  end
++
++  class String #:nodoc:
++    def right_blank?
++      empty? || strip.empty?
++    end
++  end
++
++  class Numeric #:nodoc:
++    def right_blank?
++      false
++    end
++  end
+diff -Naur ruby-right-http-connection-orig/lib/right_http_connection/version.rb ruby-right-http-connection/lib/right_http_connection/version.rb
+--- ruby-right-http-connection-orig/lib/right_http_connection/version.rb	1970-01-01 05:30:00.000000000 +0530
++++ ruby-right-http-connection/lib/right_http_connection/version.rb	2013-06-22 20:41:10.280147169 +0530
+@@ -0,0 +1,32 @@
++#--  -*- mode: ruby; encoding: utf-8 -*-
++# Copyright: Copyright (c) 2010 RightScale, Inc.
++#
++# Permission is hereby granted, free of charge, to any person obtaining
++# a copy of this software and associated documentation files (the
++# 'Software'), to deal in the Software without restriction, including
++# without limitation the rights to use, copy, modify, merge, publish,
++# distribute, sublicense, and/or sell copies of the Software, and to
++# permit persons to whom the Software is furnished to do so, subject to
++# the following conditions:
++#
++# The above copyright notice and this permission notice shall be
++# included in all copies or substantial portions of the Software.
++#
++# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
++# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++#++
++
++module RightHttpConnection #:nodoc:
++  module VERSION #:nodoc:
++    MAJOR = 1  unless defined?(MAJOR)
++    MINOR = 4  unless defined?(MINOR)
++    TINY  = 0  unless defined?(TINY)
++
++    STRING = [MAJOR, MINOR, TINY].join('.') unless defined?(STRING)
++  end
++end
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3a22f3f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+lib-path-fix.patch

-- 
ruby-right-http-connection.git



More information about the Pkg-ruby-extras-commits mailing list