Skip to content

Commit

Permalink
Added simple command to install a Redmine plugin from a common direct…
Browse files Browse the repository at this point in the history
…ory.
  • Loading branch information
edavis10 committed Apr 26, 2010
1 parent 8b30553 commit a28ea56
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions 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


2 changes: 2 additions & 0 deletions 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.