Skip to content

Commit

Permalink
Removing explicit references to 'gem' in order to not break compatibi…
Browse files Browse the repository at this point in the history
…lity with rip, dpkg, etc. (Gem versions are already managed in the gemspec.)
  • Loading branch information
sferik committed Mar 21, 2010
1 parent 8f68caf commit 0f7a9ee
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 36 deletions.
30 changes: 12 additions & 18 deletions lib/twitter.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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")
30 changes: 12 additions & 18 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 0f7a9ee

Please sign in to comment.