Skip to content

Instantly share code, notes, and snippets.

View ngw's full-sized avatar

Nicholas Wieland ngw

View GitHub Profile
/Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.1/lib/rails.rb:44:in `configuration': undefined method `config' for nil:NilClass (NoMethodError)
from /Users/ngw/stylej.am/lib/warden/strategies.rb:1
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:591:in `new_constants_in'
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:225:in `load_dependency'
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/warden-1.
Rails.configuration.middleware.use Warden::Manager do |manager|
manager.failure_app = SessionsController
manager.serialize_into_session do |user|
user.id.to_s
end
manager.serialize_from_session do |id|
User.first( :conditions => { :id => id } )
Rails.configuration.middleware.use RailsWarden::Manager do |config|
config.failure_app = SessionsController
config.default_strategies :facebook
end
Warden::Manager.serialize_into_session do |user|
user.id.to_s
end
Warden::Manager.serialize_from_session do |id|
Feature: User logs in using Facebook
As a visitor
I want to login using Facebook
So that I can use the service
Scenario: new user
Given I'm a new user
When I log in using Facebook
Then I should confirm my data
Given /^I'm a new user$/ do
# Nothing to do here
end
Given /^I am an existing user$/ do
@user = User.create( :email => 'test@example.com', :subdomain => 'example', :fb_access_token => 'abcde12345' )
end
When /^I log in using Facebook$/ do
/Users/ngw/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-0.9.4/lib/cucumber/ast/table.rb:384: warning: shadowing outer local variable - hash
/Users/ngw/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-0.9.4/lib/cucumber/cli/main.rb:8: warning: loading in progress, circular require considered harmful - /Users/ngw/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-0.9.4/lib/cucumber.rb
from /Users/ngw/.rvm/gems/ruby-1.9.2-p0/bin/autotest:19:in `<main>'
from /Users/ngw/.rvm/gems/ruby-1.9.2-p0/bin/autotest:19:in `load'
from /Users/ngw/.rvm/gems/ruby-1.9.2-p0/gems/ZenTest-4.4.1/bin/autotest:7:in `<top (required)>'
from /Users/ngw/.rvm/gems/ruby-1.9.2-p0/gems/ZenTest-4.4.1/lib/autotest.rb:152:in `runner'
from /Users/ngw/.rvm/gems/ruby-1.9.2-p0/gems/ZenTest-4.4.1/lib/autotest.rb:152:in `require'
from /Users/ngw/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-0.9.4/lib/autotest/cucumber.rb:2:in `<top (required)>'
from /Users/ngw/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-0.9.4/lib/autotest/cucumber.rb:2:in `require'
from /Users/ngw/.rvm/gems/ruby-1.9.2-p0
source :rubygems
source :rubyforge
source :gemcutter
gem 'rails'
gem 'unicorn'
gem 'mongoid', :git => 'git://github.com/mongoid/mongoid'
gem 'bson_ext'
gem 'koala'
gem 'warden'
class User
include Mongoid::Document
include Mongoid::Timestamps
attr_protected :_id
field :username, :type => String
field :permalink, :type => String
field :email, :type => String
class Question
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Slug
attr_protected :_id
field :text, :type => String
field :detail, :type => String
class User
include Mongoid::Document
field :name, :type => String
field :email, :type => String
attr_accessible :email, :name, :remember_me, :google_atoken, :google_stoken
references_many :questions