Permalink
Browse files

Respect the global load path

  • Loading branch information...
1 parent a2b0b51 commit 6a629a6a06e115388cce6f1de04f45a4b0707cac @sferik committed Mar 20, 2011
View
@@ -1,9 +1,9 @@
-require File.expand_path('../twitter/error', __FILE__)
-require File.expand_path('../twitter/configuration', __FILE__)
-require File.expand_path('../twitter/api', __FILE__)
-require File.expand_path('../twitter/client', __FILE__)
-require File.expand_path('../twitter/search', __FILE__)
-require File.expand_path('../twitter/base', __FILE__)
+require 'twitter/error'
+require 'twitter/configuration'
+require 'twitter/api'
+require 'twitter/client'
+require 'twitter/search'
+require 'twitter/base'
module Twitter
extend Configuration
View
@@ -1,6 +1,6 @@
-require File.expand_path('../connection', __FILE__)
-require File.expand_path('../request', __FILE__)
-require File.expand_path('../authentication', __FILE__)
+require 'twitter/connection'
+require 'twitter/request'
+require 'twitter/authentication'
module Twitter
# @private
View
@@ -7,7 +7,26 @@ class Client < API
# Require client method modules after initializing the Client class in
# order to avoid a superclass mismatch error, allowing those modules to be
# Client-namespaced.
- Dir[File.expand_path('../client/*.rb', __FILE__)].each{|f| require f}
+ require 'twitter/client/utils'
+ require 'twitter/client/account'
+ require 'twitter/client/block'
+ require 'twitter/client/direct_messages'
+ require 'twitter/client/favorites'
+ require 'twitter/client/friendship'
+ require 'twitter/client/friends_and_followers'
+ require 'twitter/client/geo'
+ require 'twitter/client/legal'
+ require 'twitter/client/list'
+ require 'twitter/client/list_members'
+ require 'twitter/client/list_subscribers'
+ require 'twitter/client/local_trends'
+ require 'twitter/client/notification'
+ require 'twitter/client/spam_reporting'
+ require 'twitter/client/saved_searches'
+ require 'twitter/client/timeline'
+ require 'twitter/client/trends'
+ require 'twitter/client/tweets'
+ require 'twitter/client/user'
alias :api_endpoint :endpoint
@@ -1,5 +1,5 @@
require 'faraday'
-require File.expand_path('../version', __FILE__)
+require 'twitter/version'
module Twitter
# Defines constants and methods related to configuration
@@ -1,5 +1,8 @@
require 'faraday_middleware'
-Dir[File.expand_path('../../faraday/*.rb', __FILE__)].each{|f| require f}
+require 'faraday/multipart'
+require 'faraday/oauth'
+require 'faraday/raise_http_4xx'
+require 'faraday/raise_http_5xx'
module Twitter
# @private
@@ -1,4 +1,4 @@
-require File.expand_path('../../spec_helper', __FILE__)
+require 'helper'
describe Faraday::Response do
before do
@@ -4,9 +4,7 @@
add_group 'Faraday Middleware', 'lib/faraday'
add_group 'Specs', 'spec'
end
-
-require File.expand_path('../../lib/twitter', __FILE__)
-
+require 'twitter'
require 'rspec'
require 'webmock/rspec'
RSpec.configure do |config|
View
@@ -1,4 +1,4 @@
-require File.expand_path('../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::API do
before do
@@ -1,4 +1,4 @@
-require File.expand_path('../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Base do
context ".new" do
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
context ".new" do
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
context ".new" do
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
@@ -1,4 +1,4 @@
-require File.expand_path('../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Client do
it "should connect using the endpoint configuration" do
@@ -1,4 +1,4 @@
-require File.expand_path('../../spec_helper', __FILE__)
+require 'helper'
describe Twitter::Search do
View
@@ -1,4 +1,4 @@
-require File.expand_path('../spec_helper', __FILE__)
+require 'helper'
describe Twitter do
after do

1 comment on commit 6a629a6

Contributor

joshk commented on 6a629a6 Mar 20, 2011

Yay! I <3 Load Path

Please sign in to comment.