Created
May 13, 2010 21:31
-
-
Save faried/400489 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Rakefile b/Rakefile | |
index 07c45e7..7a6f08e 100644 | |
--- a/Rakefile | |
+++ b/Rakefile | |
@@ -2,8 +2,9 @@ require 'rubygems' | |
require 'rake' | |
require 'rake/testtask' | |
require 'rake/gempackagetask' | |
+require 'require_all' | |
-require File.dirname(__FILE__) + '/lib/twurl' | |
+require_rel '/lib/twurl' | |
library_root = File.dirname(__FILE__) | |
@@ -69,4 +70,4 @@ namespace :dist do | |
cd 'pkg' | |
system("gem unpack '#{spec.name}-#{spec.version}.gem' --target=$TWITTER/vendor/gems") | |
end | |
-end | |
\ No newline at end of file | |
+end | |
diff --git a/lib/twurl.rb b/lib/twurl.rb | |
index 354bebd..3cd526a 100644 | |
--- a/lib/twurl.rb | |
+++ b/lib/twurl.rb | |
@@ -4,11 +4,9 @@ require 'optparse' | |
require 'ostruct' | |
require 'stringio' | |
require 'yaml' | |
+require 'require_all' | |
-library_files = Dir[File.join(File.dirname(__FILE__), "/twurl/**/*.rb")] | |
-library_files.each do |file| | |
- require file | |
-end | |
+require_rel 'twurl/**/*.rb' | |
module Twurl | |
@options ||= Options.new | |
diff --git a/test/rcfile_test.rb b/test/rcfile_test.rb | |
index 5f76fcb..8ec65bf 100644 | |
--- a/test/rcfile_test.rb | |
+++ b/test/rcfile_test.rb | |
@@ -138,4 +138,4 @@ class Twurl::RCFile::SavingTest < Test::Unit::TestCase | |
rescue Errno::ENOENT | |
# Do nothing | |
end | |
-end | |
\ No newline at end of file | |
+end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment