Methods
- B
- D
- E
- F
- I
- N
- U
Attributes
[R] | root |
Class Public methods
default()
Link
default=(rails_env)
Link
find(dir=nil)
Link
new(dir)
Link
Instance Public methods
best_install_method()
Link
externals()
Link
# File railties/lib/rails/commands/plugin.rb, line 94 def externals return [] unless use_externals? ext = %xsvn propget svn:externals "#{root}/vendor/plugins"` lines = ext.respond_to?(:lines) ? ext.lines : ext lines.reject{ |line| line.strip == '' }.map do |line| line.strip.split(/\s+/, 2) end end
externals=(items)
Link
# File railties/lib/rails/commands/plugin.rb, line 103 def externals=(items) unless items.is_a? String items = items.map{|name,uri| "#{name.ljust(29)} #{uri.chomp('/')}"}.join("\n") end Tempfile.open("svn-set-prop") do |file| file.write(items) file.flush system("svn propset -q svn:externals -F \"#{file.path}\" \"#{root}/vendor/plugins\"") end end
install(name_uri_or_plugin)
Link
# File railties/lib/rails/commands/plugin.rb, line 51 def install(name_uri_or_plugin) if name_uri_or_plugin.is_a? String if name_uri_or_plugin =~ /:\/\// plugin = Plugin.new(name_uri_or_plugin) else plugin = Plugins[name_uri_or_plugin] end else plugin = name_uri_or_plugin end if plugin plugin.install else puts "Plugin not found: #{name_uri_or_plugin}" end end
use_checkout?()
Link
# File railties/lib/rails/commands/plugin.rb, line 78 def use_checkout? # this is a bit of a guess. we assume that if the rails environment # is under subversion then they probably want the plugin checked out # instead of exported. This can be overridden on the command line File.directory?("#{root}/.svn") end
use_externals?()
Link