vagrant-notifier 0.1.0
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 +7 -0
- data/.gitignore +19 -0
- data/Gemfile +15 -0
- data/LICENSE +22 -0
- data/README.md +21 -0
- data/Rakefile +1 -0
- data/Vagrantfile +3 -0
- data/lib/vagrant-notifier/notifier.rb +23 -0
- data/lib/vagrant-notifier/plugin.rb +18 -0
- data/lib/vagrant-notifier.rb +6 -0
- data/vagrant-notifier.gemspec +24 -0
- metadata +96 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fe004442c929526562c24a360661342785247c6e
|
4
|
+
data.tar.gz: 6c36b930e13dd17e3e58f7c31b929ec1dd7ed7fe
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 41a24eb8eb3f05826eb9be29b9b6511314a12448b56786a5384965e408b67f4cddaacdef97955cd77ef7a54d0f2e48ac7bcf5d11961e62fc1adae9c6ac073c71
|
7
|
+
data.tar.gz: a159b183b5c5d9bf2824bc7669615979d2cae77f1e958ecbf542fe72268012e60e0ea578b962ef8cb4f8f8ff64122da70a812cc324b0059cc8b16b0939feb630
|
data/.gitignore
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
group :development do
|
6
|
+
# We depend on Vagrant for development, but we don't add it as a
|
7
|
+
# gem dependency because we expect to be installed within the
|
8
|
+
# Vagrant environment itself using `vagrant plugin`.
|
9
|
+
gem 'vagrant', github: 'mitchellh/vagrant'
|
10
|
+
end
|
11
|
+
|
12
|
+
group :plugins do
|
13
|
+
gem 'vagrant-notifier', path: '.'
|
14
|
+
gem 'pry'
|
15
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Robert Coleman
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Vagrant::Notifier
|
2
|
+
|
3
|
+
For Vagrant 1.5+.
|
4
|
+
|
5
|
+
Sends a notification via [TerminalNotifier](https://github.com/alloy/terminal-notifier) when `$ vagrant up` is finished.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
`$ vagrant plugin install vagrant-notifier`
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
It's automatic just `$ vagrant up`!
|
14
|
+
|
15
|
+
## Contributing
|
16
|
+
|
17
|
+
1. Fork it
|
18
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
19
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
20
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
21
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/Vagrantfile
ADDED
@@ -0,0 +1,23 @@
|
|
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
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'terminal-notifier'
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module VagrantNotifier
|
5
|
+
class Plugin < ::Vagrant.plugin('2')
|
6
|
+
VAGRANT_VERSION_REQUIREMENT = '>= 1.5.0'
|
7
|
+
|
8
|
+
name 'vagrant-notifier'
|
9
|
+
description 'Send a notification when a Vagrant up is completed.'
|
10
|
+
|
11
|
+
action_hook(:notify_on_up, :machine_action_up) do |hook|
|
12
|
+
require_relative 'notifier'
|
13
|
+
hook.append(Notifier)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'vagrant-notifier'
|
7
|
+
spec.version = '0.1.0'
|
8
|
+
spec.authors = ['Robert Coleman']
|
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.}
|
12
|
+
spec.homepage = 'https://github.com/rjocoleman/vagrant-notifier'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
21
|
+
spec.add_development_dependency 'rake'
|
22
|
+
|
23
|
+
spec.add_dependency 'terminal-notifier', '~> 1.6.0'
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-notifier
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Robert Coleman
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: terminal-notifier
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.6.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.6.0
|
55
|
+
description: Send a notification when a Vagrant up is completed.
|
56
|
+
email:
|
57
|
+
- github@robert.net.nz
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- Gemfile
|
64
|
+
- LICENSE
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- Vagrantfile
|
68
|
+
- lib/vagrant-notifier.rb
|
69
|
+
- lib/vagrant-notifier/notifier.rb
|
70
|
+
- lib/vagrant-notifier/plugin.rb
|
71
|
+
- vagrant-notifier.gemspec
|
72
|
+
homepage: https://github.com/rjocoleman/vagrant-notifier
|
73
|
+
licenses:
|
74
|
+
- MIT
|
75
|
+
metadata: {}
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options: []
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
requirements: []
|
91
|
+
rubyforge_project:
|
92
|
+
rubygems_version: 2.2.2
|
93
|
+
signing_key:
|
94
|
+
specification_version: 4
|
95
|
+
summary: Send a notification when a Vagrant up is completed.
|
96
|
+
test_files: []
|