1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Ruby 1.9.2 fixes

Closes gh-65
Closes gh-63
This commit is contained in:
Sandro Turriate 2011-01-19 16:00:38 -05:00
parent 4ce70fc6ba
commit a51ce5714e
6 changed files with 19 additions and 16 deletions

View file

@ -1,2 +1,3 @@
source :rubygems source :rubygems
gemspec gemspec
gem 'mongrel', '1.2.0.pre2'

View file

@ -1,7 +1,7 @@
PATH PATH
remote: . remote: .
specs: specs:
httparty (0.6.1) httparty (0.7.0)
crack (= 0.1.8) crack (= 0.1.8)
GEM GEM
@ -9,7 +9,6 @@ GEM
specs: specs:
activesupport (2.3.10) activesupport (2.3.10)
builder (2.1.2) builder (2.1.2)
cgi_multipart_eof_fix (2.5.0)
crack (0.1.8) crack (0.1.8)
cucumber (0.9.2) cucumber (0.9.2)
builder (~> 2.1.2) builder (~> 2.1.2)
@ -17,20 +16,23 @@ GEM
gherkin (~> 2.2.5) gherkin (~> 2.2.5)
json (~> 1.4.6) json (~> 1.4.6)
term-ansicolor (~> 1.0.5) term-ansicolor (~> 1.0.5)
daemons (1.1.0) daemons (1.0.10)
diff-lcs (1.1.2) diff-lcs (1.1.2)
fakeweb (1.3.0) fakeweb (1.3.0)
fastthread (1.0.7)
gem_plugin (0.2.3) gem_plugin (0.2.3)
gherkin (2.2.9) gherkin (2.2.9)
json (~> 1.4.6) json (~> 1.4.6)
term-ansicolor (~> 1.0.5) term-ansicolor (~> 1.0.5)
git (1.2.5)
jeweler (1.5.2)
bundler (~> 1.0.0)
git (>= 1.2.5)
rake
json (1.4.6) json (1.4.6)
mongrel (1.1.5) mongrel (1.2.0.pre2)
cgi_multipart_eof_fix (>= 2.4) daemons (~> 1.0.10)
daemons (>= 1.0.3) gem_plugin (~> 0.2.3)
fastthread (>= 1.0.1) rake (0.8.7)
gem_plugin (>= 0.2.3)
rspec (1.3.1) rspec (1.3.1)
term-ansicolor (1.0.5) term-ansicolor (1.0.5)
@ -43,5 +45,6 @@ DEPENDENCIES
cucumber (~> 0.7) cucumber (~> 0.7)
fakeweb (~> 1.2) fakeweb (~> 1.2)
httparty! httparty!
mongrel (~> 1.1) jeweler (~> 1.5)
mongrel (= 1.2.0.pre2)
rspec (~> 1.3) rspec (~> 1.3)

View file

@ -10,14 +10,13 @@ begin
gem.email = "nunemaker@gmail.com" gem.email = "nunemaker@gmail.com"
gem.homepage = "http://httparty.rubyforge.org" gem.homepage = "http://httparty.rubyforge.org"
gem.authors = ["John Nunemaker", "Sandro Turriate"] gem.authors = ["John Nunemaker", "Sandro Turriate"]
gem.version = HTTParty::VERSION gem.version = HTTParty::VERSION.dup
gem.add_dependency 'crack', HTTParty::CRACK_DEPENDENCY gem.add_dependency 'crack', HTTParty::CRACK_DEPENDENCY
gem.add_development_dependency "activesupport", "~>2.3" gem.add_development_dependency "activesupport", "~>2.3"
gem.add_development_dependency "cucumber", "~>0.7" gem.add_development_dependency "cucumber", "~>0.7"
gem.add_development_dependency "fakeweb", "~>1.2" gem.add_development_dependency "fakeweb", "~>1.2"
gem.add_development_dependency "mongrel", "~>1.1"
gem.add_development_dependency "rspec", "~>1.3" gem.add_development_dependency "rspec", "~>1.3"
gem.add_development_dependency "jeweler", "~>1.5" gem.add_development_dependency "jeweler", "~>1.5"
gem.post_install_message = "When you HTTParty, you must party hard!" gem.post_install_message = "When you HTTParty, you must party hard!"

View file

@ -1,6 +1,6 @@
require 'mongrel' require 'mongrel'
require 'active_support' require 'active_support'
require 'lib/httparty' require './lib/httparty'
require 'spec/expectations' require 'spec/expectations'
Before do Before do

View file

@ -12,7 +12,7 @@ module HTTParty
SupportedURISchemes = [URI::HTTP, URI::HTTPS] SupportedURISchemes = [URI::HTTP, URI::HTTPS]
NON_RAILS_QUERY_STRING_NORMALIZER = Proc.new do |query| NON_RAILS_QUERY_STRING_NORMALIZER = Proc.new do |query|
query.map do |key, value| Array(query).map do |key, value|
if value.nil? if value.nil?
key key
elsif value.is_a?(Array) elsif value.is_a?(Array)

View file

@ -1,7 +1,7 @@
module HTTParty module HTTParty
class Response < HTTParty::BasicObject #:nodoc: class Response < HTTParty::BasicObject #:nodoc:
class Headers class Headers
include Net::HTTPHeader include ::Net::HTTPHeader
def initialize(header) def initialize(header)
@header = header @header = header
@ -56,7 +56,7 @@ module HTTParty
%(#<#{self.class}:0x#{inspect_id} @parsed_response=#{parsed_response.inspect}, @response=#{response.inspect}, @headers=#{headers.inspect}>) %(#<#{self.class}:0x#{inspect_id} @parsed_response=#{parsed_response.inspect}, @response=#{response.inspect}, @headers=#{headers.inspect}>)
end end
CODES_TO_OBJ = Net::HTTPResponse::CODE_CLASS_TO_OBJ.merge Net::HTTPResponse::CODE_TO_OBJ CODES_TO_OBJ = ::Net::HTTPResponse::CODE_CLASS_TO_OBJ.merge ::Net::HTTPResponse::CODE_TO_OBJ
CODES_TO_OBJ.each do |response_code, klass| CODES_TO_OBJ.each do |response_code, klass|
name = klass.name.sub("Net::HTTP", '') name = klass.name.sub("Net::HTTP", '')