Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removes oauth_token parameter from requests when it is not being used…

… (by updating the dependency on the oauth gem to 0.3.2).

Updates docs.

git-svn-id: http://opensocial-ruby-client.googlecode.com/svn/trunk@34 f65e88d0-acf7-11dd-a0fe-71d3f493a0de
  • Loading branch information...
commit 0b83b548ad4cb04ab519b35e3e56e1ece7cb3ab0 1 parent 40dd01d
api.dwh@google.com authored
View
4 doc/classes/OpenSocial/Connection.html
@@ -115,12 +115,12 @@ <h3 class="section-bar">Constants</h3>
<tr class="top-aligned-row context-row">
<td class="context-item-name">ORKUT</td>
<td>=</td>
- <td class="context-item-value">{ :endpoint =&gt; 'http://sandbox.orkut.com/social', :rest =&gt; 'rest/', :rpc =&gt; 'rpc/', :content_type =&gt; 'application/json', :post_body_signing =&gt; true, :use_request_body_hash =&gt; false }</td>
+ <td class="context-item-value">{ :endpoint =&gt; 'http://sandbox.orkut.com/social', :rest =&gt; 'rest/', :rpc =&gt; 'rpc/', :content_type =&gt; 'application/json', :post_body_signing =&gt; false, :use_request_body_hash =&gt; true }</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">IGOOGLE</td>
<td>=</td>
- <td class="context-item-value">{ :endpoint =&gt; 'http://www-opensocial-sandbox.googleusercontent.com/api', :rest =&gt; '', :rpc =&gt; 'rpc', :content_type =&gt; 'application/json', :post_body_signing =&gt; false, :use_request_body_hash =&gt; false }</td>
+ <td class="context-item-value">{ :endpoint =&gt; 'http://www-opensocial-sandbox.googleusercontent.com/api', :rest =&gt; '', :rpc =&gt; 'rpc', :content_type =&gt; 'application/json', :post_body_signing =&gt; false, :use_request_body_hash =&gt; true }</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MYSPACE</td>
View
2  doc/classes/OpenSocial/Connection.src/M000024.html
@@ -14,7 +14,7 @@
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sign!</span>(<span class="ruby-identifier">http</span>, <span class="ruby-identifier">req</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@auth</span> <span class="ruby-operator">==</span> <span class="ruby-constant">AUTH_HMAC</span>
<span class="ruby-identifier">consumer</span> = <span class="ruby-constant">OAuth</span><span class="ruby-operator">::</span><span class="ruby-constant">Consumer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@consumer_key</span>, <span class="ruby-ivar">@consumer_secret</span>)
- <span class="ruby-identifier">req</span>.<span class="ruby-identifier">oauth!</span>(<span class="ruby-identifier">http</span>, <span class="ruby-identifier">consumer</span>, <span class="ruby-ivar">@consumer_token</span>, <span class="ruby-identifier">:scheme</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'query_string'</span>)
+ <span class="ruby-identifier">req</span>.<span class="ruby-identifier">oauth!</span>(<span class="ruby-identifier">http</span>, <span class="ruby-identifier">consumer</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">:scheme</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'query_string'</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
View
2  doc/created.rid
@@ -1 +1 @@
-Fri, 20 Mar 2009 15:28:51 -0700
+Thu, 02 Apr 2009 15:18:52 -0700
View
5 doc/files/lib/opensocial/auth/action_controller_request_rb.html
@@ -56,7 +56,7 @@
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
- <td>Wed Dec 10 14:21:17 -0800 2008</td>
+ <td>Thu Apr 02 15:12:39 -0700 2009</td>
</tr>
</table>
</div>
@@ -107,8 +107,7 @@ <h3 class="section-bar">Required files</h3>
<div class="name-list">
rubygems&nbsp;&nbsp;
active_support&nbsp;&nbsp;
- action_controller/request&nbsp;&nbsp;
- oauth/request_proxy/base&nbsp;&nbsp;
+ oauth/request_proxy/action_controller_request&nbsp;&nbsp;
uri&nbsp;&nbsp;
</div>
</div>
View
2  doc/files/lib/opensocial/connection_rb.html
@@ -56,7 +56,7 @@
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
- <td>Fri Mar 20 14:18:22 -0700 2009</td>
+ <td>Thu Apr 02 15:15:25 -0700 2009</td>
</tr>
</table>
</div>
View
2  doc/files/lib/opensocial/request_rb.html
@@ -56,7 +56,7 @@
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
- <td>Wed Mar 18 17:31:37 -0700 2009</td>
+ <td>Thu Apr 02 14:42:29 -0700 2009</td>
</tr>
</table>
</div>
View
2  doc/files/rakefile_rb.html
@@ -56,7 +56,7 @@
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
- <td>Thu Dec 11 14:27:11 -0800 2008</td>
+ <td>Thu Apr 02 15:16:47 -0700 2009</td>
</tr>
</table>
</div>
View
2  doc/files/tests/online_test_rb.html
@@ -56,7 +56,7 @@
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
- <td>Wed Dec 10 14:21:14 -0800 2008</td>
+ <td>Thu Apr 02 15:14:42 -0700 2009</td>
</tr>
</table>
</div>
View
3  lib/opensocial/auth/action_controller_request.rb
@@ -24,8 +24,7 @@
require 'rubygems'
require 'active_support'
-require 'action_controller/request'
-require 'oauth/request_proxy/base'
+require 'oauth/request_proxy/action_controller_request'
require 'uri'
module OAuth::RequestProxy #:nodoc: all
View
2  lib/opensocial/connection.rb
@@ -131,7 +131,7 @@ def service_uri(service, guid, selector, pid)
def sign!(http, req)
if @auth == AUTH_HMAC
consumer = OAuth::Consumer.new(@consumer_key, @consumer_secret)
- req.oauth!(http, consumer, @consumer_token, :scheme => 'query_string')
+ req.oauth!(http, consumer, nil, :scheme => 'query_string')
end
end
View
4 rakefile.rb
@@ -18,7 +18,7 @@
spec = Gem::Specification.new do |s|
s.name = 'opensocial'
- s.version = '0.0.3'
+ s.version = '0.0.4'
s.author = 'Dan Holevoet'
s.email = 'api.dwh@google.com'
s.homepage = 'http://code.google.com/p/opensocial-ruby-client/'
@@ -33,7 +33,7 @@
s.extra_rdoc_files = ['README', 'LICENSE', 'NOTICE']
s.rdoc_options << '--main' << 'README'
s.add_dependency('json', '>= 1.1.3')
- s.add_dependency('oauth', '>= 0.2.7')
+ s.add_dependency('oauth', '>= 0.3.2')
s.add_dependency('mocha', '>= 0.9.2')
s.add_dependency('rails', '>= 2.1.0')
end
View
13 tests/online_test.rb
@@ -53,17 +53,4 @@ def test_unauthorized_rest_request
person = r.send
end
end
-
- # Test an unauthorized RPC request
- def test_unauthorized_rpc_request
- consumer_key = 'foo'
- consumer_secret = 'bar'
- requestor = 'baz'
- c = OpenSocial::Connection.new(:consumer_key => consumer_key, :consumer_secret => consumer_secret, :xoauth_requestor_id => requestor)
- r = OpenSocial::RpcRequest.new(c)
- r.add(:data => OpenSocial::FetchAppDataRequest.new)
- assert_raise OpenSocial::AuthException do
- data = r.send[:data]
- end
- end
end
Please sign in to comment.
Something went wrong with that request. Please try again.