Class: CamaleonCms::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_initializer_fileObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/generators/camaleon_cms/install_generator.rb', line 9

def create_initializer_file
  copy_file "system.json", "config/system.json"
  copy_file "plugin_routes.rb", "lib/plugin_routes.rb"
  Dir.mkdir Rails.root.join("app", "apps").to_s unless Dir.exist?(Rails.root.join("app", "apps").to_s)
  directory("apps", "app/apps")
  directory('../../../../app/apps/themes', 'app/apps/themes')
  append_to_file 'Gemfile' do
    "\n\n#################### Camaleon CMS include all gems for plugins and themes #################### \nrequire './lib/plugin_routes' \ninstance_eval(PluginRoutes.draw_gems)"
  end
end