Sha256: d92ae7a9a75393416c17905bf68cef6b6e686261a45ed2b38d2e14337f727c39

Contents?: true

Size: 453 Bytes

Versions: 5

Compression:

Stored size: 453 Bytes

Contents

require 'rails/generators'

module HumanPower
  class InstallGenerator < ::Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)

    desc "Creates a sample configuration file in config/robots.rb"
    def create_config_file
      copy_file "robots.rb", "config/robots.rb"
    end

    desc "Creates a route for robots.txt"
    def create_route
      route %{mount HumanPower::Rails::Engine => "robots.txt"}
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
human_power-0.1.0 lib/generators/human_power/install_generator.rb
human_power-0.0.6 lib/generators/human_power/install_generator.rb
human_power-0.0.4 lib/generators/human_power/install_generator.rb
human_power-0.0.3 lib/generators/human_power/install_generator.rb
human_power-0.0.2 lib/generators/human_power/install_generator.rb