vagrant-host-path 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/.gitignore +2 -0
- data/LICENSE.txt +22 -22
- data/lib/vagrant-host-path/legacy/config.rb +30 -0
- data/lib/vagrant-host-path/legacy/init.rb +8 -0
- data/lib/vagrant-host-path/legacy/middleware.rb +37 -0
- data/lib/vagrant-host-path/version.rb +1 -1
- data/lib/vagrant_init.rb +1 -0
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MmFlYTFkNWExMGM3MjFlMDk0NTYzYTc2M2YxNjJkNzIwYmIyNTZmMzYxOWE3
|
10
|
-
ZjNhNDM0NWExZmQ4ZjJkZjgwODYxYzhiYTVkMGVmMmZkMDdiNDY3MTJiNzY4
|
11
|
-
NzExMjQ4NjMzYjJjOGY2ZDA4MGNlYWMxYjQxYmEyYzkyNzA1NGQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NWU4ZjhlNzdhM2M0ZjdlNjBlZWJiNTQ3MjM2ZmIxOGUxZWVmNDNiOWRkNjNj
|
14
|
-
YTkwMTljNzg2ZDJmMTQ0YjNlYjZkY2U5YmM5YjZjOWRhNDFmOTEyYWNiYWM3
|
15
|
-
ZmQ3YzIwYWVmZDYwYTA0OTEwNDNmZjkyZjRlOTljOGUzYjU5MWM=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 21cdcb44413dfcfaf808a3c7c37c451729f1bf3e
|
4
|
+
data.tar.gz: 27f36c7768bdff8be90bbb09e52d84843006acae
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: edd500ccab6b9cb39b267758481c76a1a57c8f86f65378cd058b92f4a8ab89a31cd7f57429345d8da8f0b2e840284dd51c1ff1b14b0726c9621a3d9f33ccb903
|
7
|
+
data.tar.gz: d8479c914fb1cbf62800ffa6bbf57d028b77969091efda9b873f6eb92edb65d2e47b0b3c08fc8a6d50d002b71140a1355a0c7c9f954b43fbb57090a2eaea82fa
|
data/.gitignore
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
Copyright (c) 2013 MOZGIII
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
Copyright (c) 2013 MOZGIII
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module HostPath
|
3
|
+
module Legacy
|
4
|
+
class Config < Vagrant::Config::Base
|
5
|
+
attr_writer :env_key
|
6
|
+
attr_writer :path_file
|
7
|
+
attr_writer :profile_path
|
8
|
+
attr_writer :temp_upload_path
|
9
|
+
|
10
|
+
# FIXME: Defaults duplication here!
|
11
|
+
|
12
|
+
def env_key
|
13
|
+
@env_key || "VAGRANT_HOST_PATH"
|
14
|
+
end
|
15
|
+
|
16
|
+
def path_file
|
17
|
+
@path_file || "/tmp/.vagrant-host-path"
|
18
|
+
end
|
19
|
+
|
20
|
+
def profile_path
|
21
|
+
@profile_path || "/etc/profile.d/vagrant-host-path.sh"
|
22
|
+
end
|
23
|
+
|
24
|
+
def temp_upload_path
|
25
|
+
@temp_upload_path || "/tmp/vagrant-host-path-profile.sh"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require "vagrant-host-path/logic"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module HostPath
|
5
|
+
module Legacy
|
6
|
+
class Middleware
|
7
|
+
include Logic
|
8
|
+
|
9
|
+
def initialize(app, env)
|
10
|
+
@app = app
|
11
|
+
end
|
12
|
+
|
13
|
+
def call(env)
|
14
|
+
@vm = env[:vm]
|
15
|
+
setup
|
16
|
+
@app.call(env)
|
17
|
+
end
|
18
|
+
|
19
|
+
protected
|
20
|
+
|
21
|
+
def sudo(command)
|
22
|
+
@vm.channel.sudo(command)
|
23
|
+
end
|
24
|
+
|
25
|
+
def config
|
26
|
+
@vm.config.host_path
|
27
|
+
end
|
28
|
+
|
29
|
+
def setup
|
30
|
+
put_path_file(config, @vm.env.cwd)
|
31
|
+
put_profile_file(config)
|
32
|
+
@vm.ui.success "Host Path set!"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/vagrant_init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "vagrant-host-path/legacy/init"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MOZGIII
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Vagrant plugin that stores the host path to your project in the environment
|
@@ -53,10 +53,14 @@ files:
|
|
53
53
|
- Rakefile
|
54
54
|
- lib/vagrant-host-path.rb
|
55
55
|
- lib/vagrant-host-path/config.rb
|
56
|
+
- lib/vagrant-host-path/legacy/config.rb
|
57
|
+
- lib/vagrant-host-path/legacy/init.rb
|
58
|
+
- lib/vagrant-host-path/legacy/middleware.rb
|
56
59
|
- lib/vagrant-host-path/logic.rb
|
57
60
|
- lib/vagrant-host-path/middleware.rb
|
58
61
|
- lib/vagrant-host-path/plugin.rb
|
59
62
|
- lib/vagrant-host-path/version.rb
|
63
|
+
- lib/vagrant_init.rb
|
60
64
|
- vagrant-host-path.gemspec
|
61
65
|
homepage: https://github.com/MOZGIII/vagrant-host-path
|
62
66
|
licenses:
|
@@ -68,12 +72,12 @@ require_paths:
|
|
68
72
|
- lib
|
69
73
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
74
|
requirements:
|
71
|
-
- -
|
75
|
+
- - '>='
|
72
76
|
- !ruby/object:Gem::Version
|
73
77
|
version: '0'
|
74
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
79
|
requirements:
|
76
|
-
- -
|
80
|
+
- - '>='
|
77
81
|
- !ruby/object:Gem::Version
|
78
82
|
version: '0'
|
79
83
|
requirements: []
|
@@ -83,4 +87,3 @@ signing_key:
|
|
83
87
|
specification_version: 4
|
84
88
|
summary: The host path to your project in the environment variable in the VM for Vagrant.
|
85
89
|
test_files: []
|
86
|
-
has_rdoc:
|