Sha256: 6759b79915b6e7ae59a35609b792728af6c0d715e94b19872bb7dc9d21d8ea8d

Contents?: true

Size: 944 Bytes

Versions: 9

Compression:

Stored size: 944 Bytes

Contents

# encoding: utf-8

module Imaginable
  # Copies the necessary js-files to public/javascripts/,
  # the necessary css-files and images to public/stylesheets
  # and a config initializer to config/initializers/imaginable.rb
  #
  # @example
  #   $ rails generate imaginable:install
  #
  # @todo Revisit in Rails 3.1 where public assets are treated differently
  class InstallGenerator < Rails::Generators::Base
    desc "Copies the necessary js-files to public/javascripts/, the necessary css-files and images to public/stylesheets and a config initializer to config/initializers/imaginable.rb"

    source_root File.expand_path('../../../templates', __FILE__)

    def copy_files
      copy_file   'imaginable.rb',    'config/initializers/imaginable.rb'
      directory   'images',           'public/images'
      directory   'javascripts',      'public/javascripts'
      directory   'stylesheets',      'public/stylesheets'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
imaginable-0.1.6 lib/generators/imaginable/install/install_generator.rb
imaginable-0.1.5 lib/generators/imaginable/install/install_generator.rb
imaginable-0.1.4 lib/generators/imaginable/install/install_generator.rb
imaginable-0.1.3 lib/generators/imaginable/install/install_generator.rb
imaginable-0.1.2 lib/generators/imaginable/install/install_generator.rb
imaginable-0.1.1 lib/generators/imaginable/install/install_generator.rb
imaginable-0.1.0 lib/generators/imaginable/install/install_generator.rb
imaginable-0.0.5 lib/generators/imaginable/install/install_generator.rb
imaginable-0.0.4 lib/generators/imaginable/install/install_generator.rb