require 'rails/generators/base' module Errapi module Rails module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path("../../templates", __FILE__) desc "Creates an errapi initializer and copy locale files to your application." #class_option :orm def copy_initializer template "errapi.rb", "config/initializers/errapi.rb" end def copy_locale copy_file "../../../config/locales/en.yml", "config/locales/errapi.en.yml" end def show_readme readme "README.txt" if behavior == :invoke end end end end end