Class: Gitnesse::DirManager

Inherits:
Object
  • Object
show all
Defined in:
lib/gitnesse/dir_manager.rb

Class Method Summary collapse

Class Method Details

.make_project_dirObject

Public: Checks/Creates ~/.gitnesse/{project_name} dir. The project name is derived from the folder gitnesse is run in.

Returns the path to the created project dir



9
10
11
12
# File 'lib/gitnesse/dir_manager.rb', line 9

def self.make_project_dir
  FileUtils.mkdir_p project_dir
  project_dir
end

.project_dir_present?Boolean

Public: Checks that project directory is present

Returns a boolean indicating if the dir exists or not

Returns:

  • (Boolean)


24
25
26
# File 'lib/gitnesse/dir_manager.rb', line 24

def self.project_dir_present?
  File.directory? project_dir
end

.remove_project_dirObject

Public: Removes project dir, but not ~/.gitnesse dir

Returns nothing



17
18
19
# File 'lib/gitnesse/dir_manager.rb', line 17

def self.remove_project_dir
  FileUtils.rm_rf project_dir
end