Class: GollumRails::Generators::InstallGenerator

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

Overview

Installation generator

Instance Method Summary collapse

Instance Method Details

#install_applicationObject

Installs the necessary files


14
15
16
17
18
19
20
21
22
23
# File 'lib/generators/gollum_rails/install/install_generator.rb', line 14

def install_application
  if File.exist? 'config/initializers/gollum.rb'
    puts <<-EOM
      Warning! 'config/initializers/gollum.rb' exists
      It should be removed, as it may contain data of a previous installation
    EOM
  else
    copy_file "gollum_initializer.rb", "config/initializers/gollum.rb"
  end
end