Class: Sashimi::SvnRepository

Inherits:
AbstractRepository show all
Defined in:
lib/sashimi/repositories/svn_repository.rb

Constant Summary

Constants inherited from AbstractRepository

AbstractRepository::TEMP_SUFFIX

Instance Attribute Summary

Attributes inherited from AbstractRepository

#plugin

Instance Method Summary collapse

Methods inherited from AbstractRepository

#about, absolute_rails_plugins_path, #add, cache_content, #copy_plugin_and_remove_hidden_folders, #files_scheduled_for_add, #files_scheduled_for_remove, find_home, git_url?, guess_version_control_system, #initialize, instantiate_repository, instantiate_repository_by_cache, instantiate_repository_by_url, local_repository_path, path_to_rails_app, plugins_names, #remove_temp_folder, scm_add, scm_command, scm_remove, #scm_type, #temp_plugin_name, under_version_control?, #uninstall, update_rails_plugins, update_unversioned_rails_plugins, update_versioned_rails_plugins, with_path

Constructor Details

This class inherits a constructor from Sashimi::AbstractRepository

Instance Method Details

#installObject

Install the plugin.



6
7
8
9
10
11
12
13
14
# File 'lib/sashimi/repositories/svn_repository.rb', line 6

def install
  prepare_installation
  puts plugin.guess_name.titleize + "\n\n"
  with_path local_repository_path do
    result = Kernel.system("svn co #{plugin.url} #{plugin.guess_name}")
    raise SvnNotFound unless !!result
    add_to_cache(plugin.to_hash)
  end
end

#updateObject

Update the plugin.



17
18
19
20
21
22
23
# File 'lib/sashimi/repositories/svn_repository.rb', line 17

def update
  puts plugin.name.titleize + "\n\n"
  with_path plugin_path do
    result = Kernel.system("svn up")
    raise SvnNotFound unless !!result
  end
end