vagrant-bindfs 1.0.9 → 1.0.10

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: c3119bb4dcd8b43ff0796db6112b9637bfd91bfc
4
- data.tar.gz: a3697c70938dde9420fa018c8bda366b412f9c51
3
+ metadata.gz: b44e609392e7b300f9aefcd61d6afa5cc943425d
4
+ data.tar.gz: 1135fcbae549d91466d5a2831572265cceceb64c
5
5
  SHA512:
6
- metadata.gz: 4a726fd0104714f51e425695b544e2e5b7bca68716ec56744307ce49a4d8f78e4bffe0b2200b534e3e5598d489f602cbe0d7aab8898709ab851e228145eb29d2
7
- data.tar.gz: 107e082a868ec1048ca79098c4bddd10c21e79bdec5fb94730f35f2f64d1e06fc051b4e5ec41f1d0ddfa8c6f54a2d0c1b83dd2bbe69620f4e7f077566fb6a275
6
+ metadata.gz: c79b60b20d2cfe92e2c8d48f58f3bf29ff5166bcf54f2f888549c25454d59639539d2fa001f5763d244890f628370f66ea0e941469bfb30daf8714bc8d6aee61
7
+ data.tar.gz: 598c3cf093444f9c2fcde064ac7d3bfcefec6ce376141bb931a07c9f62d708ce2416472b68245a3a3089e206cfd2a4f56f4d60befbbc018c636e0d4e14e8dce3
data/README.md CHANGED
@@ -61,7 +61,7 @@ Vagrant.configure("2") do |config|
61
61
 
62
62
  ## Advanced options
63
63
  config.bindfs.bind_folder "source/dir", "mount/point",
64
- perms: "u=rw:g=r:o=r",
64
+ perms: "u=rw:g=r:o=r", # http://bindfs.org/docs/bindfs.1.html#sect12
65
65
  create_as_user: true
66
66
 
67
67
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module VagrantBindfs
4
4
  module Bindfs
5
- SOURCE_VERSION = '1.13.7'
5
+ SOURCE_VERSION = '1.13.9'
6
6
  SOURCE_URLS = [
7
7
  'http://bindfs.org/downloads/bindfs-%<bindfs_version>.tar.gz',
8
8
  'http://bindfs.dy.fi/downloads/bindfs-%<bindfs_version>.tar.gz'
@@ -23,17 +23,26 @@ module VagrantBindfs
23
23
  end
24
24
 
25
25
  def format_argument(name, value)
26
- definition = argument_definition(name)
26
+ send("format_#{argument_type(name)}", name, value)
27
+ end
28
+
29
+ def format_flag(name, value)
30
+ return unless !!value
31
+ compatible_name = argument_compatible_name(name)
32
+ (argument_shorthand_only?(name) ? "-#{compatible_name}" : "--#{compatible_name}")
33
+ end
34
+
35
+ def format_option(name, value)
27
36
  compatible_name = argument_compatible_name(name)
37
+ (argument_shorthand_only?(name) ? "-#{compatible_name} #{value}" : "--#{compatible_name}=#{value}")
38
+ end
39
+
40
+ def argument_type(name)
41
+ argument_definition(name)['type']
42
+ end
28
43
 
29
- if definition['type'] == 'flag' && !!value
30
- return "-#{compatible_name}" if definition['long'].empty? # Shorthand only options
31
- return "--#{compatible_name}"
32
- end
33
- if definition['type'] == 'option'
34
- return "-#{compatible_name} #{value}" if definition['long'].empty? # Shorthand only options
35
- return "--#{compatible_name}=#{value}"
36
- end
44
+ def argument_shorthand_only?(name)
45
+ argument_definition(name)['long'].empty?
37
46
  end
38
47
 
39
48
  def argument_definition(name)
@@ -39,6 +39,10 @@
39
39
  "xattr-ro": { "long": ["xattr-ro"], "short": [], "type": "flag", "since": "0.0.1" },
40
40
  "xattr-rw": { "long": ["xattr-rw"], "short": [], "type": "flag", "since": "0.0.1" },
41
41
 
42
+ // Other file operations
43
+ "delete-deny": { "long": ["delete-deny"], "short": [], "type": "flag", "since": "1.13.9" },
44
+ "rename-deny": { "long": ["rename-deny"], "short": [], "type": "flag", "since": "1.13.9" },
45
+
42
46
  // Rate limits
43
47
  "read-rate": { "long": ["read-rate"], "short": [], "type": "option", "since": "1.12.6" },
44
48
  "write-rate": { "long": ["write-rate"], "short": [], "type": "option", "since": "1.12.6" },
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'enumerator'
4
3
  require 'forwardable'
5
4
 
6
5
  module VagrantBindfs
@@ -31,7 +31,7 @@ module VagrantBindfs
31
31
  bindfs_version = guest.capability(:bindfs_bindfs_version)
32
32
  bindfs_full_path = guest.capability(:bindfs_bindfs_full_path)
33
33
 
34
- binded_folders(hook).each do |_, folder|
34
+ binded_folders(hook).each_value do |folder|
35
35
  folder.reverse_merge!(config.default_options)
36
36
  folder.to_version!(bindfs_version)
37
37
 
@@ -3,12 +3,12 @@
3
3
  module VagrantBindfs
4
4
  module Vagrant
5
5
  class Config < ::Vagrant.plugin('2', :config)
6
- attr_accessor :debug
6
+ attr_reader :debug
7
7
 
8
8
  attr_accessor :bindfs_version
9
- attr_accessor :install_bindfs_from_source
9
+ attr_reader :install_bindfs_from_source
10
10
 
11
- attr_accessor :default_options
11
+ attr_reader :default_options
12
12
  attr_accessor :binded_folders
13
13
 
14
14
  attr_accessor :skip_validations
@@ -20,9 +20,10 @@ module VagrantBindfs
20
20
  @install_bindfs_from_source = false
21
21
 
22
22
  @binded_folders = {}
23
- @default_options = Bindfs::OptionSet.new(nil, 'force-user' => 'vagrant',
24
- 'force-group' => 'vagrant',
25
- 'perms' => 'u=rwX:g=rD:o=rD')
23
+ @default_options = Bindfs::OptionSet.new(nil,
24
+ 'force-user' => 'vagrant',
25
+ 'force-group' => 'vagrant',
26
+ 'perms' => 'u=rwX:g=rD:o=rD')
26
27
 
27
28
  @skip_validations = []
28
29
  end
@@ -75,7 +76,7 @@ module VagrantBindfs
75
76
  def validate(_machine)
76
77
  errors = _detected_errors
77
78
 
78
- binded_folders.each do |_, folder|
79
+ binded_folders.each_value do |folder|
79
80
  validator = Bindfs::Validators::Config.new(folder)
80
81
  errors << validator.errors unless validator.valid?
81
82
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VagrantBindfs
4
- VERSION = '1.0.9'
4
+ VERSION = '1.0.10'
5
5
  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: 1.0.9
4
+ version: 1.0.10
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: 2017-09-04 00:00:00.000000000 Z
13
+ date: 2017-12-01 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: " A Vagrant plugin to automate bindfs mount in the VM. This allow you
16
16
  to change owner, group and permissions on files and, for example, work around NFS