So it looks like I have to create the whole user model anyway. Blast.
I could use Facebook Connect or Twitter OAuth, but then users without a Facebook or Twitter account (they do exist- but mostly out of some *principal-based* logic) wouldn’t be able to grow moustaches for charity.
Posted: March 9th, 2010 | Author: jay | Filed under: Code | Tags: charit, facebook, facebook connect, moustaches, mustaches, oauth, openid, twitter | No Comments »
How do you test your helper methods in a Sinatra::Base app?
1
2
3
4
5
6
7
| module FundAStache
module Helpers
def logged_in?
false # you shall not pass...
end
end
end |
Include them in your tests…
1
2
3
4
| class FundastacheUserTest < Test::Unit::TestCase
include Rack::Test::Methods
include FundAStache::Helpers
... |
Posted: March 9th, 2010 | Author: jay | Filed under: Code | Tags: helper methods, helpers, ruby, sinatra, test, testing | No Comments »
Here’s a list of big-time OpenID providers that are discoverable. This means you don’t need an exact URL, which is cool…
- Google: https://www.google.com/accounts/o8/id
- Yahoo: http://yahoo.com
- MySpace: http://myspace.com
- myOpenID: hhttp://myopenid.com
Additionally, if you have Google Apps, you can craft an OpenID URL like this: https://www.google.com/accounts/o8/site-xrds?hd=example.com — Hmm, but it doesn’t seem to work… will update if I figure it out.
Posted: March 9th, 2010 | Author: jay | Filed under: Code | Tags: Code, openid, url | No Comments »