[#324] Rename and update the chiliproject_plugin generator

This commit is contained in:
Eric Davis 2011-04-08 09:52:32 -07:00
parent 18c35f3792
commit cdb8c68018
3 changed files with 20 additions and 20 deletions

View File

@ -1,20 +1,20 @@
Description:
The plugin generator creates stubs for a new Redmine plugin.
The plugin generator creates stubs for a new ChiliProject plugin.
Example:
./script/generate redmine_plugin meetings
create vendor/plugins/redmine_meetings/app/controllers
create vendor/plugins/redmine_meetings/app/helpers
create vendor/plugins/redmine_meetings/app/models
create vendor/plugins/redmine_meetings/app/views
create vendor/plugins/redmine_meetings/db/migrate
create vendor/plugins/redmine_meetings/lib/tasks
create vendor/plugins/redmine_meetings/assets/images
create vendor/plugins/redmine_meetings/assets/javascripts
create vendor/plugins/redmine_meetings/assets/stylesheets
create vendor/plugins/redmine_meetings/lang
create vendor/plugins/redmine_meetings/README
create vendor/plugins/redmine_meetings/init.rb
create vendor/plugins/redmine_meetings/lang/en.yml
create vendor/plugins/redmine_meetings/config/locales/en.yml
create vendor/plugins/redmine_meetings/test/test_helper.rb
./script/generate chliproject_plugin meetings
create vendor/plugins/chiliproject_meetings/app/controllers
create vendor/plugins/chiliproject_meetings/app/helpers
create vendor/plugins/chiliproject_meetings/app/models
create vendor/plugins/chiliproject_meetings/app/views
create vendor/plugins/chiliproject_meetings/db/migrate
create vendor/plugins/chiliproject_meetings/lib/tasks
create vendor/plugins/chiliproject_meetings/assets/images
create vendor/plugins/chiliproject_meetings/assets/javascripts
create vendor/plugins/chiliproject_meetings/assets/stylesheets
create vendor/plugins/chiliproject_meetings/lang
create vendor/plugins/chiliproject_meetings/README
create vendor/plugins/chiliproject_meetings/init.rb
create vendor/plugins/chiliproject_meetings/lang/en.yml
create vendor/plugins/chiliproject_meetings/config/locales/en.yml
create vendor/plugins/chiliproject_meetings/test/test_helper.rb

View File

@ -1,9 +1,9 @@
class RedminePluginGenerator < Rails::Generator::NamedBase
class ChiliprojectPluginGenerator < Rails::Generator::NamedBase
attr_reader :plugin_path, :plugin_name, :plugin_pretty_name
def initialize(runtime_args, runtime_options = {})
super
@plugin_name = "redmine_#{file_name.underscore}"
@plugin_name = "chiliproject_#{file_name.underscore}"
@plugin_pretty_name = plugin_name.titleize
@plugin_path = "vendor/plugins/#{plugin_name}"
end

View File

@ -3,7 +3,7 @@ require 'redmine'
Redmine::Plugin.register :<%= plugin_name %> do
name '<%= plugin_pretty_name %> plugin'
author 'Author name'
description 'This is a plugin for Redmine'
description 'This is a plugin for ChiliProject'
version '0.0.1'
url 'http://example.com/path/to/plugin'
author_url 'http://example.com/about'