diff options
author | Marcel Molina <marcel@vernix.org> | 2005-12-03 06:53:14 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2005-12-03 06:53:14 +0000 |
commit | 4f1e37ccd4cf19f74ce6c4b1fe746c20a548292f (patch) | |
tree | 66f333d4736cd6ee9073ed05f66ff2a55daf4db4 /railties/lib/commands | |
parent | 6abda696b5df14a9ab132c34311daaabe12030e6 (diff) | |
download | rails-4f1e37ccd4cf19f74ce6c4b1fe746c20a548292f.tar.gz rails-4f1e37ccd4cf19f74ce6c4b1fe746c20a548292f.tar.bz2 rails-4f1e37ccd4cf19f74ce6c4b1fe746c20a548292f.zip |
Add install.rb file to plugin generation which is loaded, if it exists, when you install a plugin.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/commands')
-rw-r--r-- | railties/lib/commands/plugin.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/lib/commands/plugin.rb b/railties/lib/commands/plugin.rb index 9ae0a40314..0cb9b83894 100644 --- a/railties/lib/commands/plugin.rb +++ b/railties/lib/commands/plugin.rb @@ -166,6 +166,7 @@ class Plugin unless installed? send("install_using_#{method}", options) + run_install_hook else puts "already installed: #{name} (#{uri}). pass --force to reinstall" end @@ -185,6 +186,12 @@ class Plugin end private + + def run_install_hook + install_hook_file = "#{rails_env.root}/vendor/plugins/#{name}/install.rb" + load install_hook_file if File.exists? install_hook_file + end + def install_using_export(options = {}) svn_command :export, options end |