This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'spec_helper' | |
| feature 'Reset password' do | |
| attr_accessor :current_email_address | |
| scenario 'Successful password reset' do | |
| user = create(:user) | |
| visit '/signin' | |
| click_link "Forgot your password?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rails.application.config.middleware.use OmniAuth::Builder do | |
| provider :facebook, 'APP_KEY', 'APP_SECRET' | |
| provider :twitter, 'APP_KEY', 'APP_SECRET' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ServicesController < ApplicationController | |
| def index | |
| @services = current_user.services.all | |
| end | |
| def create | |
| # get the service parameter from the Rails router | |
| params[:service] ? service_route = params[:service] : service_route = 'no service (invalid callback)' | |
| omniauth = request.env['omniauth.auth'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class RegistrationsController < Devise::RegistrationsController | |
| def new | |
| super | |
| end | |
| def create | |
| layout 'custom_devise' | |
| twitter_uid = params[:user][:twitter_uid] | |
| first_name = params[:user][:first_name] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ☺ rake routes | |
| new_user_session GET /users/sign_in(.:format) devise/sessions#new | |
| user_session POST /users/sign_in(.:format) devise/sessions#create | |
| destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy | |
| user_omniauth_callback /users/auth/:action/callback(.:format) devise/omniauth_callbacks#(?-mix:(?!)) | |
| user_password POST /users/password(.:format) devise/passwords#create | |
| new_user_password GET /users/password/new(.:format) devise/passwords#new | |
| edit_user_password GET /users/password/edit(.:format) devise/passwords#edit | |
| PUT /users/password(.:format) devise/passwords#update | |
| cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'spec_helper' | |
| feature 'Signing up' do | |
| before do | |
| OmniAuth.config.test_mode = true | |
| visit '/signup' | |
| end | |
| scenario 'Successful art lover sign up with email' do | |
| click_link "sign up with your email address." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'spec_helper' | |
| feature 'Add artwork' do | |
| before do | |
| @user = create(:user) | |
| login(@user) | |
| @image_path = Rails.root + "spec/fixtures/brooklyn.jpeg" | |
| @files = [ @image_path ] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Infinite scroll */ | |
| // Init all the necessary items for infinite scroll | |
| var loading = false, | |
| handler = $('.to-masonify'), | |
| scrolled = false, | |
| $scrolltop = $('#scrolltop'); | |
| $scrolltop.bind('click', function() { | |
| $(window).scrollTop(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| desc "An example rake task which puts to console" | |
| puts "Outside task" | |
| task :puts_to_console => :environment do | |
| puts "Inside task" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [2011-09-21 22:01:58 -0700, 2011-10-21 22:01:58 -0700, 2011-11-21 22:01:58 -0800, 2011-12-21 22:01:58 -0800, 2012-01-21 22:01:58 -0800, 2012-02-21 22:01:58 -0800, 2012-03-21 22:01:58 -0700] | |
| dates.sort! | |
| [2011-09-21 22:01:58 -0700, 2011-10-21 22:01:58 -0700, 2011-11-21 22:01:58 -0800, 2011-12-21 22:01:58 -0800, 2012-01-21 22:01:58 -0800, 2012-02-21 22:01:58 -0800, 2012-03-21 22:01:58 -0700] |