Sha256: 0a3e5477d00a869ff56831d37a342da912c0efa48dd01c308ab197ddfcc0d458

Contents?: true

Size: 895 Bytes

Versions: 18

Compression:

Stored size: 895 Bytes

Contents

module Spree
  module Auth
    module Generators
      class InstallGenerator < Rails::Generators::Base
        class_option :migrate, type: :boolean, default: true, banner: 'Migrate the database'

        def self.source_paths
          paths = superclass.source_paths
          paths << File.expand_path('../templates', __FILE__)
          paths.flatten
        end

        def generate_devise_key
          return if ENV['CI']
          template 'config/initializers/devise.rb', 'config/initializers/devise.rb'
        end

        def add_migrations
          run 'bundle exec rake railties:install:migrations FROM=spree_auth'
        end

        def run_migrations
         if options[:migrate]
           run 'bundle exec rake db:migrate VERBOSE=false'
         else
           puts "Skiping rake db:migrate, don't forget to run it!"
         end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
spree_auth_devise-4.6.3 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.6.2 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.6.1 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.6.0 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.5.0 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.4.2 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.1.1 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.2.1 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.4.1 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.4.0 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.3.4 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.3.3 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.3.2 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.3.1 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.3.0 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.2.0 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.1.0 lib/generators/spree/auth/install/install_generator.rb
spree_auth_devise-4.1.0.rc1 lib/generators/spree/auth/install/install_generator.rb