vagrant-notify 0.5.2 → 0.5.3
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 +4 -4
- data/CHANGELOG.md +16 -1
- data/README.md +10 -18
- data/examples/README.md +32 -8
- data/examples/osx/{notify-send_growl_for_mac → growl_for_mac/notify-send.rb} +0 -0
- data/examples/osx/{notify-send_terminal-notifier → terminal-notifier/notify-send.rb} +0 -0
- data/examples/windows/{notify-send_growl_for_windows → growl_for_windows/notify-send.rb} +0 -0
- data/examples/windows/notification-center/notify-send.ps1 +93 -0
- data/examples/windows/{notify-send_snarl → snarl/notify-send.rb} +0 -0
- data/lib/vagrant-notify/action.rb +2 -1
- data/lib/vagrant-notify/action/install_command.rb +2 -1
- data/lib/vagrant-notify/action/notify_provisioning_status.rb +12 -3
- data/lib/vagrant-notify/action/server_is_running.rb +4 -0
- data/lib/vagrant-notify/action/set_shared_folder.rb +1 -1
- data/lib/vagrant-notify/action/start_server.rb +2 -2
- data/lib/vagrant-notify/action/stop_server.rb +1 -0
- data/lib/vagrant-notify/command.rb +11 -6
- data/lib/vagrant-notify/config.rb +0 -2
- data/lib/vagrant-notify/version.rb +1 -1
- data/spec/action/install_command_spec.rb +0 -1
- data/spec/action/server_is_running_spec.rb +1 -1
- data/spec/action/start_server_spec.rb +2 -2
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f220061039ad0bc6f804c6561f05ae7c8bed22c1
|
4
|
+
data.tar.gz: 5d602de0a1ad6a73f2de0276971c3851cd98661e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eefc2a70255f14d573238f69e78d097e143e4b401653255cf2e0ae1f848f4b0ae8df6e265deb82fbe1c083819d54f55b4be271aa91aa8dcaeeae91a9fd2d488e
|
7
|
+
data.tar.gz: 211c6257ee813b170a21ab18a05c5bcf0505e331dc8cac93041923036dac5f338b8124bd7e220af0e9d4b114e783f826e039b6bad4b73b691b4e3566dfcf5f3f
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,22 @@
|
|
1
|
+
## [0.5.3](https://github.com/fgrehm/vagrant-notify/compare/v0.5.2...v0.5.3) (November 18, 2016)
|
2
|
+
IMPROVEMENTS
|
3
|
+
|
4
|
+
- Command line operations work on multi-VM configurations.
|
5
|
+
- Notification when provisioning fails. [[GH-23]](https://github.com/fgrehm/vagrant-notify/issues/23)
|
6
|
+
- Do not start notification server if the guest is not running or has not been created.
|
7
|
+
- New Windows 10 notify-send notification center PowerShell script.
|
8
|
+
|
9
|
+
BUG FIXES
|
10
|
+
|
11
|
+
- Correctly identify guest shared folder capability. [[GH-31]](https://github.com/fgrehm/vagrant-notify/issues/31)
|
12
|
+
- Properly manually restart notification server.
|
13
|
+
- Don't send notify-send notices to host when doing a provision if plugin is disabled.
|
14
|
+
|
15
|
+
|
1
16
|
## [0.5.2](https://github.com/fgrehm/vagrant-notify/compare/v0.5.1...v0.5.2) (October 7, 2016)
|
2
17
|
IMPROVEMENTS
|
3
18
|
|
4
|
-
- Support for docker, lxc,
|
19
|
+
- Support for docker, lxc, parallels, and vmware fusion providers. [[GH-13]](https://github.com/fgrehm/vagrant-notify/issues/13)
|
5
20
|
- More reliable notification server status notices.
|
6
21
|
- New `bind_ip` configuration option.
|
7
22
|
|
data/README.md
CHANGED
@@ -42,41 +42,33 @@ Since Linux distributions have `notify-send` pre-installed, everything should wo
|
|
42
42
|
|
43
43
|
### OS X
|
44
44
|
|
45
|
-
You will need to create a `notify-send` script, available on `$PATH`. The script can forward the message to either
|
46
|
-
[Growl](http://growl.info/) with [GrowlNotify](http://growl.info/downloads) (version 1.2.2 is free but unreliable)
|
47
|
-
or to the [Notification Center](http://support.apple.com/kb/HT5362) available on OS X 10.8+
|
48
|
-
using f.ex. [terminal-notifier](https://github.com/alloy/terminal-notifier).
|
49
|
-
|
50
|
-
A (too) primitive script integrating with Growl:
|
51
|
-
|
52
|
-
```bash
|
53
|
-
#!/bin/bash
|
54
|
-
growlnotify -t "Vagrant VM" -m "$*"
|
55
|
-
```
|
56
|
-
|
57
45
|
Check out our OS X notify-send compatible [scripts](https://github.com/fgrehm/vagrant-notify/tree/master/examples#os-x).
|
58
46
|
|
59
47
|
### Windows (beta)
|
60
48
|
|
61
|
-
You can use the freeware application [notify-send for Windows](http://vaskovsky.net/notify-send/), make sure the notify-send binary is available on `Path`.
|
62
|
-
|
63
49
|
Check out our Windows notify-send compatible [scripts](https://github.com/fgrehm/vagrant-notify/tree/master/examples#windows).
|
64
50
|
|
65
51
|
## Configuration
|
66
52
|
|
67
|
-
Notification server is enabled by default on all guests. You can individually disable the plugin by adding
|
53
|
+
Notification server is enabled by default on all guests. You can individually disable the plugin by adding a false boolean to the ***notify.enable*** option in your `Vagrantfile` configuration block
|
68
54
|
|
69
55
|
```ruby
|
70
|
-
|
56
|
+
Vagrant.configure(2) do |config|
|
57
|
+
config.vm.box = "ubuntu/trusty64"
|
58
|
+
config.notify.enable = false
|
59
|
+
end
|
71
60
|
```
|
72
61
|
|
73
62
|
_Please note that as of v0.5.1, the notification server will automatically be disabled for any of the following
|
74
63
|
[cloud providers](lib/vagrant-notify/plugin.rb#L77-L79)._
|
75
64
|
|
76
|
-
By default, the notification server is binded to [local interfaces](lib/vagrant-notify/plugin.rb#L82-L86). For networking different than your provider's default network configuration, you can use the
|
65
|
+
By default, the notification server is binded to [local interfaces](lib/vagrant-notify/plugin.rb#L82-L86). For networking different than your provider's default network configuration, you can use the ***notify.bind\_ip*** configuration option to bind the notification server onto a different local ip address.
|
77
66
|
|
78
67
|
```ruby
|
79
|
-
|
68
|
+
Vagrant.configure(2) do |config|
|
69
|
+
config.vm.box = "ubuntu/trusty64"
|
70
|
+
config.notify.bind_ip = "192.68.56.20"
|
71
|
+
end
|
80
72
|
```
|
81
73
|
|
82
74
|
**WARNING**
|
data/examples/README.md
CHANGED
@@ -1,22 +1,46 @@
|
|
1
1
|
# Example notify-send wrapper scripts
|
2
2
|
|
3
|
+
You will need to create a `notify-send` script, available on `$PATH`.
|
4
|
+
A (too) primitive script integrating with Growl for OS X:
|
5
|
+
|
6
|
+
```bash
|
7
|
+
#!/bin/bash
|
8
|
+
growlnotify -t "Vagrant VM" -m "$*"
|
9
|
+
```
|
10
|
+
|
11
|
+
|
3
12
|
## OS X
|
4
13
|
|
5
|
-
|
6
|
-
|
14
|
+
The `notify-send` script can forward the message to either
|
15
|
+
[Growl](http://growl.info/) with [GrowlNotify](http://growl.info/downloads) (version 1.2.2 is free but unreliable)
|
16
|
+
or to the [Notification Center](http://support.apple.com/kb/HT5362) available on OS X 10.8+
|
17
|
+
using f.ex. [terminal-notifier](https://github.com/alloy/terminal-notifier).
|
18
|
+
|
19
|
+
|
20
|
+
* [terminal-notifier wrapper script](https://github.com/fgrehm/vagrant-notify/blob/master/examples/osx/terminal-notifier/notify-send.rb)
|
21
|
+
* [growlnotify wrapper script](https://github.com/fgrehm/vagrant-notify/blob/master/examples/osx/growl_for_mac/notify-send.rb)
|
7
22
|
|
8
23
|
|
9
24
|
## Windows
|
10
25
|
|
11
|
-
|
12
|
-
|
26
|
+
You can use the freeware application [notify-send for Windows](http://vaskovsky.net/notify-send/), make sure the notify-send binary is available on `Path`. Or you can create your own notify-send program and compile it to an .exe binary executable.
|
27
|
+
|
28
|
+
|
29
|
+
Compile using ocra:
|
30
|
+
|
31
|
+
ocra --output notify-send examples/windows/snarl/notify-send.rb
|
32
|
+
|
33
|
+
|
34
|
+
* [Growl for Windows wrapper script](https://github.com/fgrehm/vagrant-notify/blob/master/examples/windows/growl_for_windows/notify-send.rb) (`growlnotify.exe` needs to be is in your `Path`.)
|
35
|
+
* [Snarl wrapper script](https://github.com/fgrehm/vagrant-notify/blob/master/examples/windows/snarl/notify-send.rb)
|
13
36
|
|
14
|
-
|
37
|
+
### Windows 10
|
15
38
|
|
39
|
+
You can use our [wrapper script](https://github.com/fgrehm/vagrant-notify/blob/master/examples/windows/notification-center/notify-send.ps1) to send messages to the native Windows 10 notification center.
|
16
40
|
|
17
|
-
|
41
|
+
Compile using [PS1toEXE](https://github.com/aravindvcyber/PS1toEXE):
|
18
42
|
|
19
|
-
|
43
|
+
ps c:> .\PS1toEXE.ps1 -inputfile examples/windows/notification-center/notify-send.ps1 notify-send.exe
|
20
44
|
|
21
45
|
|
22
|
-
* [
|
46
|
+
* [Notification Center](https://github.com/fgrehm/vagrant-notify/blob/master/examples/windows/notification-center/notify-send.ps1)
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,93 @@
|
|
1
|
+
|
2
|
+
# Example Windows 10 Notification Center notify-send wrapper PowerShell script. (I apologize if you find this script a bit messy, PowerShell is not my forte)
|
3
|
+
|
4
|
+
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
|
5
|
+
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] > $null
|
6
|
+
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
|
7
|
+
|
8
|
+
$arguments = @{};
|
9
|
+
$non_opt = @();
|
10
|
+
$title = "";
|
11
|
+
$message = "";
|
12
|
+
$icon = "";
|
13
|
+
$help = "Usage:
|
14
|
+
notify-send [Options][body]
|
15
|
+
-i, --icon ICON
|
16
|
+
--help
|
17
|
+
";
|
18
|
+
|
19
|
+
|
20
|
+
for ( $i = 0; $i -lt $args.count; $i++ ) {
|
21
|
+
switch -regex ($args[ $i ]) {
|
22
|
+
"^\-u=" { $arguments.Add("-u", $args[ $i ]); } # Option gets ignored
|
23
|
+
"^\-u$" { $arguments.Add("-u", $args[ $i+1 ]); $i+=1; } # Option gets ignored
|
24
|
+
"^\-\-urgency=" { $arguments.Add("-u", $args[ $i ]); } # Option gets ignored
|
25
|
+
"^\-\-urgency$" { $arguments.Add("-u", $args[ $i+1 ]); $i+=1; } # Option gets ignored
|
26
|
+
"^\-t=" { $arguments.Add("-t", $args[ $i ]); } # Option gets ignored
|
27
|
+
"^\-t$" { $arguments.Add("-t", $args[ $i+1 ]); $i+=1; } # Option gets ignored
|
28
|
+
"^\-\-expire\-time=" { $arguments.Add("-t", $args[ $i ]); } # Option gets ignored
|
29
|
+
"^\-\-expire\-time$" { $arguments.Add("-t", $args[ $i+1 ]); $i+=1; } # Option gets ignored
|
30
|
+
"^\-a=" { $arguments.Add("-a", $args[ $i ]); } # Option gets ignored
|
31
|
+
"^\-a$" { $arguments.Add("-a", $args[ $i+1 ]); $i+=1; } # Option gets ignored
|
32
|
+
"^\-\-app\-name=" { $arguments.Add("-a", $args[ $i ]); } # Option gets ignored
|
33
|
+
"^\-\-app\-name$" { $arguments.Add("-a", $args[ $i+1 ]); $i+=1; } # Option gets ignored
|
34
|
+
"^\-i=(.*)" { $args[ $i ] -match '=(.*)'; $arguments.Add("-i", $matches[1]); }
|
35
|
+
"^\-i$" { $arguments.Add("-i", $args[ $i+1 ]); $i+=1; }
|
36
|
+
"^\-\-icon=" { $args[ $i ] -match '=(.*)'; $arguments.Add("-i", $matches[1]); }
|
37
|
+
"^\-\-icon$" { $arguments.Add("-i", $args[ $i +1]); $i+=1; }
|
38
|
+
"^\-h=" { $arguments.Add("-h", $args[ $i ]); } # Option gets ignored
|
39
|
+
"^\-h$" { $arguments.Add("-h", $args[ $i+1 ]); $i+=1; } # Option gets ignored
|
40
|
+
"^\-\-hint=" { $arguments.Add("-h", $args[ $i ]); } # Option gets ignored
|
41
|
+
"^\-\-hint$" { $arguments.Add("-h", $args[ $i+1 ]); $i+=1; } # Option gets ignored
|
42
|
+
"^\-v$" { $arguments.Add("-v", "vagrant-notify"); } # Option gets ignored
|
43
|
+
"^\-\-version$" { $arguments.Add("-v", "vagrant-notify"); } # Option gets ignored
|
44
|
+
"^\-\-help$" { $arguments.Add("--help", $help); }
|
45
|
+
default { $non_opt += $args[ $i ]; }
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
#Write-Host "Num Args:" $args.Length;
|
50
|
+
#Write-Host "CLI is: " $arguments.Count;
|
51
|
+
#Write-Host "MSG is: " $non_opt.Count;
|
52
|
+
|
53
|
+
If ($arguments.Get_Item("--help")) {
|
54
|
+
Write-Host $help
|
55
|
+
exit 1;
|
56
|
+
}
|
57
|
+
If ($arguments.Get_Item("-i")) {
|
58
|
+
$icon = $arguments."-i";
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
If ($args.Length -eq 0 ) {
|
63
|
+
Write-Host "No Summary Specified";
|
64
|
+
exit 1;
|
65
|
+
|
66
|
+
} ElseIf ($non_opt.Count -eq 1) {
|
67
|
+
$message = $non_opt[0];
|
68
|
+
|
69
|
+
If($arguments.Get_Item("-i")) { $icon = $arguments."-i"; }
|
70
|
+
|
71
|
+
} ElseIf ($non_opt.Count -eq 2) {
|
72
|
+
$title = $non_opt[0];
|
73
|
+
$message = $non_opt[1];
|
74
|
+
|
75
|
+
If($arguments.Get_Item("-i")) { $icon = $arguments."-i"; }
|
76
|
+
|
77
|
+
} ElseIf ($non_opt.Length -gt 2) {
|
78
|
+
Write-Host "Invalid number of options";
|
79
|
+
exit 1;
|
80
|
+
|
81
|
+
} Else {
|
82
|
+
Write-Host $help
|
83
|
+
exit 1;
|
84
|
+
}
|
85
|
+
|
86
|
+
|
87
|
+
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
|
88
|
+
$template = "<toast><visual><binding template=`"ToastImageAndText02`"><image id=`"1`" src=`"$icon`" alt=`"image`"/><text id=`"1`">$title</text><text id=`"2`">$message</text></binding></visual></toast>"
|
89
|
+
|
90
|
+
$xml.LoadXml($template)
|
91
|
+
$toast = New-Object Windows.UI.Notifications.ToastNotification $xml
|
92
|
+
|
93
|
+
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("(notify-send)").Show($toast)
|
File without changes
|
@@ -31,7 +31,8 @@ module Vagrant
|
|
31
31
|
if env3[:result]
|
32
32
|
env3[:machine].ui.success("vagrant-notify-server pid: #{env3[:notify_data][:pid]}")
|
33
33
|
else
|
34
|
-
env3[:machine].ui.error("Unable to start notification server using #{env3[:
|
34
|
+
env3[:machine].ui.error("Unable to start notification server using #{env3[:notify_data][:bind_ip]}")
|
35
|
+
env3[:notify_data][:pid] = env3[:notify_data][:port] = env3[:notify_data][:bind_ip] = nil
|
35
36
|
end
|
36
37
|
end
|
37
38
|
end
|
@@ -19,8 +19,9 @@ module Vagrant
|
|
19
19
|
|
20
20
|
def compile_command(env, template_file)
|
21
21
|
host_port = env[:notify_data][:port]
|
22
|
+
client_ip = env[:notify_data][:bind_ip]
|
22
23
|
provider_name = env[:machine].provider_name
|
23
|
-
template_binding = OpenStruct.new(:host_port => host_port, :shared_folder => '/tmp/vagrant-notify', :provider_name => provider_name, :client_ip =>
|
24
|
+
template_binding = OpenStruct.new(:host_port => host_port, :shared_folder => '/tmp/vagrant-notify', :provider_name => provider_name, :client_ip => client_ip)
|
24
25
|
command_template = ERB.new(Vagrant::Notify.files_path.join(template_file).read)
|
25
26
|
command = command_template.result(template_binding.instance_eval { binding })
|
26
27
|
|
@@ -7,9 +7,18 @@ module Vagrant
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def call(env)
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
|
11
|
+
system("notify-send '[#{env[:machine].name}] Provisioning with \"#{env[:provisioner_name]}\"...'") unless env[:machine].config.notify.enable == false
|
12
|
+
|
13
|
+
begin
|
14
|
+
@app.call(env)
|
15
|
+
rescue => msg
|
16
|
+
system("notify-send '[#{env[:machine].name}] \"#{env[:provisioner_name]}\" provision failed!'") unless env[:machine].config.notify.enable == false
|
17
|
+
env[:machine].ui.error("#{msg}")
|
18
|
+
else
|
19
|
+
system("notify-send '[#{env[:machine].name}] Finished provisioning with \"#{env[:provisioner_name]}\"'") unless env[:machine].config.notify.enable == false
|
20
|
+
end
|
21
|
+
|
13
22
|
end
|
14
23
|
end
|
15
24
|
end
|
@@ -12,6 +12,10 @@ module Vagrant
|
|
12
12
|
def call(env)
|
13
13
|
env[:result] = valid_process?(env[:notify_data][:pid])
|
14
14
|
|
15
|
+
unless env[:notify_data][:bind_ip]
|
16
|
+
env[:notify_data][:bind_ip] = env[:machine].config.notify.bind_ip if env[:machine].config.notify.bind_ip.is_a?(String)
|
17
|
+
end
|
18
|
+
|
15
19
|
# Call the next if we have one (but we shouldn't, since this
|
16
20
|
# middleware is built to run with the Call-type middlewares)
|
17
21
|
@app.call env
|
@@ -14,7 +14,7 @@ module Vagrant
|
|
14
14
|
env[:machine].config.vm.synced_folder host_dir, "/tmp/vagrant-notify", id: "vagrant-notify"
|
15
15
|
end
|
16
16
|
@app.call(env)
|
17
|
-
rescue
|
17
|
+
rescue Vagrant::Errors::GuestCapabilityNotFound
|
18
18
|
env[:machine].ui.warn("vagrant-notify: guest does not support the shared folder capability.")
|
19
19
|
end
|
20
20
|
end
|
@@ -20,10 +20,10 @@ module Vagrant
|
|
20
20
|
|
21
21
|
return if env[:machine].config.notify.enable == false
|
22
22
|
|
23
|
-
port = next_available_port(env[:
|
23
|
+
port = next_available_port(env[:notify_data][:bind_ip])
|
24
24
|
|
25
25
|
if which('ruby')
|
26
|
-
env[:notify_data][:pid] = Process.spawn("ruby #{dir}/server.rb #{id} #{port} #{env[:
|
26
|
+
env[:notify_data][:pid] = Process.spawn("ruby #{dir}/server.rb #{id} #{port} #{env[:notify_data][:bind_ip]} #{provider_name}")
|
27
27
|
env[:notify_data][:port] = port
|
28
28
|
|
29
29
|
sleep 5
|
@@ -27,40 +27,45 @@ module Vagrant
|
|
27
27
|
argv = parse_options(opts)
|
28
28
|
|
29
29
|
with_target_vms(argv, options) do |machine|
|
30
|
+
|
31
|
+
if machine.state.id != :running
|
32
|
+
@env.ui.info("Guest '#{machine.name}' is not running.")
|
33
|
+
next
|
34
|
+
end
|
35
|
+
|
30
36
|
if options[:help]
|
31
37
|
@env.ui.info(opts)
|
32
|
-
return 0
|
33
38
|
end
|
39
|
+
|
34
40
|
if options[:status] || options.length == 0
|
35
41
|
@env.action_runner.run(Vagrant::Notify::Action.action_status_server, {
|
36
42
|
:machine => machine,
|
37
43
|
})
|
38
|
-
return 0
|
39
44
|
end
|
45
|
+
|
40
46
|
if options[:stop]
|
41
47
|
@env.action_runner.run(Vagrant::Notify::Action.action_stop_server, {
|
42
48
|
:machine => machine,
|
43
49
|
})
|
44
|
-
return 0
|
45
50
|
end
|
51
|
+
|
46
52
|
if options[:start]
|
47
53
|
@env.action_runner.run(Vagrant::Notify::Action.action_start_server, {
|
48
54
|
:machine => machine,
|
49
55
|
})
|
50
|
-
return 0
|
51
56
|
end
|
57
|
+
|
52
58
|
if options[:restart]
|
53
59
|
@env.action_runner.run(Vagrant::Notify::Action.action_stop_server, {
|
54
60
|
:machine => machine,
|
61
|
+
:notify_restart => true
|
55
62
|
})
|
56
63
|
@env.action_runner.run(Vagrant::Notify::Action.action_start_server, {
|
57
64
|
:machine => machine,
|
58
65
|
})
|
59
|
-
return 0
|
60
66
|
end
|
61
67
|
end
|
62
68
|
end
|
63
|
-
|
64
69
|
end
|
65
70
|
end
|
66
71
|
end
|
@@ -5,7 +5,6 @@ module Vagrant
|
|
5
5
|
|
6
6
|
def initialize()
|
7
7
|
@enable = UNSET_VALUE
|
8
|
-
@bind_ip = UNSET_VALUE
|
9
8
|
end
|
10
9
|
|
11
10
|
def validate(machine)
|
@@ -45,7 +44,6 @@ module Vagrant
|
|
45
44
|
|
46
45
|
def finalize!
|
47
46
|
@enable = 0 if @enable == UNSET_VALUE
|
48
|
-
@bind_ip = @bind_ip if @bind_ip == UNSET_VALUE
|
49
47
|
end
|
50
48
|
|
51
49
|
private
|
@@ -17,7 +17,6 @@ describe Vagrant::Notify::Action::InstallCommand do
|
|
17
17
|
let(:guest_tmp_path) { '/tmp/notify-send' }
|
18
18
|
let(:guest_path) { '/usr/bin/notify-send' }
|
19
19
|
let(:stubbed_template) { ERB.new('<%= host_port %>') }
|
20
|
-
let(:stubbed_template2) { ERB.new('<%= provider_name %>') }
|
21
20
|
|
22
21
|
subject { described_class.new(app, env) }
|
23
22
|
|
@@ -4,7 +4,7 @@ require 'vagrant-notify/action/server_is_running'
|
|
4
4
|
|
5
5
|
describe Vagrant::Notify::Action::ServerIsRunning do
|
6
6
|
let(:app) { lambda { |env| } }
|
7
|
-
let(:env) { {notify_data: {pid: pid}} }
|
7
|
+
let(:env) { {notify_data: {pid: pid, bind_ip: "127.0.0.1"}} }
|
8
8
|
|
9
9
|
subject { described_class.new(app, env) }
|
10
10
|
|
@@ -6,12 +6,12 @@ require 'vagrant-notify/server'
|
|
6
6
|
|
7
7
|
describe Vagrant::Notify::Action::StartServer do
|
8
8
|
let(:app) { lambda { |env| } }
|
9
|
-
let(:config) { mock(notify: stub(enable: true
|
9
|
+
let(:config) { mock(notify: stub(enable: true)) }
|
10
10
|
let(:ui) { mock(success: true)}
|
11
11
|
let(:id) { '425e799c-1293-4939-bo39-263lcc7457e8' }
|
12
12
|
let(:provider_name) { 'virtualbox' }
|
13
13
|
let(:machine) { mock(state: stub(id: :stopped), ui: ui, id: id, config: config, provider_name: provider_name) }
|
14
|
-
let(:env) { {notify_data: {}, machine: machine} }
|
14
|
+
let(:env) { {notify_data: {bind_ip: "127.0.0.1"}, machine: machine} }
|
15
15
|
let(:pid) { '42' }
|
16
16
|
let(:port) { '1234' }
|
17
17
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-notify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Rehm
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A Vagrant plugin that forwards `notify-send` from guest to host machine
|
15
15
|
and notifies provisioning status
|
@@ -32,10 +32,11 @@ files:
|
|
32
32
|
- Rakefile
|
33
33
|
- development/Vagrantfile
|
34
34
|
- examples/README.md
|
35
|
-
- examples/osx/notify-
|
36
|
-
- examples/osx/notify-
|
37
|
-
- examples/windows/notify-
|
38
|
-
- examples/windows/notify-
|
35
|
+
- examples/osx/growl_for_mac/notify-send.rb
|
36
|
+
- examples/osx/terminal-notifier/notify-send.rb
|
37
|
+
- examples/windows/growl_for_windows/notify-send.rb
|
38
|
+
- examples/windows/notification-center/notify-send.ps1
|
39
|
+
- examples/windows/snarl/notify-send.rb
|
39
40
|
- files/notify-send.erb
|
40
41
|
- lib/vagrant-notify.rb
|
41
42
|
- lib/vagrant-notify/action.rb
|