diff options
Diffstat (limited to 'railties/lib/rails/generators/actions.rb')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index 781d7bf47c..ce62ea463d 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -6,40 +6,6 @@ module Rails module Generators module Actions - # Install a plugin. You must provide either a Subversion url or Git url. - # - # For a Git-hosted plugin, you can specify a branch and - # whether it should be added as a submodule instead of cloned. - # - # For a Subversion-hosted plugin you can specify a revision. - # - # ==== Examples - # - # plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git' - # plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git', :branch => 'stable' - # plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git', :submodule => true - # plugin 'restful-authentication', :svn => 'svn://svnhub.com/technoweenie/restful-authentication/trunk' - # plugin 'restful-authentication', :svn => 'svn://svnhub.com/technoweenie/restful-authentication/trunk', :revision => 1234 - # - def plugin(name, options) - log :plugin, name - - if options[:git] && options[:submodule] - options[:git] = "-b #{options[:branch]} #{options[:git]}" if options[:branch] - in_root do - run "git submodule add #{options[:git]} vendor/plugins/#{name}", :verbose => false - end - elsif options[:git] || options[:svn] - options[:git] = "-b #{options[:branch]} #{options[:git]}" if options[:branch] - options[:svn] = "-r #{options[:revision]} #{options[:svn]}" if options[:revision] - in_root do - run_ruby_script "script/rails plugin install #{options[:svn] || options[:git]}", :verbose => false - end - else - log "! no git or svn provided for #{name}. Skipping..." - end - end - # Adds an entry into Gemfile for the supplied gem. If env # is specified, add the gem to the given environment. # |