Class: Dependencies::Docker

Inherits:
Dependency show all
Defined in:
lib/dependencies/docker.rb

Constant Summary

Constants inherited from Dependency

Dependency::DESCRIPTION_TYPE_WIDTH

Instance Attribute Summary

Attributes inherited from Dependency

#name

Instance Method Summary collapse

Methods inherited from Dependency

#always_act?, #exit_code, #initialize, #output, #should_meet?, #success?, #type

Constructor Details

This class inherits a constructor from Dependency

Instance Method Details

#meetObject



9
10
11
# File 'lib/dependencies/docker.rb', line 9

def meet
	execute("cd #{name} && docker-compose up -d")
end

#met?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/dependencies/docker.rb', line 5

def met?
	execute("cd #{name} && docker-compose ps | grep -q ' Up '")
end

#unmeetObject



13
14
15
# File 'lib/dependencies/docker.rb', line 13

def unmeet
	execute("cd #{name} && docker-compose down")
end