Class: Bently::Omniauth

Inherits:
RailsRecipe show all
Defined in:
lib/bently/recipe/omniauth.rb

Constant Summary

Constants inherited from RubyRecipe

RubyRecipe::GEMFILE

Instance Method Summary collapse

Methods inherited from RailsRecipe

#generate, #migrate

Methods inherited from RubyRecipe

#bundle, #gem, #gem_group

Methods inherited from Recipe

#append, breakdown, category, #code, #create, description, homepage, #insert, #modify, #operate, #operations, #prepend, #remove, #requirement, #run, #say, title, #todo, #usage, version, #warn

Constructor Details

#initializeOmniauth

Returns a new instance of Omniauth.



7
8
9
10
11
12
13
14
# File 'lib/bently/recipe/omniauth.rb', line 7

def initialize
  gem 'omniauth'
  bundle
  create './config/initializers/omniauth.rb', template('omniauth.rb')
  insert 'config/routes.rb', "  match '/auth/:provider/callback', to: 'sessions#create'\n", :after => "Application.routes.draw do\n"
  create './app/controllers/sessions_controller.rb', template('sessions_controller.rb')
  todo 'implement User#find_or_create_from_auth_hash'
end