Class: Incline::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#install_moduleObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/generators/incline/install_generator.rb', line 15

def install_module

  mount_path = options[:mount_path] || 'incline'
  # trim off leading '/', './', or '../'.
  # also trim off trailing '/'.
  mount_path = mount_path.to_s.gsub('\\','/').gsub(/^\.*\//, '').gsub(/\/+$/, '')
  mount_path = 'incline' if mount_path.blank?
  @mount_path = '/' + mount_path

  copy_files
  add_version
  config_app
  config_logger if options[:json_logger]
  config_routes
  config_gitignore
  config_secrets

end