Module: Devup::Compose

Defined in:
lib/devup/compose.rb,
lib/devup/compose/v1/compose.rb,
lib/devup/compose/v2/compose.rb,
lib/devup/compose/port_config.rb,
lib/devup/compose/v1/processes.rb,
lib/devup/compose/v2/processes.rb

Defined Under Namespace

Modules: V1, V2 Classes: PortConfig

Class Method Summary collapse

Class Method Details

.current_version(version = `docker-compose -v`) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/devup/compose.rb', line 6

def self.current_version(version = `docker-compose -v`)
  case version.match(/(\d).\d+.\d+/)[1].to_i
  when 1
    V1::Compose
  when 2
    V2::Compose
  else
    raise "Can't detect compose version"
  end
end