summaryrefslogtreecommitdiffstats
path: root/lib/generators
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-28 12:15:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-28 12:15:47 +0000
commitda84474391280bdd6004231ac71bdc26a5502936 (patch)
tree78cf0a4d9faee057d725293c5051baa024688e71 /lib/generators
parent9a85d4d063e370c5b058328d62d39794f968c90f (diff)
downloadredmine-da84474391280bdd6004231ac71bdc26a5502936.tar.gz
redmine-da84474391280bdd6004231ac71bdc26a5502936.zip
Fixed: Plugin generators should display help if no parameter is given (#4609).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3514 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/generators')
-rw-r--r--lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb1
-rw-r--r--lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb b/lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb
index efe28c5da..7f3f3f68e 100644
--- a/lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb
+++ b/lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb
@@ -6,6 +6,7 @@ class RedminePluginControllerGenerator < ControllerGenerator
def initialize(runtime_args, runtime_options = {})
runtime_args = runtime_args.dup
+ usage if runtime_args.empty?
@plugin_name = "redmine_" + runtime_args.shift.underscore
@plugin_pretty_name = plugin_name.titleize
@plugin_path = "vendor/plugins/#{plugin_name}"
diff --git a/lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb b/lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb
index 059a028d6..1c34439aa 100644
--- a/lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb
+++ b/lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb
@@ -6,6 +6,7 @@ class RedminePluginModelGenerator < ModelGenerator
def initialize(runtime_args, runtime_options = {})
runtime_args = runtime_args.dup
+ usage if runtime_args.empty?
@plugin_name = "redmine_" + runtime_args.shift.underscore
@plugin_pretty_name = plugin_name.titleize
@plugin_path = "vendor/plugins/#{plugin_name}"