vagrant-docker-compose 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b0ad9c2e32007e51691db771fab5bbeb04f9cdd
4
- data.tar.gz: 5de670f69c4e3fdcf27dad723636ecdfe7328039
3
+ metadata.gz: ec0c779c611426816ec4cf201f08bc9dbd623d76
4
+ data.tar.gz: 8294a0fd3a95b6797c1a2a6f726e5a4d5bc76538
5
5
  SHA512:
6
- metadata.gz: 8e584a42e3351050b0134bad62e1acc18714f18a18b1b69d589a8f66c60a5bed26344f9a29c88d6235471bff26b5a7b2c668dd585294d1dbc02bddbe97501d61
7
- data.tar.gz: 4506e290a756648a6811272845a44e93feb042f5cac967a2c35984c2d161c3a15f9c79821aa28db1864a4452f2d70989f6a7fa5787b9476e6ad6beb8578fc292
6
+ metadata.gz: 7be92c16845f98d12be8b311c2c68f81c60030fa640a802aeca05fd418b9aeaecf0e01d640ee9815a8984fa3591d390df08d942645d14b64d432b77ea0b4f999
7
+ data.tar.gz: 796485b45d0973e7a2952e369decf74cc515427423b7a321ec1c3a309b993e81b7b7108479d69331c6824301964a75f3ef7f40a7b115fa53ebea4d55d3929e67
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
4
  group :development do
5
- gem "vagrant", git: "https://github.com/mitchellh/vagrant.git", tag: "v1.7.2"
5
+ gem "vagrant", git: "https://github.com/mitchellh/vagrant.git", tag: "v1.7.4"
6
6
  end
7
7
 
8
8
  group :plugins do
@@ -3,12 +3,21 @@ module VagrantPlugins
3
3
  module Cap
4
4
  module Linux
5
5
  module DockerComposeSetProjectName
6
+ ROOT_PROFILE_FILE_NAME = "~/.profile"
7
+ PROFILE_FILE_NAME = "~/.profile_vagrant-docker-compose_compose-project-name"
8
+
6
9
  def self.docker_compose_set_project_name(machine, config)
7
10
  return if config.project_name.nil?
8
11
  machine.communicate.tap do |comm|
9
- export_command = "echo \"export COMPOSE_PROJECT_NAME='#{config.project_name}'\" >> ~/.profile"
10
- comm.execute(export_command)
11
- comm.sudo(export_command)
12
+ export_command = "export COMPOSE_PROJECT_NAME='#{config.project_name}'"
13
+ export_injection_command = "echo \"#{export_command}\" > #{PROFILE_FILE_NAME}"
14
+ comm.execute(export_injection_command)
15
+ comm.sudo(export_injection_command)
16
+
17
+ source_command = "source #{PROFILE_FILE_NAME}"
18
+ source_injection_command = "if ! grep -q \"#{source_command}\" #{ROOT_PROFILE_FILE_NAME} ; then echo \"#{source_command}\" >> #{ROOT_PROFILE_FILE_NAME} ; fi"
19
+ comm.execute(source_injection_command)
20
+ comm.sudo(source_injection_command)
12
21
  end
13
22
  end
14
23
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module DockerComposeProvisioner
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
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.6
4
+ version: 0.0.7
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-11-12 00:00:00.000000000 Z
11
+ date: 2015-11-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Vagrant provisioner for docker compose.
14
14
  email:
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  version: '0'
59
59
  requirements: []
60
60
  rubyforge_project:
61
- rubygems_version: 2.4.3
61
+ rubygems_version: 2.4.8
62
62
  signing_key:
63
63
  specification_version: 4
64
64
  summary: A Vagrant provisioner for docker compose.