Class: Edployify::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/edployify/project.rb

Class Method Summary collapse

Class Method Details

.after_capify_cleanObject



16
17
18
19
20
21
# File 'lib/edployify/project.rb', line 16

def after_capify_clean
	capfile = File.readlines('Capfile').map { |line| line =~ /load 'config\/deploy'/ ? [ "require 'edploy'\n", line ] : line }.flatten.join('')
	File.open('Capfile', 'w') { |f| f.write capfile }
	check_existing_dir(File.join('config', 'deploy'))
	check_existing_file(File.join('config', 'deploy.rb'))
end

.before_capify_cleanObject



12
13
14
# File 'lib/edployify/project.rb', line 12

def before_capify_clean
	FileUtils.rm_f('Capfile')
end