vagrant-address 0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: df04df6b6dee6501743d4e6eb22fb9de71c97e85
4
+ data.tar.gz: 85c5423af7f31519b7313adcb453634de87836f4
5
+ SHA512:
6
+ metadata.gz: d7dcf97416e27cf3b0def20278619810605e626e830d288a70f7294ead3dfb44f57a615c8d0b60c923cf5cf71758fc5a80a30cc5a2626da0863acdaa0822ada2
7
+ data.tar.gz: f87da989642b7ac2e87a1a7bd6b700fc88c5802f5aece0ea4762bd87e9e62baccfdc88a5fc2ecaacfccc5a052c38af05f374a01c7de44f1f5c170bdedd529739
data/.gitignore ADDED
@@ -0,0 +1,26 @@
1
+ .idea/
2
+ *.iml
3
+ *.gem
4
+ *.rbc
5
+ .bundle
6
+ .config
7
+ .yardoc
8
+ Gemfile.lock
9
+ InstalledFiles
10
+ _yardoc
11
+ coverage
12
+ doc/
13
+ lib/bundler/man
14
+ pkg
15
+ rdoc
16
+ spec/reports
17
+ test/tmp
18
+ test/version_tmp
19
+ tmp
20
+ *.bundle
21
+ *.so
22
+ *.o
23
+ *.a
24
+ mkmf.log
25
+ Vagrantfile
26
+ .vagrant/
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.2.3
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ ruby '2.2.3'
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'bundler', '1.10.6'
6
+
7
+ group :development do
8
+ gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git', :tag => 'v1.8.0'
9
+ end
10
+
11
+ group :plugins do
12
+ gem 'vagrant-address', path: '.'
13
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Michael Kuzmin
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,15 @@
1
+ # vagrant-address plugin
2
+ This plugin allows obtaining a public IP address of a guest machine.
3
+ - compatible with machines started remotely, i.e. by vSphere or AWS providers,
4
+ - supports multi-machine environments.
5
+
6
+ ## Installation
7
+ $ vagrant plugin install vagrant-address
8
+
9
+ ## Usage
10
+ $ vagrant address [name]
11
+
12
+ ## Using with TeamCity
13
+ Running the command under JetBrains [TeamCity](https://www.jetbrains.com/teamcity/) build, it creates `VAGRANT_ADDRESS` environment variable which can be referenced by following build scripts.
14
+
15
+ **Note:** the variable is added by a [service message](https://confluence.jetbrains.com/display/TCD9/Build+Script+Interaction+with+TeamCity). It requires the command and a build script are placed into separate build steps.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/lib/command.rb ADDED
@@ -0,0 +1,25 @@
1
+ require 'optparse'
2
+
3
+ module VagrantPlugins
4
+ module CommandAddress
5
+ class Command < Vagrant.plugin("2", :command)
6
+ def self.synopsis
7
+ "outputs public IP address of a guest machine"
8
+ end
9
+
10
+ def execute
11
+ opts = OptionParser.new do |o|
12
+ o.banner = "Usage: vagrant address [name]"
13
+ end
14
+ argv = parse_options(opts)
15
+ return if !argv
16
+
17
+ with_target_vms(argv, {:single_target=>true}) do |machine|
18
+ ip = machine.provider.capability(:public_address)
19
+ message = ENV['TEAMCITY_VERSION'] ? "##teamcity[setParameter name='env.VAGRANT_ADDRESS' value='#{ip}']" : ip
20
+ @env.ui.info(message)
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,17 @@
1
+ require "vagrant"
2
+
3
+ module VagrantPlugins
4
+ module CommandAddress
5
+ class Plugin < Vagrant.plugin("2")
6
+ name "address"
7
+ description <<-DESC
8
+ The `address` command outputs a public IP address of a guest machine
9
+ DESC
10
+
11
+ command("address", primary: false) do
12
+ require_relative "command"
13
+ Command
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = 'vagrant-address'
3
+ spec.version = '0.3'
4
+ spec.authors = ['Michael Kuzmin']
5
+ spec.email = ['mkuzmin@gmail.com']
6
+ spec.summary = 'Vagrant plugin for obtaining IP address of a guest machine'
7
+ spec.homepage = 'https://github.com/mkuzmin/vagrant-address'
8
+ spec.license = 'MIT'
9
+
10
+ spec.files = `git ls-files -z`.split("\x0")
11
+ spec.require_paths = ['lib']
12
+
13
+ spec.add_development_dependency 'bundler', '~> 1.6'
14
+ spec.add_development_dependency 'rake'
15
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-address
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.3'
5
+ platform: ruby
6
+ authors:
7
+ - Michael Kuzmin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-12-26 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
+ description:
42
+ email:
43
+ - mkuzmin@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - ".ruby-version"
50
+ - Gemfile
51
+ - LICENSE.txt
52
+ - README.md
53
+ - Rakefile
54
+ - lib/command.rb
55
+ - lib/vagrant-address.rb
56
+ - vagrant-address.gemspec
57
+ homepage: https://github.com/mkuzmin/vagrant-address
58
+ licenses:
59
+ - MIT
60
+ metadata: {}
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 2.4.5.1
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: Vagrant plugin for obtaining IP address of a guest machine
81
+ test_files: []