Sha256: 5b17d0d46030b940c34e1342c9f4d97659e6aba7e1849d16c9e961eb15e4ad86

Contents?: true

Size: 493 Bytes

Versions: 10

Compression:

Stored size: 493 Bytes

Contents

module Teleport
  class WelcomeGenerator < Rails::Generators::Base
    source_root File.expand_path("../templates", __FILE__)

    def add
      template 'welcome/welcome_controller.rb', 'app/controllers/welcome_controller.rb'
      template 'welcome/index.haml', 'app/views/welcome/index.haml'
      remove_comments 'config/routes.rb'
      route "root 'welcome#index'"
    end

    private
      def remove_comments(filename)
        gsub_file(filename, /^\s*#.*\n/, '')
      end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
teleporter-2.0.11 lib/generators/teleport/welcome.rb
teleporter-2.0.10 lib/generators/teleport/welcome.rb
teleporter-2.0.9 lib/generators/teleport/welcome.rb
teleporter-2.0.8 lib/generators/teleport/welcome.rb
teleporter-2.0.7 lib/generators/teleport/welcome.rb
teleporter-2.0.6 lib/generators/teleport/welcome.rb
teleporter-2.0.4 lib/generators/teleport/welcome.rb
teleporter-2.0.2 lib/generators/teleport/welcome.rb
teleporter-2.0.1 lib/generators/teleport/welcome.rb
teleporter-2.0.0 lib/generators/teleport/welcome.rb