Class: Boring::Oauth::Github::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
BaseGenerator
Defined in:
lib/generators/boring/oauth/github/install/install_generator.rb

Defined Under Namespace

Classes: MissingDeviseConfigurationError

Instance Method Summary collapse

Methods included from BaseGenerator

#add_omniauth_callback_controller, #add_omniauth_callback_routes, #add_provider_and_uuid_user_details, #configure_and_add_devise_setting_in_user_model, #configure_devise_omniauth, #show_readme

Instance Method Details

#add_github_omniauth_gemObject



17
18
19
20
21
22
# File 'lib/generators/boring/oauth/github/install/install_generator.rb', line 17

def add_github_omniauth_gem
  say "Adding GitHub OmniAuth gem", :green
  Bundler.with_unbundled_env do
    run "bundle add omniauth-github"
  end
end

#invoke_common_generator_methodsObject



24
25
26
27
28
29
30
31
32
# File 'lib/generators/boring/oauth/github/install/install_generator.rb', line 24

def invoke_common_generator_methods
  @oauth_name = :github
  add_provider_and_uuid_user_details
  configure_devise_omniauth
  add_omniauth_callback_routes
  add_omniauth_callback_controller
  configure_and_add_devise_setting_in_user_model
  show_readme
end