Class: Blacksand::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/blacksand/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#installObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/generators/blacksand/install_generator.rb', line 7

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