Sha256: 8c349838df02620bb1072c40c339071944edca5c6b704746a5b37a168b16a9c6

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

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

      desc 'Creates a Gmaps4rails initializer and copies the assets to the public folder.'

      def copy_locale
        copy_file '../../../public/javascripts/gmaps4rails.js', 'public/javascripts/gmaps4rails.js'
        copy_file '../../../public/javascripts/gmaps4rails.googlemaps.js', 'public/javascripts/gmaps4rails.googlemaps.js'
        copy_file '../../../public/javascripts/gmaps4rails.bing.js', 'public/javascripts/gmaps4rails.bing.js'
        copy_file '../../../public/javascripts/gmaps4rails.openlayers.js', 'public/javascripts/gmaps4rails.openlayers.js'
        copy_file '../../../public/javascripts/gmaps4rails.mapquest.js', 'public/javascripts/gmaps4rails.mapquest.js'
        copy_file '../../../public/stylesheets/gmaps4rails.css', 'public/stylesheets/gmaps4rails.css'
        copy_file '../../../public/images/marker.png', 'public/images/marker.png'
      end

      def show_readme
        readme 'README' if behavior == :invoke
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gmaps4rails-0.10.2 lib/generators/gmaps4rails/install_generator.rb