Permalink
Browse files

http_parser.rb defines the module as HTTP so match them

  • Loading branch information...
1 parent f5d158b commit 1541306880e02b42fc0954250973910f29f59f67 @tarcieri tarcieri committed Oct 12, 2012
View
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
gem.name = "http"
gem.require_paths = ["lib"]
- gem.version = Http::VERSION
+ gem.version = HTTP::VERSION
gem.add_runtime_dependency 'http_parser.rb'
gem.add_runtime_dependency 'certified'
View
@@ -14,7 +14,7 @@
require 'http/uri_backport' if RUBY_VERSION < "1.9.0"
# HTTP should be easy
-module Http
+module HTTP
extend Chainable
# The method given was not understood
@@ -39,3 +39,5 @@ def canonicalize_header(header)
end
end
end
+
+Http = HTTP unless defined?(Http)
View
@@ -1,4 +1,4 @@
-module Http
+module HTTP
module Chainable
# Request a get sans response body
def head(uri, options = {})
View
@@ -1,6 +1,6 @@
require 'uri'
-module Http
+module HTTP
# Clients make requests and receive responses
class Client
include Chainable
View
@@ -1,4 +1,4 @@
-module Http
+module HTTP
# Yes, Http bundles its own MIME type library. Maybe it should be spun off
# as a separate gem or something.
class MimeType
@@ -16,4 +16,4 @@
else
obj
end
-end
+end
View
@@ -1,7 +1,7 @@
require 'socket'
require 'openssl'
-module Http
+module HTTP
class Options
# How to format the response [:object, :body, :parse_body]
View
@@ -1,4 +1,4 @@
-module Http
+module HTTP
class Request
# Method is given as a lowercase symbol e.g. :get, :post
attr_reader :method
@@ -1,4 +1,4 @@
-module Http
+module HTTP
class RequestStream
def initialize(socket, body, headers, headerstart)
@body = body
View
@@ -1,4 +1,4 @@
-module Http
+module HTTP
class Response
STATUS_CODES = {
100 => 'Continue',
@@ -1,4 +1,4 @@
-module Http
+module HTTP
class Response
class Parser
attr_reader :headers
View
@@ -1,3 +1,3 @@
-module Http
+module HTTP
VERSION = "0.4.0"
end
@@ -18,4 +18,4 @@
opts2 = opts.with_proxy(:proxy_address => "127.0.0.1", :proxy_port => 8080, :proxy_username => "username", :proxy_password => "password")
opts2.proxy.should eq(:proxy_address => "127.0.0.1", :proxy_port => 8080, :proxy_username => "username", :proxy_password => "password")
end
-end
+end
View
@@ -1,3 +1,3 @@
require 'http'
require 'support/example_server'
-require 'support/proxy_server'
+require 'support/proxy_server'

0 comments on commit 1541306

Please sign in to comment.