vagrant-docker-compose 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vagrant-docker-compose/cap/linux/docker_compose_install.rb +3 -3
- data/lib/vagrant-docker-compose/cap/linux/docker_compose_installed.rb +2 -2
- data/lib/vagrant-docker-compose/config.rb +10 -1
- data/lib/vagrant-docker-compose/docker_compose.rb +3 -3
- data/lib/vagrant-docker-compose/installer.rb +5 -4
- data/lib/vagrant-docker-compose/locales/en.yml +1 -0
- data/lib/vagrant-docker-compose/provisioner.rb +1 -1
- data/lib/vagrant-docker-compose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d913fc6f78fc86bba2124d632ae3849eda30780
|
4
|
+
data.tar.gz: b0aaeed03cbbbcf11179e7cb2782196dfb374978
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e4f9714ce4d46b7d179b423ee4c186e11b8a66d4c50f4d66c14407acf9b4abfe743b3838df88bc7b3ac429e7f7b5b4f4bb11d4c61978bc6c3eb9bede0f5d5a4
|
7
|
+
data.tar.gz: 8e7186461ac9b06c284c3362240584b6161fb80c119f4732d713a8360c1c8935db9bd60a59ebb4fc4386f7347e5b6debe014b7df5f56af6d3015e17f779f43c8
|
@@ -3,10 +3,10 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
module Linux
|
5
5
|
module DockerComposeInstall
|
6
|
-
def self.docker_compose_install(machine)
|
6
|
+
def self.docker_compose_install(machine, config)
|
7
7
|
machine.communicate.tap do |comm|
|
8
|
-
comm.sudo("curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` >
|
9
|
-
chmod +x
|
8
|
+
comm.sudo("curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > #{config.executable}
|
9
|
+
chmod +x #{config.executable}")
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -3,9 +3,9 @@ module VagrantPlugins
|
|
3
3
|
module Cap
|
4
4
|
module Linux
|
5
5
|
module DockerComposeInstalled
|
6
|
-
def self.docker_compose_installed(machine)
|
6
|
+
def self.docker_compose_installed(machine, config)
|
7
7
|
paths = [
|
8
|
-
|
8
|
+
config.executable
|
9
9
|
]
|
10
10
|
|
11
11
|
paths.all? do |p|
|
@@ -1,12 +1,21 @@
|
|
1
1
|
module VagrantPlugins
|
2
2
|
module DockerComposeProvisioner
|
3
3
|
class Config < Vagrant.plugin("2", :config)
|
4
|
-
attr_accessor :yml, :rebuild
|
4
|
+
attr_accessor :yml, :rebuild, :executable
|
5
5
|
|
6
6
|
def yml=(yml)
|
7
7
|
raise DockerComposeError, :yml_must_be_absolute if !Pathname.new(yml).absolute?
|
8
8
|
@yml = yml
|
9
9
|
end
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
@executable = UNSET_VALUE
|
13
|
+
end
|
14
|
+
|
15
|
+
def finalize!
|
16
|
+
@executable = "/usr/local/bin/docker-compose" if @executable == UNSET_VALUE
|
17
|
+
end
|
18
|
+
|
10
19
|
end
|
11
20
|
end
|
12
21
|
end
|
@@ -11,7 +11,7 @@ module VagrantPlugins
|
|
11
11
|
def build
|
12
12
|
@machine.ui.detail(I18n.t(:docker_compose_build))
|
13
13
|
@machine.communicate.tap do |comm|
|
14
|
-
comm.sudo("
|
14
|
+
comm.sudo("#{@config.executable} -f \"#{@config.yml}\" build") do |type, data|
|
15
15
|
handle_comm(type, data)
|
16
16
|
end
|
17
17
|
end
|
@@ -20,7 +20,7 @@ module VagrantPlugins
|
|
20
20
|
def rm
|
21
21
|
@machine.ui.detail(I18n.t(:docker_compose_rm))
|
22
22
|
@machine.communicate.tap do |comm|
|
23
|
-
comm.sudo("
|
23
|
+
comm.sudo("#{@config.executable} -f \"#{@config.yml}\" rm --force") do |type, data|
|
24
24
|
handle_comm(type, data)
|
25
25
|
end
|
26
26
|
end
|
@@ -29,7 +29,7 @@ module VagrantPlugins
|
|
29
29
|
def up
|
30
30
|
@machine.ui.detail(I18n.t(:docker_compose_up))
|
31
31
|
@machine.communicate.tap do |comm|
|
32
|
-
comm.sudo("
|
32
|
+
comm.sudo("#{@config.executable} -f \"#{@config.yml}\" up -d") do |type, data|
|
33
33
|
handle_comm(type, data)
|
34
34
|
end
|
35
35
|
end
|
@@ -1,18 +1,19 @@
|
|
1
1
|
module VagrantPlugins
|
2
2
|
module DockerComposeProvisioner
|
3
3
|
class Installer
|
4
|
-
def initialize(machine)
|
4
|
+
def initialize(machine, config)
|
5
5
|
@machine = machine
|
6
|
+
@config = config
|
6
7
|
end
|
7
8
|
|
8
9
|
def ensure_installed
|
9
10
|
@machine.ui.detail(I18n.t(:checking_installation))
|
10
11
|
|
11
|
-
if !@machine.guest.capability(:docker_compose_installed)
|
12
|
+
if !@machine.guest.capability(:docker_compose_installed, @config)
|
12
13
|
@machine.ui.detail(I18n.t(:installing))
|
13
|
-
@machine.guest.capability(:docker_compose_install)
|
14
|
+
@machine.guest.capability(:docker_compose_install, @config)
|
14
15
|
|
15
|
-
if !@machine.guest.capability(:docker_compose_installed)
|
16
|
+
if !@machine.guest.capability(:docker_compose_installed, @config)
|
16
17
|
raise DockerComposeError, :install_failed
|
17
18
|
end
|
18
19
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
en:
|
2
2
|
errors:
|
3
3
|
yml_must_be_absolute: Docker Compose YML path must be absolute!
|
4
|
+
install_failed: Docker Compose installation failed
|
4
5
|
not_supported_on_guest: Not supported on the guest operating system
|
5
6
|
checking_installation: Checking for Docker Compose installation...
|
6
7
|
installing: Installing Docker Compose
|
@@ -8,7 +8,7 @@ module VagrantPlugins
|
|
8
8
|
def initialize(machine, config, installer = nil, docker_compose = nil)
|
9
9
|
super(machine, config)
|
10
10
|
|
11
|
-
@installer = installer || Installer.new(@machine)
|
11
|
+
@installer = installer || Installer.new(@machine, @config)
|
12
12
|
@docker_compose = docker_compose || DockerCompose.new(@machine, @config)
|
13
13
|
end
|
14
14
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-docker-compose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leigh McCulloch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Vagrant provisioner for docker compose.
|
14
14
|
email:
|