This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from alpha01/devel
vagrant-notify 0.5.0 initial merge
- Loading branch information
Showing
25 changed files
with
354 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ test/tmp | |
test/version_tmp | ||
tmp | ||
/development/.vagrant | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
language: ruby | ||
bundler_args: --without development | ||
rvm: | ||
- 1.9.3 | ||
- 2.0.0 | ||
- 2.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2012-2014 Fabio Rehm | ||
Copyright (c) 2012-2016 Fabio Rehm | ||
|
||
MIT License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Example notify-send wrapper scripts | ||
|
||
## OS X | ||
|
||
* [terminal-notifier](https://github.com/alloy/terminal-notifier) [wrapper script](https://github.com/alpha01/vagrant-notify/blob/devel/examples/osx/notify-send_terminal-notifier) | ||
|
||
|
||
## Windows | ||
|
||
* [Growl for Windows](http://www.growlforwindows.com/gfw/default.aspx) [wrapper script](https://github.com/alpha01/vagrant-notify/blob/devel/examples/windows/notify-send_growl_for_windows) | ||
|
||
**IMPORTANT:** `notify-send` wrapper script has to be binary executable. Also as with `notify-send`, `growlnotify.exe` needs to be is in your `path`. | ||
|
||
Compiling using ocra: | ||
|
||
ocra --output notify-send windows/notify-send_growl_for_windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env ruby | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
# Example OS X terminal-notifier notify-send wrapper script. | ||
|
||
require 'optparse' | ||
|
||
|
||
options = {} | ||
OptionParser.new do |opts| | ||
opts.on('-u', '--urgency LEVEL') { |v| options[:u] = v } # Option gets removed | ||
opts.on('-t', '--expire-time TIME') { |v| options[:t] = v } # Option gets removed | ||
opts.on('-a', '--app-name APP_NAME') { |v| options[:a] = v } # TO DO: Set to -title | ||
opts.on('-i', '--icon ICON[,ICON...]') { |v| options[:i] = v } # Option gets removed | ||
opts.on('-c', '--category TYPE[,TYPE...]') { |v| options[:c] = v } # Option gets removed | ||
opts.on('-h', '--hint TYPE:NAME:VALUE') { |v| options[:h] = v } # Option gets removed | ||
opts.on('-v', '--version') { |v| options[:v] = v } # Option gets removed | ||
end.parse! | ||
|
||
|
||
if ARGV.length == 0 | ||
puts "No summary specified" | ||
exit 1 | ||
elsif ARGV.length == 1 | ||
message = "-message '\\#{ARGV[0]}'" | ||
elsif ARGV.length == 2 | ||
message = "-title '\\#{ARGV[0]}' -message '\\#{ARGV[1]}'" | ||
else | ||
message = ARGV.map{|a| a =~ /-(title|message)/ ? a : "'\\#{a}'"}.join(' ') | ||
end | ||
|
||
system("terminal-notifier -sound default #{message}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env ruby | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
# Example MS-Windows notify-send wrapper script. Assumes growlnotify.exe is in your 'path'. | ||
|
||
require 'optparse' | ||
|
||
options = {} | ||
OptionParser.new do |opts| | ||
opts.banner = "Usage: notify-send [options]" | ||
|
||
opts.on('-u', '--urgency LEVEL') { |v| options[:u] = v } # TO DO: Set to /p:priority | ||
opts.on('-t', '--expire-time TIME') { |v| options[:t] = v } # Option gets removed | ||
opts.on('-a', '--app-name APP_NAME') { |v| options[:a] = v } # TO DO: Set to /a:application | ||
opts.on('-i', '--icon ICON[,ICON...]') { |v| options[:i] = v } # TO DO: Set to /i:icon (url only) | ||
opts.on('-c', '--category TYPE[,TYPE...]') { |v| options[:c] = v } # Option gets removed | ||
opts.on('-h', '--hint TYPE:NAME:VALUE') { |v| options[:h] = v } # Option gets removed | ||
opts.on('-v', '--version') { |v| options[:v] = v } # Option gets removed | ||
end.parse! | ||
|
||
|
||
|
||
if ARGV.length == 0 | ||
puts "No summary specified" | ||
elsif ARGV.length == 1 | ||
message = "'#{ARGV[0]}'" | ||
system("growlnotify.exe \"#{message}\"") | ||
elsif ARGV.length == 2 | ||
title = "/t:'#{ARGV[0]}'" | ||
message = "'#{ARGV[1]}'" | ||
system("growlnotify.exe \"#{title}\" \"#{message}\"") | ||
else | ||
message = ARGV.map{|a| "'#{a}'"}.join(' ') | ||
system("growlnotify.exe \"#{message}\"") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.