Class: RakeGatling::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/src/Shell.rb

Instance Method Summary collapse

Instance Method Details

#execute(command) ⇒ Object



3
4
5
# File 'lib/src/Shell.rb', line 3

def execute(command)
	puts `#{command}`
end

#move_directory_contents_up(location) ⇒ Object



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

def move_directory_contents_up(location)
	directories = Dir.glob("#{location}/*")
	Dir.glob("#{location}/*/*") {
		|folder_object| mv File.expand_path(folder_object), location
	}
	directories.each do | directory |
		rm_rf File.expand_path(directory)
	end
end

#remove_directory(directory_name) ⇒ Object



7
8
9
# File 'lib/src/Shell.rb', line 7

def remove_directory(directory_name)
	rm_rf directory_name
end