[DRE-commits] [ruby-right-http-connection] 02/04: move files in lib/base to lib/right_http_connection
Cédric Boutillier
boutil at alioth.debian.org
Fri Oct 4 15:09:41 UTC 2013
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-right-http-connection.
commit ff0dd63072e8962830793eae28b6c20e48d520b7
Author: Cédric Boutillier <boutil at debian.org>
Date: Fri Oct 4 16:48:19 2013 +0200
move files in lib/base to lib/right_http_connection
---
debian/patches/fix-paths.patch | 19 ++
debian/patches/lib-path-fix.patch | 667 -------------------------------------
debian/patches/series | 2 +-
debian/rules | 8 +
4 files changed, 28 insertions(+), 668 deletions(-)
diff --git a/debian/patches/fix-paths.patch b/debian/patches/fix-paths.patch
new file mode 100644
index 0000000..e5befcb
--- /dev/null
+++ b/debian/patches/fix-paths.patch
@@ -0,0 +1,19 @@
+Description: reflect the fact that lib/base is moving to lib/right_http
+
+--- a/lib/right_http_connection.rb
++++ b/lib/right_http_connection.rb
+@@ -26,10 +26,10 @@
+ require "time"
+ require "logger"
+
+-$:.unshift(File.dirname(__FILE__))
+-require 'base/version'
+-require 'base/support'
+-require 'base/net_fix'
++#$:.unshift(File.dirname(__FILE__))
++require 'right_http_connection/version'
++require 'right_http_connection/support'
++require 'right_http_connection/net_fix'
+
+ module Rightscale
+
diff --git a/debian/patches/lib-path-fix.patch b/debian/patches/lib-path-fix.patch
deleted file mode 100644
index 84f205a..0000000
--- a/debian/patches/lib-path-fix.patch
+++ /dev/null
@@ -1,667 +0,0 @@
-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
index 3a22f3f..15b9b3c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-lib-path-fix.patch
+fix-paths.patch
diff --git a/debian/rules b/debian/rules
index a5e7dc8..d9fdcb8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,3 +13,11 @@
%:
dh $@ --buildsystem=ruby --with ruby
+
+override_dh_auto_install:
+ cp -R lib/base lib/right_http_connection
+ dh_auto_install
+ rm -rf debian/ruby-right-http-connection/usr/lib/ruby/vendor_ruby/base
+
+override_dh_clean:
+ rm -rf lib/right_http_connection
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-right-http-connection.git
More information about the Pkg-ruby-extras-commits
mailing list