vagrant-mos 0.9.35 → 0.9.36
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-mos/action.rb +4 -0
- data/lib/vagrant-mos/plugin.rb +5 -0
- data/lib/vagrant-mos/synced_folder.rb +20 -0
- data/lib/vagrant-mos/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a4d94cccf919335339f9c82b2f1bd1007f86f44
|
4
|
+
data.tar.gz: 54b668da5396aa0885c9f2303c7fbc1bce6609e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b995cc96f7dfad4fa2be932b8ee70d6302f17b379b2245f5b00f26478bfcb65865cba13a2522269fdcbe67e7882ed878efb4e4de9e9e1ad80f447c149ebe5a85
|
7
|
+
data.tar.gz: 4a1155b1a9aad3f2a8dc1eb3d9292485adacb90b6dd1d8345442182c1519b81a8a97132444abfb27fc0fcdf8f03077bdf4e98fdc63a1bf91ce35ba204198ab56
|
data/lib/vagrant-mos/action.rb
CHANGED
@@ -149,6 +149,8 @@ module VagrantPlugins
|
|
149
149
|
b1.use Call, IsStopped do |env2, b2|
|
150
150
|
if env2[:result]
|
151
151
|
b2.use action_prepare_boot
|
152
|
+
b2.use Builtin::SyncedFolderCleanup
|
153
|
+
b2.use Builtin::SyncedFolders
|
152
154
|
b2.use StartInstance # restart this instance
|
153
155
|
else
|
154
156
|
b2.use MessageAlreadyCreated # TODO write a better message
|
@@ -156,6 +158,8 @@ module VagrantPlugins
|
|
156
158
|
end
|
157
159
|
else
|
158
160
|
b1.use action_prepare_boot
|
161
|
+
b1.use Builtin::SyncedFolderCleanup
|
162
|
+
b1.use Builtin::SyncedFolders
|
159
163
|
b1.use RunInstance # launch a new instance
|
160
164
|
end
|
161
165
|
end
|
data/lib/vagrant-mos/plugin.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module MOS
|
3
|
+
class SyncedFolder < Vagrant.plugin("2", :synced_folder)
|
4
|
+
def usable?(machine)
|
5
|
+
# These synced folders only work if the provider is Docker
|
6
|
+
machine.provider_name == :mos
|
7
|
+
end
|
8
|
+
|
9
|
+
def prepare(machine, folders, _opts)
|
10
|
+
# FIXME: Check whether the container has already been created with
|
11
|
+
# different synced folders and let the user know about it
|
12
|
+
folders.each do |id, data|
|
13
|
+
host_path = File.expand_path(data[:hostpath], machine.env.root_path)
|
14
|
+
guest_path = data[:guestpath]
|
15
|
+
machine.provider_config.volumes << "#{host_path}:#{guest_path}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/vagrant-mos/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-mos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yangcs2009
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- lib/vagrant-mos/errors.rb
|
120
120
|
- lib/vagrant-mos/plugin.rb
|
121
121
|
- lib/vagrant-mos/provider.rb
|
122
|
+
- lib/vagrant-mos/synced_folder.rb
|
122
123
|
- lib/vagrant-mos/util/timer.rb
|
123
124
|
- lib/vagrant-mos/version.rb
|
124
125
|
- locales/en.yml
|