Class: RailsAppGenerator::AddOns::Avo

Inherits:
RailsAppGenerator::Addon show all
Defined in:
lib/rails_app_generator/addons/avo.rb

Overview

Add Avo to rails application

Instance Attribute Summary

Attributes inherited from RailsAppGenerator::Addon

#context, #dependencies, #gem_entries

Instance Method Summary collapse

Methods inherited from RailsAppGenerator::Addon

addon_name, dependencies, depends_on, gem, gem_entries, #initialize, required_gem, reset_gem_entries

Constructor Details

This class inherits a constructor from RailsAppGenerator::Addon

Instance Method Details

#after_bundleObject



32
33
34
# File 'lib/rails_app_generator/addons/avo.rb', line 32

def after_bundle
  say 'Setting up Avo - after bundle install'
end

#applyObject



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/rails_app_generator/addons/avo.rb', line 10

def apply
  # copy_file 'config/initializers/avo.rb'

  bundle_install

  generate('avo:install')

  gsub_file 'config/routes.rb', %(mount Avo::Engine, at: Avo.configuration.root_path), <<-RUBY
  authenticate :user do
    mount Avo::Engine, at: Avo.configuration.root_path
  end
  RUBY
end

#before_bundleObject



28
29
30
# File 'lib/rails_app_generator/addons/avo.rb', line 28

def before_bundle
  say 'Setting up Avo - before bundle install'
end

#before_templateObject



24
25
26
# File 'lib/rails_app_generator/addons/avo.rb', line 24

def before_template
  say 'Setting up Avo - before custom template'
end