Sha256: 9f29e6f0f48c418a27e64cbf61451c96f9566f2099f69afa8533a1a75a09391e

Contents?: true

Size: 1.09 KB

Versions: 2

Compression:

Stored size: 1.09 KB

Contents

require File.expand_path(File.dirname(__FILE__) + "/lib/insert_commands.rb")
class KitsuneGenerator < Rails::Generator::Base
  def manifest
    record do |m|
      page_model = "app/models/page.rb"
      if File.exists?(page_model)
        m.insert_into page_model, "include Kitsune::Page"
      else
        m.directory File.join("app", "models")
        m.file "page.rb", page_model
        m.migration_template "migrations/create_pages.rb", 'db/migrate', :migration_file_name => "kitsune_create_pages"
      end
            
      m.directory "public/javascripts/kitsune/"
      m.file "javascripts/nicEdit.js", "public/javascripts/kitsune/nicEdit.js"
      m.directory "public/stylesheets/kitsune/"
      m.file "stylesheets/global.css", "public/stylesheets/kitsune/global.css"
      m.file "stylesheets/ie.css", "public/stylesheets/kitsune/ie.css"
      m.directory "public/images/kitsune/"
      %w[bg.jpg form-bg.gif header-link.png grey-btn.png nicEditorIcons.gif].each do |image|
        m.file "images/#{image}", "public/images/kitsune/#{image}"
      end
      
      m.readme "README"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kitsune-0.0.13 generators/kitsune/kitsune_generator.rb
kitsune-0.0.12 generators/kitsune/kitsune_generator.rb