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:
parent
4ce70fc6ba
commit
a51ce5714e
6 changed files with 19 additions and 16 deletions
1
Gemfile
1
Gemfile
|
@ -1,2 +1,3 @@
|
|||
source :rubygems
|
||||
gemspec
|
||||
gem 'mongrel', '1.2.0.pre2'
|
||||
|
|
23
Gemfile.lock
23
Gemfile.lock
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
httparty (0.6.1)
|
||||
httparty (0.7.0)
|
||||
crack (= 0.1.8)
|
||||
|
||||
GEM
|
||||
|
@ -9,7 +9,6 @@ GEM
|
|||
specs:
|
||||
activesupport (2.3.10)
|
||||
builder (2.1.2)
|
||||
cgi_multipart_eof_fix (2.5.0)
|
||||
crack (0.1.8)
|
||||
cucumber (0.9.2)
|
||||
builder (~> 2.1.2)
|
||||
|
@ -17,20 +16,23 @@ GEM
|
|||
gherkin (~> 2.2.5)
|
||||
json (~> 1.4.6)
|
||||
term-ansicolor (~> 1.0.5)
|
||||
daemons (1.1.0)
|
||||
daemons (1.0.10)
|
||||
diff-lcs (1.1.2)
|
||||
fakeweb (1.3.0)
|
||||
fastthread (1.0.7)
|
||||
gem_plugin (0.2.3)
|
||||
gherkin (2.2.9)
|
||||
json (~> 1.4.6)
|
||||
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)
|
||||
mongrel (1.1.5)
|
||||
cgi_multipart_eof_fix (>= 2.4)
|
||||
daemons (>= 1.0.3)
|
||||
fastthread (>= 1.0.1)
|
||||
gem_plugin (>= 0.2.3)
|
||||
mongrel (1.2.0.pre2)
|
||||
daemons (~> 1.0.10)
|
||||
gem_plugin (~> 0.2.3)
|
||||
rake (0.8.7)
|
||||
rspec (1.3.1)
|
||||
term-ansicolor (1.0.5)
|
||||
|
||||
|
@ -43,5 +45,6 @@ DEPENDENCIES
|
|||
cucumber (~> 0.7)
|
||||
fakeweb (~> 1.2)
|
||||
httparty!
|
||||
mongrel (~> 1.1)
|
||||
jeweler (~> 1.5)
|
||||
mongrel (= 1.2.0.pre2)
|
||||
rspec (~> 1.3)
|
||||
|
|
3
Rakefile
3
Rakefile
|
@ -10,14 +10,13 @@ begin
|
|||
gem.email = "nunemaker@gmail.com"
|
||||
gem.homepage = "http://httparty.rubyforge.org"
|
||||
gem.authors = ["John Nunemaker", "Sandro Turriate"]
|
||||
gem.version = HTTParty::VERSION
|
||||
gem.version = HTTParty::VERSION.dup
|
||||
|
||||
gem.add_dependency 'crack', HTTParty::CRACK_DEPENDENCY
|
||||
|
||||
gem.add_development_dependency "activesupport", "~>2.3"
|
||||
gem.add_development_dependency "cucumber", "~>0.7"
|
||||
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 "jeweler", "~>1.5"
|
||||
gem.post_install_message = "When you HTTParty, you must party hard!"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'mongrel'
|
||||
require 'active_support'
|
||||
require 'lib/httparty'
|
||||
require './lib/httparty'
|
||||
require 'spec/expectations'
|
||||
|
||||
Before do
|
||||
|
|
|
@ -12,7 +12,7 @@ module HTTParty
|
|||
SupportedURISchemes = [URI::HTTP, URI::HTTPS]
|
||||
|
||||
NON_RAILS_QUERY_STRING_NORMALIZER = Proc.new do |query|
|
||||
query.map do |key, value|
|
||||
Array(query).map do |key, value|
|
||||
if value.nil?
|
||||
key
|
||||
elsif value.is_a?(Array)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module HTTParty
|
||||
class Response < HTTParty::BasicObject #:nodoc:
|
||||
class Headers
|
||||
include Net::HTTPHeader
|
||||
include ::Net::HTTPHeader
|
||||
|
||||
def initialize(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}>)
|
||||
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|
|
||||
name = klass.name.sub("Net::HTTP", '')
|
||||
|
|
Loading…
Reference in a new issue