kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.3 KiB
34 lines
1.3 KiB
14 years ago
|
class ChiliprojectPluginGenerator < Rails::Generator::NamedBase
|
||
16 years ago
|
attr_reader :plugin_path, :plugin_name, :plugin_pretty_name
|
||
|
|
||
|
def initialize(runtime_args, runtime_options = {})
|
||
|
super
|
||
14 years ago
|
@plugin_name = "chiliproject_#{file_name.underscore}"
|
||
16 years ago
|
@plugin_pretty_name = plugin_name.titleize
|
||
|
@plugin_path = "vendor/plugins/#{plugin_name}"
|
||
|
end
|
||
|
|
||
|
def manifest
|
||
|
record do |m|
|
||
|
m.directory "#{plugin_path}/app/controllers"
|
||
|
m.directory "#{plugin_path}/app/helpers"
|
||
|
m.directory "#{plugin_path}/app/models"
|
||
|
m.directory "#{plugin_path}/app/views"
|
||
|
m.directory "#{plugin_path}/db/migrate"
|
||
|
m.directory "#{plugin_path}/lib/tasks"
|
||
|
m.directory "#{plugin_path}/assets/images"
|
||
|
m.directory "#{plugin_path}/assets/javascripts"
|
||
|
m.directory "#{plugin_path}/assets/stylesheets"
|
||
|
m.directory "#{plugin_path}/lang"
|
||
16 years ago
|
m.directory "#{plugin_path}/config/locales"
|
||
16 years ago
|
m.directory "#{plugin_path}/test"
|
||
|
|
||
16 years ago
|
m.template 'README.rdoc', "#{plugin_path}/README.rdoc"
|
||
|
m.template 'init.rb.erb', "#{plugin_path}/init.rb"
|
||
16 years ago
|
m.template 'en.yml', "#{plugin_path}/lang/en.yml"
|
||
16 years ago
|
m.template 'en_rails_i18n.yml', "#{plugin_path}/config/locales/en.yml"
|
||
16 years ago
|
m.template 'test_helper.rb.erb', "#{plugin_path}/test/test_helper.rb"
|
||
16 years ago
|
end
|
||
|
end
|
||
|
end
|