Permalink
Browse files

Tweaked requires and such.

  • Loading branch information...
1 parent 5ba768e commit 80aa3595d504dccb175e35797db6bfada427ee93 @jnunemaker committed Dec 7, 2008
Showing with 9 additions and 14 deletions.
  1. +4 −6 lib/httparty.rb
  2. +2 −0 lib/httparty/request.rb
  3. +3 −8 spec/spec_helper.rb
View
10 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 @@ def self.delete(*args)
Basement.delete(*args)
end
end
+
+require 'httparty/request'
View
2 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
View
11 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)

0 comments on commit 80aa359

Please sign in to comment.