vagrant-mos 0.9.35 → 0.9.36

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f5a14ac9c4f71d43f8514527fbb102dfa35e1f5
4
- data.tar.gz: 89bb63ae8b8fcaeeacdcd9e7e546d932e3f6e9e7
3
+ metadata.gz: 4a4d94cccf919335339f9c82b2f1bd1007f86f44
4
+ data.tar.gz: 54b668da5396aa0885c9f2303c7fbc1bce6609e5
5
5
  SHA512:
6
- metadata.gz: ce69197b33127dd3869f5480cfe99a8f5ac3f96ce60ced3ed0c50dc06ef01b0781af47fd6b04e8ca98d3a06e9ac44c3ff620acbcbfe5ec701672117743f278bd
7
- data.tar.gz: 19dd713aca4821191a36d8c6a8f314b2d24152281c63d0b2563880ce07dff6ba1f568848cc2475b76567408726303a58c510b9b12a88393f9f61cee934d082f5
6
+ metadata.gz: b995cc96f7dfad4fa2be932b8ee70d6302f17b379b2245f5b00f26478bfcb65865cba13a2522269fdcbe67e7882ed878efb4e4de9e9e1ad80f447c149ebe5a85
7
+ data.tar.gz: 4a1155b1a9aad3f2a8dc1eb3d9292485adacb90b6dd1d8345442182c1519b81a8a97132444abfb27fc0fcdf8f03077bdf4e98fdc63a1bf91ce35ba204198ab56
@@ -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
@@ -34,6 +34,11 @@ module VagrantPlugins
34
34
  Command
35
35
  end
36
36
 
37
+ synced_folder(:mos) do
38
+ require_relative "synced_folder"
39
+ SyncedFolder
40
+ end
41
+
37
42
  provider(:mos, parallel: true) do
38
43
  # Setup logging and i18n
39
44
  setup_logging
@@ -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
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module MOS
3
- VERSION = '0.9.35'
3
+ VERSION = '0.9.36'
4
4
  end
5
5
  end
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.35
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