vagrant-bindfs 0.4.4 → 0.4.5

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: ded7690b53fef5f95c0a62e146e84f1ce44e7543
4
- data.tar.gz: 4e52e161ec2787628514b10dc1b0b63da29f0a49
3
+ metadata.gz: 8c9cb598d4be91ddcdc513c9ba7b8e0f2de49f53
4
+ data.tar.gz: e8b99639a3908f00a7af3e5d9f3adcf00ab69031
5
5
  SHA512:
6
- metadata.gz: e25b86d19175e5e9c18f61b318aee9ee61fd5249f7df9a879197601d53a0c1838252a7db7ce40d8a7906ddcfa7b15980135584a9a9a3774bccd794174f57711b
7
- data.tar.gz: 2cfc75f2dbe087ab68628b01ec0012c74c23db968c71d78530221c74c48d05577bea0818b682675b91e48e201cd2839cd8a0d1dd5b9c04beeb6d48b50d6aab77
6
+ metadata.gz: bddf54282ec931287e2174b6298227575b090c649503094c8c341e775ffbc70656ba3a0c39e898460f5cb62a7353d3f7c62a53e3f4414fe48154cf78a054541b
7
+ data.tar.gz: a45308f802f932765f4bb874a5913a5bf2acbffa625f5371e0ec8660531f355f9285944345461941e523622063120a916feafa9ce55f3c74b2a55f1a220f2d54
@@ -36,7 +36,7 @@ module VagrantPlugins
36
36
 
37
37
  binded_folders.each do |id, options|
38
38
 
39
- command = VagrantPlugins::Bindfs::Command.new(@machine, options)
39
+ command = VagrantPlugins::Bindfs::Command.new(@env, options)
40
40
 
41
41
  unless @machine.communicate.test("test -d #{command.source}")
42
42
  @env[:ui].error I18n.t(
@@ -6,8 +6,9 @@ module VagrantPlugins
6
6
  attr_reader :destination
7
7
  attr_reader :arguments
8
8
 
9
- def initialize(machine, options)
10
- @machine = machine
9
+ def initialize(env, options)
10
+ @env = env
11
+ @machine = env[:machine]
11
12
  options = normalize_keys(options)
12
13
 
13
14
  @source = options.delete("source-path")
@@ -70,7 +71,7 @@ module VagrantPlugins
70
71
 
71
72
  # TODO: Update after each bindfs release
72
73
  def available_options
73
- @available_options || begin
74
+ @available_options ||= begin
74
75
  options = {
75
76
  # File ownership
76
77
  "force-user" => { long: ["force-user", "user", "owner"], short: ["u"], type: :option, default: "vagrant" },
@@ -165,8 +166,20 @@ module VagrantPlugins
165
166
 
166
167
  def bindfs_version
167
168
  @bindfs_version ||= begin
168
- bindfs_version = @machine.communicate.execute(%{sudo -i bindfs --version | cut -d" " -f2});
169
- Gem::Version.new(bindfs_version)
169
+ version = catch(:version) do
170
+ [
171
+ %{sudo bindfs --version | cut -d" " -f2},
172
+ %{sudo -i bindfs --version | cut -d" " -f2}
173
+ ].each do |command|
174
+ @machine.communicate.execute(command) do |type, version|
175
+ @env[:ui].info("#{command}: #{version.inspect}") if @machine.config.bindfs.debug
176
+ throw(:version, Gem::Version.new(version)) if Gem::Version.correct?(version)
177
+ end
178
+ end
179
+ Gem::Version.new("0.0")
180
+ end
181
+ @env[:ui].info("Detected bindfs version: #{version}") if @machine.config.bindfs.debug
182
+ version
170
183
  end
171
184
  end
172
185
 
@@ -1,6 +1,6 @@
1
1
  module VagrantPlugins
2
2
  module Bindfs
3
- VERSION = "0.4.4"
3
+ VERSION = "0.4.5"
4
4
  SOURCE_VERSION = "1.13.0"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-bindfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaël-Ian Havard
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-29 00:00:00.000000000 Z
13
+ date: 2015-11-30 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: A Vagrant plugin to automate bindfs mount in the VM. This allow you to
16
16
  change owner, group and permissions on files and, for example, work around NFS share