Ticket #10034: piston_support.diff
| File piston_support.diff, 1.2 kB (added by brainopia, 8 months ago) |
|---|
-
railties/lib/commands/plugin.rb
old new 162 162 @uri =~ /svn(?:\+ssh)?:\/\/*/ 163 163 end 164 164 165 def installed?165 def plugin_folder_exist? 166 166 File.directory?("#{rails_env.root}/vendor/plugins/#{name}") \ 167 167 or rails_env.externals.detect{ |name, repo| self.uri == repo } 168 168 end 169 169 170 def under_piston_control? 171 return false unless rails_env.use_svn? 172 ext = `svn propget piston:root "#{rails_env.root}/vendor/plugins/#{name}"` 173 !ext.empty? 174 end 175 176 def installed? 177 plugin_folder_exist? && !under_piston_control? 178 end 179 170 180 def install(method=nil, options = {}) 171 181 method ||= rails_env.best_install_method? 172 182 method = :export if method == :http and svn_url? … … 174 184 uninstall if installed? and options[:force] 175 185 176 186 unless installed? 177 send("install_using_#{method}", options) 187 send("install_using_#{method}", options) unless under_piston_control? 178 188 run_install_hook 179 189 else 180 190 puts "already installed: #{name} (#{uri}). pass --force to reinstall"