Class: Opsk::Clean

Inherits:
Thor::Group
  • Object
show all
Includes:
Thorable, Thor::Actions
Defined in:
lib/opskeleton/clean.rb

Instance Method Summary collapse

Methods included from Thorable

#artifact, #artifact_path, included, #machines, #type_of

Instance Method Details

#cleanupObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/opskeleton/clean.rb', line 13

def cleanup
	remove_dir('pkg')
	if(File.exists?('dockerfiles'))
	  images = Dir['dockerfiles/*'].select{|file| File.ftype(file) == 'directory'}
	  images.each do |path|
 if(File.ftype(path) == 'directory')
		remove_dir("#{path}/pkg")
 end
	  end
	end
end

#metaObject



5
6
7
# File 'lib/opskeleton/clean.rb', line 5

def meta 
	 OpenStruct.new(YAML.load_file('opsk.yaml'))
end

#nameObject



9
10
11
# File 'lib/opskeleton/clean.rb', line 9

def name 
 	File.basename(Dir.getwd)
end