Class: Gonzui::AbstractVCS
Direct Known Subclasses
CVS, Git, Subversion
Instance Method Summary collapse
- #clean ⇒ Object
- #extract ⇒ Object
-
#initialize(config, root, mozule) ⇒ AbstractVCS
constructor
A new instance of AbstractVCS.
Methods included from Util
assert, assert_equal, assert_equal_all, assert_non_nil, assert_not_reached, benchmark, command_exist?, commify, eprintf, format_bytes, program_name, protect_from_signals, require_command, set_verbosity, shell_escape, unix?, vprintf, windows?, wprintf
Constructor Details
#initialize(config, root, mozule) ⇒ AbstractVCS
Returns a new instance of AbstractVCS.
18 19 20 21 22 |
# File 'lib/gonzui/vcs.rb', line 18 def initialize(config, root, mozule) @config = config @root = root @mozule = mozule end |
Instance Method Details
#clean ⇒ Object
48 49 |
# File 'lib/gonzui/vcs.rb', line 48 def clean end |
#extract ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/gonzui/vcs.rb', line 35 def extract File.mkpath(@config.cache_directory) output_directory = File.join(@config.cache_directory, @mozule) if not File.exist?(output_directory) do_checkout(output_directory) elsif File.directory?(output_directory) do_update(output_directory) else raise VCSError.new("#{output_directory}: obstacle found") end return output_directory end |