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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe004442c929526562c24a360661342785247c6e
4
- data.tar.gz: 6c36b930e13dd17e3e58f7c31b929ec1dd7ed7fe
3
+ metadata.gz: 7351b416dbfe291570d219ab9f8f65cb194e30ef
4
+ data.tar.gz: 95e89a7ef077375610a3649aee138e74865911ac
5
5
  SHA512:
6
- metadata.gz: 41a24eb8eb3f05826eb9be29b9b6511314a12448b56786a5384965e408b67f4cddaacdef97955cd77ef7a54d0f2e48ac7bcf5d11961e62fc1adae9c6ac073c71
7
- data.tar.gz: a159b183b5c5d9bf2824bc7669615979d2cae77f1e958ecbf542fe72268012e60e0ea578b962ef8cb4f8f8ff64122da70a812cc324b0059cc8b16b0939feb630
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 up` is finished.
5
+ Sends a notification via [TerminalNotifier](https://github.com/alloy/terminal-notifier) when `$ vagrant` is finished.
6
6
 
7
7
  ## Installation
8
8
 
@@ -1,3 +1,4 @@
1
1
  Vagrant.configure('2') do |config|
2
2
  config.vm.box = 'precise64'
3
+ config.vm.provision :shell, inline: 'echo foo'
3
4
  end
@@ -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
- VAGRANT_VERSION_REQUIREMENT = '>= 1.5.0'
6
+ VAGRANT_VERSION_REQUIREMENT = '>= 1.5.0'
7
7
 
8
- name 'vagrant-notifier'
9
- description 'Send a notification when a Vagrant up is completed.'
8
+ name 'vagrant-notifier'
9
+ description 'Send a notification when running a Vagrant command is completed.'
10
10
 
11
- action_hook(:notify_on_up, :machine_action_up) do |hook|
12
- require_relative 'notifier'
13
- hook.append(Notifier)
14
- end
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
@@ -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.0'
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 up is completed.}
11
- spec.description = %q{Send a notification when a Vagrant up is completed.}
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.0
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-14 00:00:00.000000000 Z
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 up is completed.
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/notifier.rb
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 up is completed.
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