Sha256: bcb935db75ebec3a25d1b3c3564948c876fcb88de4dfa95a3db64e5e63129c75

Contents?: true

Size: 786 Bytes

Versions: 9

Compression:

Stored size: 786 Bytes

Contents

require 'rails'

module Alchemy
  module Generators
    class DeviseGenerator < ::Rails::Generators::Base
      desc "This generator copies the Alchemy Devise configuration into your app."
      source_root File.expand_path('../../../../../config/initializers', File.dirname(__FILE__))

      def copy_devise_config
        copy_file "devise.rb", "#{Rails.root}/config/initializers/devise.rb"
        msg = <<-MSG
If your are upgrading from Alchemy < 2.5.0:

1. Add `gem 'devise-encryptable'` into your Gemfile
2. Run `bundle install`
3. Alter the encryptor and the stretches value in your devise config:

  # config/initializers/devise.rb
  ...
    config.stretches = Rails.env.test? ? 1 : 20
    config.encryptor = :authlogic_sha512

MSG
        puts msg
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
alchemy_cms-2.8.3 lib/rails/generators/alchemy/devise/devise_generator.rb
alchemy_cms-2.7.5 lib/rails/generators/alchemy/devise/devise_generator.rb
alchemy_cms-2.7.4 lib/rails/generators/alchemy/devise/devise_generator.rb
alchemy_cms-2.8.2 lib/rails/generators/alchemy/devise/devise_generator.rb
alchemy_cms-2.8.1 lib/rails/generators/alchemy/devise/devise_generator.rb
alchemy_cms-2.7.3 lib/rails/generators/alchemy/devise/devise_generator.rb
alchemy_cms-2.7.2 lib/rails/generators/alchemy/devise/devise_generator.rb
alchemy_cms-2.7.1 lib/rails/generators/alchemy/devise/devise_generator.rb
alchemy_cms-2.7.0 lib/rails/generators/alchemy/devise/devise_generator.rb