vagrant-persistent-storage 0.0.45 → 0.0.46

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: 5f9fcafa3789760470ab50be0e2e1333d521a7bc
4
- data.tar.gz: bbd4c5cb47a8ebb2b2778db8a75f2431dc5305f1
3
+ metadata.gz: 4837fd59327b9bb86feed1bb7a3dd11189573365
4
+ data.tar.gz: 41e3fd130655643213d059181493a245198d6f8b
5
5
  SHA512:
6
- metadata.gz: ed3a10903752658495b0712338a3c344b020c2382a91e6c54a2827288301894949cc9c9810233131c7122b9ce3c73e8b45e0afc072f359d1f3af4a9c6bef2279
7
- data.tar.gz: b4b491e64b4b129ffa2154ac0f06ea1a14f95729f8853bd92a5dcff59c215650019681a10eec739f82214e686ea001097e3d0848b2576a3e30025f54dbd70fd3
6
+ metadata.gz: 354207edfea91e109672e4059fdef1308e0897f70350868a6fc9c4f6d49ca5df799c618c6e18709e875937d1fc8a661670479532b07a8a5ce0d00dae382bcbdc
7
+ data.tar.gz: e845f5e1ec53847b798fbe97568c26f44b104b77fddffb7441c78ba9e85db6cfcd289dd14273a7e01a3ae108cf8cfec68ed8b50cbd6f5f4c8ccc2b72cc5f447b
data/README.md CHANGED
@@ -113,6 +113,7 @@ If your box is not using LVM you must set `config.persistent_storage.use_lvm = f
113
113
  * [Adam Huffman](https://github.com/verdurin)
114
114
  * [caio2k](https://github.com/caio2k)
115
115
  * [Francesco](https://github.com/cisco87)
116
+ * [Dimitris Aragiorgis](https://github.com/dimara)
116
117
 
117
118
  ## TODO
118
119
 
@@ -1,3 +1,4 @@
1
+ require 'log4r'
1
2
  require 'pathname'
2
3
 
3
4
  module VagrantPlugins
@@ -50,6 +51,7 @@ module VagrantPlugins
50
51
  @volgroupname = UNSET_VALUE
51
52
  @drive_letter = UNSET_VALUE
52
53
  @part_type_code = UNSET_VALUE
54
+ @logger = Log4r::Logger.new('vagrant::persistent_storage::config')
53
55
  end
54
56
 
55
57
  def finalize!
@@ -150,6 +152,17 @@ module VagrantPlugins
150
152
  })
151
153
  end
152
154
 
155
+ if ! Pathname.new(machine.config.persistent_storage.location).absolute?
156
+ # Non-absolute paths are relative to machine's root directory (where
157
+ # Vagrantfile is placed). Paths under HOME, e.g., ~/disk.vdi), are
158
+ # expanded as expected.
159
+ new_location = File.expand_path(machine.config.persistent_storage.location, machine.env.root_path)
160
+ @logger.info "Found non-absolute location #{machine.config.persistent_storage.location}. Using location #{new_location} instead."
161
+ machine.config.persistent_storage.location = new_location
162
+ end
163
+
164
+ machine.ui.info "Using #{machine.config.persistent_storage.location} for persistent storage."
165
+
153
166
  if ! File.exists?@location.to_s and ! @create == "true"
154
167
  errors << I18n.t('vagrant_persistent_storage.config.no_create_and_missing', {
155
168
  :config_key => 'persistent_storage.create',
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module PersistentStorage
3
- VERSION = "0.0.45"
3
+ VERSION = "0.0.46"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-persistent-storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.45
4
+ version: 0.0.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Kusnier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-16 00:00:00.000000000 Z
11
+ date: 2019-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake