From 76cfe3749e56b2b486f2b5ffc9aa7f437cb2db29 Mon Sep 17 00:00:00 2001 From: laserlemon Date: Tue, 12 Oct 2010 12:11:43 +0800 Subject: [PATCH] Swapped the roauth dependency for simple_oauth. --- Gemfile.lock | 5 +++-- lib/twitter.rb | 2 +- lib/twitter/base.rb | 3 ++- lib/twitter/geo.rb | 3 ++- twitter.gemspec | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 96c3e0d3c..03198af60 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,7 +5,7 @@ PATH addressable (~> 2.2.1) faraday (~> 0.4.1) faraday_middleware (~> 0.1.1) - roauth (~> 0.0.3) + simple_oauth (~> 0.1.0) GEM remote: http://rubygems.org/ @@ -37,6 +37,7 @@ GEM rake (0.8.7) roauth (0.0.3) shoulda (2.11.3) + simple_oauth (0.1.0) test-unit (2.1.1) yard (0.6.1) @@ -53,8 +54,8 @@ DEPENDENCIES json_pure (~> 1.4) mocha (~> 0.9) rake (~> 0.8) - roauth (~> 0.0.3) shoulda (~> 2.11) + simple_oauth (~> 0.1.0) test-unit (~> 2.1) twitter! yard (~> 0.6) diff --git a/lib/twitter.rb b/lib/twitter.rb index 6dfbb2f4d..04cdb5e10 100644 --- a/lib/twitter.rb +++ b/lib/twitter.rb @@ -2,7 +2,7 @@ require 'faraday' require 'faraday_middleware' require 'forwardable' -require 'roauth' +require 'simple_oauth' require 'cgi' module Twitter diff --git a/lib/twitter/base.rb b/lib/twitter/base.rb index e1badae4d..dbc40b814 100644 --- a/lib/twitter/base.rb +++ b/lib/twitter/base.rb @@ -476,7 +476,8 @@ def oauth_header(path, options, method) :access_key => self.access_key, :access_secret => self.access_secret } - ROAuth.header(oauth_params, connection.build_url(path), options, method) + SimpleOAuth::Header.new(method, connection.build_url(path), options, oauth_params).to_s + #ROAuth.header(oauth_params, connection.build_url(path), options, method) end def perform_get(path, options={}) diff --git a/lib/twitter/geo.rb b/lib/twitter/geo.rb index 593cf1c26..88528ebe6 100644 --- a/lib/twitter/geo.rb +++ b/lib/twitter/geo.rb @@ -147,7 +147,8 @@ def oauth_header(path, options, method) :access_key => @access_key, :access_secret => @access_secret } - ROAuth.header(oauth_params, connection.build_url(path), options, method) + SimpleOAuth::Header.new(method, connection.build_url(path), options, oauth_params).to_s + #ROAuth.header(oauth_params, connection.build_url(path), options, method) end end diff --git a/twitter.gemspec b/twitter.gemspec index 0004d452f..a67db387b 100644 --- a/twitter.gemspec +++ b/twitter.gemspec @@ -14,7 +14,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency("addressable", "~> 2.2.1") s.add_runtime_dependency("faraday", "~> 0.4.1") s.add_runtime_dependency("faraday_middleware", "~> 0.1.1") - s.add_runtime_dependency("roauth", "~> 0.0.3") + s.add_runtime_dependency("simple_oauth", "~> 0.1.0") s.authors = ["John Nunemaker", "Wynn Netherland", "Erik Michaels-Ober"] s.description = %q{A Ruby wrapper for the Twitter REST and Search APIs.} s.email = ["nunemaker@gmail.com"]