Class: Sashimi::GitRepository

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

Instance Attribute Summary

Attributes inherited from AbstractRepository

#plugin

Instance Method Summary collapse

Methods inherited from AbstractRepository

#about, #add, cache_content, cache_file, change_dir, change_dir_to_local_repository, find_home, git_url?, #initialize, instantiate_repository, instantiate_repository_by_cache, instantiate_repository_by_url, list, local_repository_path, path_to_rails_app, plugins_dir, #scm_type, #uninstall

Constructor Details

This class inherits a constructor from Sashimi::AbstractRepository

Instance Method Details

#installObject



3
4
5
6
7
# File 'lib/sashimi/repositories/git_repository.rb', line 3

def install
  prepare_installation
  system("git clone #{plugin.url}")
  add_to_cache(plugin.to_hash)
end

#updateObject



9
10
11
12
# File 'lib/sashimi/repositories/git_repository.rb', line 9

def update
  change_dir_to_plugin_path
  system('git pull')
end