lib/generators/socials/install_generator.rb
# Add the files on the templates folder to the Rails App
Add the files on the templates folder to the Rails App
Add the files on the templates folder to the Rails App
def add_templates
        template "config/social_keys.yml", "config/social_keys.yml"
        template "config/social_keys.yml", "config/social_keys.example.yml"
        puts 'Update your social_keys.yml with your social credentials & add it to your IGNORE & just keep the .example versioned'.colorize(:light_yellow)
        template 'tasks/socials.rake', 'lib/tasks/socials.rake'
        puts 'Just created the socials rake tasks, check it on the GitHub README'.colorize(:light_blue)
        template 'tasks/recreate.rake', 'lib/tasks/recreate.rake'
        puts 'Now you can easy rebase (clean up) your DB using rake db:recreate'.colorize(:light_green)
        template "controllers/omniauth_callbacks_controller.rb", "app/controllers/omniauth_callbacks_controller.rb"
        puts 'Check out you your app/controllers/omniauth_callbacks_controller.rb which persist the social user through devise'.colorize(:light_green)
      end
def add_templates template "config/social_keys.yml" , "config/social_keys.yml" template "config/social_keys.yml" , "config/social_keys.example.yml" puts 'Update your social_keys.yml with your social credentials & add it to your IGNORE & just keep the .example versioned' . colorize ( :light_yellow ) template 'tasks/socials.rake' , 'lib/tasks/socials.rake' puts 'Just created the socials rake tasks, check it on the GitHub README' . colorize ( :light_blue ) template 'tasks/recreate.rake' , 'lib/tasks/recreate.rake' puts 'Now you can easy rebase (clean up) your DB using rake db:recreate' . colorize ( :light_green ) template "controllers/omniauth_callbacks_controller.rb" , "app/controllers/omniauth_callbacks_controller.rb" puts 'Check out you your app/controllers/omniauth_callbacks_controller.rb which persist the social user through devise' . colorize ( :light_green ) end
Add the files on the templates folder to the Rails App
Add the files on the templates folder to the Rails App
# Add the config YML (social_credentials) # Add the OAuth Controller