vagrant-host-path 1.3.1 → 1.4.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6383578d8cd3601bc433983eb910130b759d69d5
|
4
|
+
data.tar.gz: 0763278f3b0c33ef561a8c853f7f863b7204040c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f45e7cff43df48400513e9ab08e83fb73cae8293f7a2e08bd5f0e9543086559c10a588faad8135354311753576d22076b96da5bff431126595b31c187a37026
|
7
|
+
data.tar.gz: 3ff8de362d41d7ba3f97d7c91705d3b501ab673474ec1fa556db042d432f70eb3beeb6fcce60ad84bf159a829ca98931fa0f999c01c019bebcb0886071f610c9
|
data/README.md
CHANGED
@@ -36,15 +36,21 @@ And after that you can use the env var within your VM:
|
|
36
36
|
|
37
37
|
```ruby
|
38
38
|
Vagrant::Config.run do |config|
|
39
|
-
|
40
|
-
# The environment key to set
|
41
|
-
config.host_path.env_key = "VAGRANT_HOST_PATH"
|
42
39
|
|
43
|
-
|
44
|
-
|
40
|
+
if Vagrant.has_plugin?("vagrant-host-path")
|
41
|
+
# Enable or disable plugin (enabled by default)
|
42
|
+
config.host_path.enabled = true
|
43
|
+
|
44
|
+
# The environment key to set
|
45
|
+
config.host_path.env_key = "VAGRANT_HOST_PATH"
|
46
|
+
|
47
|
+
# Temp file to save path to
|
48
|
+
config.host_path.path_file = "/tmp/.vagrant-host-path"
|
49
|
+
|
50
|
+
# Profile script path
|
51
|
+
config.host_path.profile_path = "/etc/profile.d/vagrant-host-path.sh"
|
52
|
+
end
|
45
53
|
|
46
|
-
# Profile script path
|
47
|
-
config.host_path.profile_path = "/etc/profile.d/vagrant-host-path.sh"
|
48
54
|
end
|
49
55
|
```
|
50
56
|
|
@@ -1,6 +1,11 @@
|
|
1
1
|
module VagrantPlugins
|
2
2
|
module HostPath
|
3
3
|
class Config < Vagrant.plugin(2, :config)
|
4
|
+
# Is plugin enabled or disabled.
|
5
|
+
#
|
6
|
+
# @return [Bool]
|
7
|
+
attr_accessor :enabled
|
8
|
+
|
4
9
|
# The name of environment variable to set.
|
5
10
|
#
|
6
11
|
# @return [String]
|
@@ -22,6 +27,7 @@ module VagrantPlugins
|
|
22
27
|
attr_accessor :temp_upload_path
|
23
28
|
|
24
29
|
def initialize
|
30
|
+
@enabled = UNSET_VALUE
|
25
31
|
@env_key = UNSET_VALUE
|
26
32
|
@path_file = UNSET_VALUE
|
27
33
|
@profile_path = UNSET_VALUE
|
@@ -29,6 +35,7 @@ module VagrantPlugins
|
|
29
35
|
end
|
30
36
|
|
31
37
|
def finalize!
|
38
|
+
@enabled = true if @enabled == UNSET_VALUE
|
32
39
|
@env_key = "VAGRANT_HOST_PATH" if @env_key == UNSET_VALUE
|
33
40
|
@path_file = "/tmp/.vagrant-host-path" if @path_file == UNSET_VALUE
|
34
41
|
@profile_path = "/etc/profile.d/vagrant-host-path.sh" if @profile_path == UNSET_VALUE
|
@@ -2,6 +2,7 @@ module VagrantPlugins
|
|
2
2
|
module HostPath
|
3
3
|
module Legacy
|
4
4
|
class Config < Vagrant::Config::Base
|
5
|
+
attr_writer :enabled
|
5
6
|
attr_writer :env_key
|
6
7
|
attr_writer :path_file
|
7
8
|
attr_writer :profile_path
|
@@ -9,6 +10,11 @@ module VagrantPlugins
|
|
9
10
|
|
10
11
|
# FIXME: Defaults duplication here!
|
11
12
|
|
13
|
+
def enabled
|
14
|
+
return true if @enabled.nil?
|
15
|
+
@enabled
|
16
|
+
end
|
17
|
+
|
12
18
|
def env_key
|
13
19
|
@env_key || "VAGRANT_HOST_PATH"
|
14
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-host-path
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MOZGIII
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -82,8 +82,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.1
|
85
|
+
rubygems_version: 2.4.1
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: The host path to your project in the environment variable in the VM for Vagrant.
|
89
89
|
test_files: []
|
90
|
+
has_rdoc:
|