Sha256: cbd18b51e53674224c9f69892848b62d0a9e62dbb6e1a980a6d15bcc9ae97cce

Contents?: true

Size: 1.31 KB

Versions: 46

Compression:

Stored size: 1.31 KB

Contents

# Application template recipe for the rails_apps_composer. Change the recipe here:
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/devise.rb

stage_two do
  say_wizard "recipe stage two"
  if prefer :authentication, 'devise'
    # prevent logging of password_confirmation
    gsub_file 'config/initializers/filter_parameter_logging.rb', /:password/, ':password, :password_confirmation'
    generate 'devise:install'
    generate 'devise_invitable:install' if prefer :devise_modules, 'invitable'
    generate 'devise user' # create the User model
    unless :apps4.to_s.include? 'rails-stripe-'
      generate 'migration AddNameToUsers name:string'
    end
    if (prefer :devise_modules, 'confirmable') || (prefer :devise_modules, 'invitable')
      gsub_file 'app/models/user.rb', /:registerable,/, ":registerable, :confirmable,"
      generate 'migration AddConfirmableToUsers confirmation_token:string confirmed_at:datetime confirmation_sent_at:datetime unconfirmed_email:string'
    end
    run 'bundle exec rake db:migrate'
  end
  ### GIT ###
  git :add => '-A' if prefer :git, true
  git :commit => '-qm "rails_apps_composer: devise"' if prefer :git, true
end

__END__

name: devise
description: "Add Devise for authentication"
author: RailsApps

requires: [setup, gems]
run_after: [setup, gems]
category: mvc

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
rails_apps_composer-3.1.36 recipes/devise.rb
rails_apps_composer-3.1.35 recipes/devise.rb
rails_apps_composer-3.1.34 recipes/devise.rb
rails_apps_composer-3.1.33 recipes/devise.rb
rails_apps_composer-3.1.31 recipes/devise.rb
rails_apps_composer-3.1.30 recipes/devise.rb
rails_apps_composer-3.1.29 recipes/devise.rb
rails_apps_composer-3.1.28 recipes/devise.rb
rails_apps_composer-3.1.27 recipes/devise.rb
rails_apps_composer-3.1.25 recipes/devise.rb
rails_apps_composer-3.1.24 recipes/devise.rb
rails_apps_composer-3.1.23 recipes/devise.rb
rails_apps_composer-3.1.22 recipes/devise.rb
rails_apps_composer-3.1.21 recipes/devise.rb
rails_apps_composer-3.1.20 recipes/devise.rb
rails_apps_composer-3.1.19 recipes/devise.rb
rails_apps_composer-3.1.18 recipes/devise.rb
rails_apps_composer-3.1.17 recipes/devise.rb
rails_apps_composer-3.1.16 recipes/devise.rb
rails_apps_composer-3.1.15 recipes/devise.rb