5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/langs/php_helper.rb', line 5
def run(args, options)
if args.length < 1
raise "devo php: invalid args."
end
case args[0]
when 'install', 'vendor'
DockerJockey.docker_exec("iron/php:dev", "composer install", options)
DockerJockey.exec("chmod -R a+rw vendor")
when 'run'
DockerJockey.docker_exec("iron/php", "php #{args[1]}", options)
when 'image'
DockerJockey::ImageHelper.build1('iron/php', 'php', args[1..args.length])
when 'version'
DockerJockey.docker_exec("iron/php", "php -v", options)
else
raise "Invalid php command: #{args[0]}"
end
end
|