Does anyone already used this plugin ? I am testing it and I get an
error in testing the normalize_test.rb
action : broken_open_id
def test_broken_open_id
assert_raises(InvalidOpenId) { normalize_url("=name") }
end
the failure error is :
- Failure:
test_broken_open_id(NormalizeTest)
[vendor/plugins/open_id_authentication/test/normalize_test.rb:33]:
OpenIdAuthentication::InvalidOpenId exception expected but was
Class:
Message: <“uninitialized constant OpenIdAuthentication::URI”>
looking in the open_id_authentification.rb, I cannot see where the
constant is used ???
def normalize_url(url)
OpenIdAuthentication.normalize_url(url)
end
def self.normalize_url(url)
begin
uri = URI.parse(url)
uri = URI.parse(“http://#{uri}”) unless uri.scheme
uri.scheme = uri.scheme.downcase # URI should do this
uri.normalize.to_s
rescue URI::InvalidURIError
raise InvalidOpenId.new("#{url} is not an OpenID URL")
end
end