diff --git a/lib/httparty.rb b/lib/httparty.rb index b724824..8c2313c 100644 --- a/lib/httparty.rb +++ b/lib/httparty.rb @@ -1,14 +1,10 @@ +$:.unshift(File.dirname(__FILE__)) + require 'net/http' require 'net/https' -require 'uri' require 'rubygems' require 'active_support' - -dir = File.dirname(__FILE__) -$:.unshift(dir) unless $:.include?(dir) || $:.include?(File.expand_path(dir)) - require 'module_level_inheritable_attributes' -require 'httparty/request' module HTTParty class UnsupportedFormat < StandardError; end @@ -101,3 +97,5 @@ module HTTParty Basement.delete(*args) end end + +require 'httparty/request' \ No newline at end of file diff --git a/lib/httparty/request.rb b/lib/httparty/request.rb index 2b2c8aa..08ee3a5 100644 --- a/lib/httparty/request.rb +++ b/lib/httparty/request.rb @@ -1,3 +1,5 @@ +require 'uri' + module HTTParty class Request # Makes it so uri is sure to parse stuff like google.com without the http diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2985ee8..f435b41 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,11 +1,6 @@ -begin - require 'spec' -rescue LoadError - require 'rubygems' - gem 'rspec' - require 'spec' -end - +require 'rubygems' +gem 'rspec' +require 'spec' require File.join(File.dirname(__FILE__), '..', 'lib', 'httparty') def file_fixture(filename)