Sha256: 36205bd753b3e25cb77c1bf552c050a5c0a3fce11d42b44a519c7505caa6acd4

Contents?: true

Size: 1010 Bytes

Versions: 1

Compression:

Stored size: 1010 Bytes

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.directory "public/images/kitsune/"
      %w[bg.jpg form-bg.gif grey-btn.png nicEditorIcons.gif].each do |image|
        m.file "images/#{image}", "public/images/kitsune/#{image}"
      end
      
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kitsune-0.0.2 generators/kitsune/kitsune_generator.rb