diff --git a/lib/twitter.rb b/lib/twitter.rb index 373afa81b..ed1483239 100644 --- a/lib/twitter.rb +++ b/lib/twitter.rb @@ -1,14 +1,8 @@ -require 'forwardable' -require 'rubygems' - -gem 'oauth', '~> 0.3.6' -require 'oauth' - -gem 'hashie', '~> 0.1.3' -require 'hashie' - -gem 'httparty', '>= 0.5.2' -require 'httparty' +require "forwardable" +require "rubygems" +require "oauth" +require "hashie" +require "httparty" module Twitter class TwitterError < StandardError @@ -29,7 +23,7 @@ class InformTwitter < StandardError; end class NotFound < StandardError; end def self.firehose - response = HTTParty.get('http://api.twitter.com/statuses/public_timeline.json', :format => :json) + response = HTTParty.get("http://api.twitter.com/statuses/public_timeline.json", :format => :json) response.map { |tweet| Hashie::Mash.new(tweet) } end @@ -84,9 +78,9 @@ def rubyify_keys! directory = File.expand_path(File.dirname(__FILE__)) -require File.join(directory, 'twitter', 'oauth') -require File.join(directory, 'twitter', 'httpauth') -require File.join(directory, 'twitter', 'request') -require File.join(directory, 'twitter', 'base') -require File.join(directory, 'twitter', 'search') -require File.join(directory, 'twitter', 'trends') +require File.join(directory, "twitter", "oauth") +require File.join(directory, "twitter", "httpauth") +require File.join(directory, "twitter", "request") +require File.join(directory, "twitter", "base") +require File.join(directory, "twitter", "search") +require File.join(directory, "twitter", "trends") diff --git a/test/test_helper.rb b/test/test_helper.rb index bf41f6b2b..572900f85 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,32 +1,26 @@ -require 'test/unit' -require 'pathname' -require 'rubygems' - -gem 'shoulda', '>= 2.10.1' -gem 'jnunemaker-matchy', '0.4.0' -gem 'mocha', '0.9.4' -gem 'fakeweb', '>= 1.2.5' - -require 'shoulda' -require 'matchy' -require 'mocha' -require 'fakeweb' +require "test/unit" +require "pathname" +require "rubygems" +require "shoulda" +require "matchy" +require "mocha" +require "fakeweb" FakeWeb.allow_net_connect = false -dir = (Pathname(__FILE__).dirname + '../lib').expand_path -require dir + 'twitter' +dir = (Pathname(__FILE__).dirname + "../lib").expand_path +require dir + "twitter" class Test::Unit::TestCase end def sample_image(filename) - File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename) + File.expand_path(File.dirname(__FILE__) + "/fixtures/" + filename) end def fixture_file(filename) - return '' if filename == '' - file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename) + return "" if filename == "" + file_path = File.expand_path(File.dirname(__FILE__) + "/fixtures/" + filename) File.read(file_path) end