issue 3
(Not getting errors for invalid TwitterToken) reported by sazwqa
- In testing I found that the validations defined in module Token are not
working for some reason.
Hence the code defined ConsumerController/callback is ineffective.
Status of @token is always valid, even though it has errors.
To re-produce the problem, do the following:
1. in module Token/create_from_request_token, change last create statement
from:
create
:user_id=>user.id,:token=>access_token.token,:secret=>access_token.secret
to
create :user_id=>user.id
here, we are omitting required parameters, hence we expect ConsumerToken
object will not be created and registration will fail.
2. Observe the behavior of ConsumerController/callback, will always pass.
In testing I found that the validations defined in module Token are not
working for some reason.
Hence the code defined ConsumerController/callback is ineffective.
Status of @token is always valid, even though it has errors.
To re-produce the problem, do the following:
1. in module Token/create_from_request_token, change last create statement
from:
create
:user_id=>user.id,:token=>access_token.token,:secret=>access_token.secret
to
create :user_id=>user.id
here, we are omitting required parameters, hence we expect ConsumerToken
object will not be created and registration will fail.
2. Observe the behavior of ConsumerController/callback, will always pass.
Apr 23, 2009
issue 2
(Automatic recognition and usage of Rails config.gem if avail...) reported by google-g...@nathanielbibler.com
- It'd be nice to include something similar to what the
open_id_authentication plugin's init.rb provides, which reads:
if config.respond_to?(:gems)
config.gem 'ruby-openid', :lib => 'openid', :version => '>=2.0.4'
else
begin
require 'openid'
rescue LoadError
begin
gem 'ruby-openid', '>=2.0.4'
rescue Gem::LoadError
puts "Install the ruby-openid gem to enable OpenID support"
end
end
end
That way a 'rake gems' will properly display the OAuth gem dependency if
the Rails version is up to date.
It'd be nice to include something similar to what the
open_id_authentication plugin's init.rb provides, which reads:
if config.respond_to?(:gems)
config.gem 'ruby-openid', :lib => 'openid', :version => '>=2.0.4'
else
begin
require 'openid'
rescue LoadError
begin
gem 'ruby-openid', '>=2.0.4'
rescue Gem::LoadError
puts "Install the ruby-openid gem to enable OpenID support"
end
end
end
That way a 'rake gems' will properly display the OAuth gem dependency if
the Rails version is up to date.