Skip to content
Browse files

Added simple command to install a Redmine plugin from a common direct…

…ory.
  • Loading branch information...
1 parent 8b30553 commit a28ea56061e0e47c632f95f104473e5bc9f3aeeb @edavis10 committed Apr 26, 2010
Showing with 28 additions and 0 deletions.
  1. +26 −0 lib/redmine_tasks/main.thor
  2. +2 −0 setup.rb
View
26 lib/redmine_tasks/main.thor
@@ -0,0 +1,26 @@
+# module: redmine_tasks
+
+module RedmineTasks
+ class Base < Thor
+ include Thor::Actions
+
+ def self.source_root
+ File.dirname(__FILE__)
+ end
+ end
+
+ class PluginInstall < Base
+ desc "install_from_file", "Install a Redmine plugin from file"
+ def install_from_file(plugin_name)
+
+ dir = "/home/edavis/dev/redmine/plugins/#{plugin_name}"
+ if File.exists?(dir)
+ directory(dir, plugin_name)
+ else
+ raise "No such file or directory - #{dir}"
+ end
+ end
+ end
+end
+
+
View
2 setup.rb
@@ -0,0 +1,2 @@
+# TODO: can't find packaging guidelines for this right now
+system("thor install lib/redmine_tasks")

0 comments on commit a28ea56

Please sign in to comment.
Something went wrong with that request. Please try again.