vagrant-winnfsd 1.0.1 → 1.0.2
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.
- data/CHANGELOG +7 -0
- data/bin/setupfirewall.vbs +3 -2
- data/lib/vagrant-winnfsd/plugin.rb +3 -2
- data/lib/vagrant-winnfsd/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG
CHANGED
data/bin/setupfirewall.vbs
CHANGED
@@ -1,3 +1,4 @@
|
|
1
1
|
Set UAC = CreateObject("Shell.Application")
|
2
|
-
|
3
|
-
UAC.ShellExecute "netsh", Replace(WScript.Arguments(
|
2
|
+
For count = 0 to (WScript.Arguments.Count - 1)
|
3
|
+
UAC.ShellExecute "netsh", Replace(WScript.Arguments(count), "'", Chr(34)), "", "runas", 1
|
4
|
+
Next
|
@@ -38,17 +38,18 @@ module VagrantPlugins
|
|
38
38
|
I18n.load_path << File.expand_path('locales/en.yml', VagrantWinNFSd.source_root)
|
39
39
|
I18n.reload!
|
40
40
|
|
41
|
-
rule_name = "VagrantWinNFSd"
|
41
|
+
rule_name = "VagrantWinNFSd-".concat(VagrantPlugins::VagrantWinNFSd::VERSION)
|
42
42
|
program = VagrantWinNFSd.get_path_for_file("winnfsd.exe")
|
43
43
|
rule_exist = "netsh advfirewall firewall show rule name=\"%s\">nul"
|
44
44
|
|
45
45
|
unless system(sprintf(rule_exist, rule_name))
|
46
|
+
cleanup_rule = "advfirewall firewall delete rule name='winnfsd.exe'"
|
46
47
|
rule = "advfirewall firewall add rule name='%s' dir='%s' action=allow protocol=any program='%s' profile=any"
|
47
48
|
in_rule = sprintf(rule, rule_name, 'in', program)
|
48
49
|
out_rule = sprintf(rule, rule_name, 'out', program)
|
49
50
|
|
50
51
|
firewall_script = VagrantWinNFSd.get_path_for_file("setupfirewall.vbs")
|
51
|
-
firewall_rule = "cscript //nologo #{firewall_script} \"#{in_rule}\" \"#{out_rule}\""
|
52
|
+
firewall_rule = "cscript //nologo #{firewall_script} \"#{cleanup_rule}\" \"#{in_rule}\" \"#{out_rule}\""
|
52
53
|
|
53
54
|
unless system(firewall_rule)
|
54
55
|
puts I18n.t("vagrant_winnfsd.firewall.error")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-winnfsd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -52,7 +52,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
52
52
|
version: '0'
|
53
53
|
segments:
|
54
54
|
- 0
|
55
|
-
hash:
|
55
|
+
hash: 1057374543
|
56
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
version: '0'
|
62
62
|
segments:
|
63
63
|
- 0
|
64
|
-
hash:
|
64
|
+
hash: 1057374543
|
65
65
|
requirements: []
|
66
66
|
rubyforge_project:
|
67
67
|
rubygems_version: 1.8.28
|