Class: Kickstart::Repository

Inherits:
Object
  • Object
show all
Includes:
FileBase, Singleton
Defined in:
lib/repository.rb

Constant Summary

Constants included from FileBase

FileBase::Home

Class Method Summary collapse

Methods included from FileBase

#copy, #destroy, #exists?, #file_path, #has_location?, #home, #location, #make_dir, #mkdir, #move, #path, #reset_location, #set_home, #set_location, #write

Class Method Details

.checkout(where = nil) ⇒ Object



21
22
23
24
25
# File 'lib/repository.rb', line 21

def self.checkout(where=nil)
  where||='.'
  puts "checking out the trunk of the application into #{where}"
  system "svn co #{self.address}/trunk #{where}"
end

.commit(message) ⇒ Object



42
43
44
45
# File 'lib/repository.rb', line 42

def self.commit message
  puts "\nsvn commit -m '#{message}'"
  system "svn commit -m '#{message}'"
end

.define(where, args) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/repository.rb', line 11

def self.define where, args
  self.address = where
  self.username = args[:user]
  self.comment = args[:comment]
  raise 'repository needs an address' unless where
  self.import_command = "svn import . #{where}/trunk"
  self.import_command << " -m '#{args[:comment]}'" if args[:comment]
  self.import_command << " --username #{args[:user]}" if args[:user]
end

.defined?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/repository.rb', line 27

def self.defined?
  self.address
end

.ignore(what, where) ⇒ Object



47
48
49
50
# File 'lib/repository.rb', line 47

def self.ignore what, where
  puts "\nsvn propset svn:ignore '#{what}' #{where}"
  system "svn propset svn:ignore '#{what}' #{where}"
end

.importObject



31
32
33
34
35
# File 'lib/repository.rb', line 31

def self.import
  puts "committing the application to your repository\n"
  puts import_command
  system import_command
end

.move(what, where) ⇒ Object



57
58
59
60
# File 'lib/repository.rb', line 57

def self.move what, where
  puts "\nsvn move #{what} #{where}"
  system "svn move #{what} #{where}"
end

.remove(what) ⇒ Object



37
38
39
40
# File 'lib/repository.rb', line 37

def self.remove what
  puts "\nsvn remove #{what}"
  system "svn remove #{what}"
end

.update(what) ⇒ Object



52
53
54
55
# File 'lib/repository.rb', line 52

def self.update what
  puts "\nsvn update #{what}"
  system "svn update #{what}"
end