Class: Quadro::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#installObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/generators/quadro/install/install_generator.rb', line 4

def install
  route "mount Quadro::Engine => '/'"

  remove_file "public/index.html"
  remove_file "public/favicon.ico"
  remove_file "public/robots.txt"

  copy_file "db/GeoLite2-Country.mmdb", "db/GeoLite2-Country.mmdb"
  copy_file "config/initializers/quadro.rb", "config/initializers/quadro.rb"
  copy_file "app/views/quadro/shared/templates/page/_list.html.haml", "app/views/quadro/shared/templates/page/_list.html.haml"
  copy_file "app/views/quadro/shared/templates/page/_thumbnail.html.haml", "app/views/quadro/shared/templates/page/_thumbnail.html.haml"
  copy_file "app/views/quadro/shared/_navigation.html.haml", "app/views/quadro/shared/_navigation.html.haml"
  copy_file "app/views/quadro/shared/templates/_blank.html.haml", "app/views/quadro/shared/templates/_blank.html.haml"
  copy_file "app/views/quadro/shared/templates/_jumbotron.html.haml", "app/views/quadro/shared/templates/_jumbotron.html.haml"
  copy_file "app/views/quadro/shared/templates/_sidebar.html.haml", "app/views/quadro/shared/templates/_sidebar.html.haml"
  copy_file "app/views/quadro/shared/templates/_demo.html.haml", "app/views/quadro/shared/templates/_demo.html.haml"
  copy_file "app/assets/javascripts/quadro/site.js.coffee", "app/assets/javascripts/quadro/site.js.coffee"
  copy_file "app/assets/stylesheets/quadro/site.css.sass", "app/assets/stylesheets/quadro/site.css.sass"
  copy_file "app/assets/images/quadro/favicon.ico", "app/assets/images/quadro/favicon.ico"
  copy_file "app/assets/images/quadro/quadro-logo-mini.png", "app/assets/images/quadro/quadro-logo-mini.png"
  copy_file "app/assets/images/quadro/quadro-logo.png", "app/assets/images/quadro/quadro-logo.png"
  copy_file "public/maintenance.html", "public/maintenance.html"
  copy_file "public/404.html", "public/404.html"
  copy_file "public/422.html", "public/422.html"
  copy_file "public/500.html", "public/500.html"

  rake "quadro:install:migrations"
  rake "db:migrate"
  rake "quadro:create_admin_user"
  rake "quadro:create_root_page"
end