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/rails_generator/generators | |
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/rails_generator/generators')
3 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/generators/components/plugin/USAGE b/railties/lib/rails_generator/generators/components/plugin/USAGE index e858ada9b9..f033c81442 100644 --- a/railties/lib/rails_generator/generators/components/plugin/USAGE +++ b/railties/lib/rails_generator/generators/components/plugin/USAGE @@ -16,6 +16,7 @@ Example: This will create: vendor/plugins/browser_filters/README vendor/plugins/browser_filters/init.rb + vendor/plugins/browser_filters/install.rb vendor/plugins/browser_filters/lib/browser_filters.rb vendor/plugins/browser_filters/test/browser_filters_test.rb vendor/plugins/browser_filters/tasks/browser_filters_tasks.rake @@ -25,9 +26,10 @@ Example: This will create: vendor/plugins/browser_filters/README vendor/plugins/browser_filters/init.rb + vendor/plugins/browser_filters/install.rb vendor/plugins/browser_filters/lib/browser_filters.rb vendor/plugins/browser_filters/test/browser_filters_test.rb vendor/plugins/browser_filters/tasks/browser_filters_tasks.rake vendor/plugins/browser_filters/generators/browser_filters/browser_filters_generator.rb vendor/plugins/browser_filters/generators/browser_filters/USAGE - vendor/plugins/browser_filters/generators/browser_filters/templates/
\ No newline at end of file + vendor/plugins/browser_filters/generators/browser_filters/templates/ diff --git a/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb b/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb index 18ac5a1c5c..ea5fdf2b7d 100644 --- a/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +++ b/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb @@ -16,6 +16,7 @@ class PluginGenerator < Rails::Generator::NamedBase m.template 'README', "#{plugin_path}/README" m.template 'Rakefile', "#{plugin_path}/Rakefile" m.template 'init.rb', "#{plugin_path}/init.rb" + m.template 'install.rb', "#{plugin_path}/install.rb" m.template 'plugin.rb', "#{plugin_path}/lib/#{file_name}.rb" m.template 'tasks.rake', "#{plugin_path}/tasks/#{file_name}_tasks.rake" m.template 'unit_test.rb', "#{plugin_path}/test/#{file_name}_test.rb" diff --git a/railties/lib/rails_generator/generators/components/plugin/templates/install.rb b/railties/lib/rails_generator/generators/components/plugin/templates/install.rb new file mode 100644 index 0000000000..f7732d3796 --- /dev/null +++ b/railties/lib/rails_generator/generators/components/plugin/templates/install.rb @@ -0,0 +1 @@ +# Install hook code here |