Sha256: ca86d9e406b94c6b316f6e0bac6847117f56a8682a9c47a4b0efad69dc118cd8

Contents?: true

Size: 595 Bytes

Versions: 54

Compression:

Stored size: 595 Bytes

Contents

require "rails/generators"

module Generators
  module Avo
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path("templates", __dir__)

      namespace "avo:install"
      desc "Creates an Avo initializer adds the route to the routes file."
      class_option :path, type: :string, default: "avo"

      def create_initializer_file
        route "mount Avo::Engine => Avo.configuration.root_path"

        template "initializer/avo.tt", "config/initializers/avo.rb"
        template "locales/avo.en.yml", "config/locales/avo.en.yml"
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
avo-1.7.2 lib/generators/avo/install_generator.rb
avo-1.7.1 lib/generators/avo/install_generator.rb
avo-1.7.0 lib/generators/avo/install_generator.rb
avo-1.6.4.pre.1 lib/generators/avo/install_generator.rb
avo-1.6.3.pre.3 lib/generators/avo/install_generator.rb
avo-1.6.3.pre.2 lib/generators/avo/install_generator.rb
avo-1.6.3.pre.1 lib/generators/avo/install_generator.rb
avo-1.6.2.pre.1 lib/generators/avo/install_generator.rb
avo-1.6.1 lib/generators/avo/install_generator.rb
avo-1.6.0 lib/generators/avo/install_generator.rb
avo-1.5.5 lib/generators/avo/install_generator.rb
avo-1.5.4 lib/generators/avo/install_generator.rb
avo-1.5.3 lib/generators/avo/install_generator.rb
avo-1.5.2 lib/generators/avo/install_generator.rb
avo-1.5.1 lib/generators/avo/install_generator.rb
avo-1.5.0 lib/generators/avo/install_generator.rb
avo-1.4.5.pre.1 lib/generators/avo/install_generator.rb
avo-1.4.4.pre.1 lib/generators/avo/install_generator.rb
avo-1.4.4 lib/generators/avo/install_generator.rb
avo-1.4.3 lib/generators/avo/install_generator.rb