Sha256: 98a4e39c696234fe98facc458cdb0168cb6aa894dfa4231b7c3ae01586eb3b80

Contents?: true

Size: 744 Bytes

Versions: 3

Compression:

Stored size: 744 Bytes

Contents

require 'rails/generators'

module Blacksand
  module Generators
    class InstallGenerator < Rails::Generators::Base

      def install
        create_file("config/initializers/blacksand.rb", <<-RUBY)
Blacksand.site_id   = 'site id'
Blacksand.site_name = 'site name'

# Config carrierwave
#
# Blacksand.carrierwave_storage          = :file # or :qiniu
# Blacksand.carrierwave_store_dir_prefix = "uploads" # NOTICE: Kindeditor need config their own configuration

# Setup authentication to be run as a before filter 
# @example Devise admin
#   Blacksand.authenticate_with do
#     authenticate_admin!
#   end

# Page caching
# Blacksand.page_caching = false
        RUBY

        rake 'railties:install:migrations'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacksand-2.4.1 lib/generators/blacksand/install_generator.rb
blacksand-2.4.0 lib/generators/blacksand/install_generator.rb
blacksand-2.3.0 lib/generators/blacksand/install_generator.rb