vagrant-notifier 0.1.0 → 0.1.1
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/README.md +1 -1
- data/Vagrantfile +1 -0
- data/lib/vagrant-notifier/action.rb +14 -0
- data/lib/vagrant-notifier/plugin.rb +7 -7
- data/vagrant-notifier.gemspec +3 -3
- metadata +5 -5
- data/lib/vagrant-notifier/notifier.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7351b416dbfe291570d219ab9f8f65cb194e30ef
|
4
|
+
data.tar.gz: 95e89a7ef077375610a3649aee138e74865911ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bed45745796e3652c65b042b524405a2d9bf9981a596878af3860b8b4327fe1f70d6dd1bc917c4bcbba4a9bb76b5993f9010513d9808d3c2cea5116a368844aa
|
7
|
+
data.tar.gz: 0bbe1625a04cc3662970ba7682124a149327502d64f25814fed211e256f575b94da74e986422571841f11ef0c44f377276e7431a7ae643de41d97ca2512a37ce
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
For Vagrant 1.5+.
|
4
4
|
|
5
|
-
Sends a notification via [TerminalNotifier](https://github.com/alloy/terminal-notifier) when `$ vagrant
|
5
|
+
Sends a notification via [TerminalNotifier](https://github.com/alloy/terminal-notifier) when `$ vagrant` is finished.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
data/Vagrantfile
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module VagrantNotifier
|
3
|
+
class Notifier
|
4
|
+
def initialize(app, env)
|
5
|
+
@app = app
|
6
|
+
end
|
7
|
+
|
8
|
+
def call(env)
|
9
|
+
TerminalNotifier.notify("Vagrant run is done \xF0\x9F\x9A\x80", title: 'Vagrant')
|
10
|
+
@app.call(env)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -3,15 +3,15 @@ require 'terminal-notifier'
|
|
3
3
|
module VagrantPlugins
|
4
4
|
module VagrantNotifier
|
5
5
|
class Plugin < ::Vagrant.plugin('2')
|
6
|
-
|
6
|
+
VAGRANT_VERSION_REQUIREMENT = '>= 1.5.0'
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
name 'vagrant-notifier'
|
9
|
+
description 'Send a notification when running a Vagrant command is completed.'
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
action_hook(:notify_on_up, :environment_unload) do |hook|
|
12
|
+
require_relative 'action'
|
13
|
+
hook.prepend(Notifier)
|
14
|
+
end
|
15
15
|
|
16
16
|
end
|
17
17
|
end
|
data/vagrant-notifier.gemspec
CHANGED
@@ -4,11 +4,11 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'vagrant-notifier'
|
7
|
-
spec.version = '0.1.
|
7
|
+
spec.version = '0.1.1'
|
8
8
|
spec.authors = ['Robert Coleman']
|
9
9
|
spec.email = ['github@robert.net.nz']
|
10
|
-
spec.summary = %q{Send a notification when a Vagrant
|
11
|
-
spec.description = %q{Send a notification when a Vagrant
|
10
|
+
spec.summary = %q{Send a notification when a Vagrant command is completed.}
|
11
|
+
spec.description = %q{Send a notification when a Vagrant command is completed.}
|
12
12
|
spec.homepage = 'https://github.com/rjocoleman/vagrant-notifier'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Coleman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.6.0
|
55
|
-
description: Send a notification when a Vagrant
|
55
|
+
description: Send a notification when a Vagrant command is completed.
|
56
56
|
email:
|
57
57
|
- github@robert.net.nz
|
58
58
|
executables: []
|
@@ -66,7 +66,7 @@ files:
|
|
66
66
|
- Rakefile
|
67
67
|
- Vagrantfile
|
68
68
|
- lib/vagrant-notifier.rb
|
69
|
-
- lib/vagrant-notifier/
|
69
|
+
- lib/vagrant-notifier/action.rb
|
70
70
|
- lib/vagrant-notifier/plugin.rb
|
71
71
|
- vagrant-notifier.gemspec
|
72
72
|
homepage: https://github.com/rjocoleman/vagrant-notifier
|
@@ -92,5 +92,5 @@ rubyforge_project:
|
|
92
92
|
rubygems_version: 2.2.2
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
|
-
summary: Send a notification when a Vagrant
|
95
|
+
summary: Send a notification when a Vagrant command is completed.
|
96
96
|
test_files: []
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module VagrantPlugins
|
2
|
-
module VagrantNotifier
|
3
|
-
class Notifier
|
4
|
-
def initialize(app, env)
|
5
|
-
@app = app
|
6
|
-
end
|
7
|
-
|
8
|
-
def call(env)
|
9
|
-
@machine = env[:machine]
|
10
|
-
notify
|
11
|
-
@app.call(env)
|
12
|
-
end
|
13
|
-
|
14
|
-
protected
|
15
|
-
|
16
|
-
def notify
|
17
|
-
machine_name = @machine.config.vm.hostname || @machine.config.vm.box
|
18
|
-
@machine.ui.success 'Running Terminal Notifier'
|
19
|
-
TerminalNotifier.notify("#{machine_name} is up \xF0\x9F\x9A\x80", title: 'Vagrant')
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|