vagrant-portinfo 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/Gemfile +2 -0
- data/README.md +30 -3
- data/lib/vagrant-portinfo/command.rb +3 -4
- data/lib/vagrant-portinfo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c523463b71cbc013067f6af3699389c4cff64bfe
|
4
|
+
data.tar.gz: 3a6cb9f2127feb957c8d3f6633f91c0e4e7198f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f5f99af343dc707ffbfa79fb78fa20d57a418b1cce1e40e0497d08d4a9a8422e7b278ba7e951440377fa6cbc91a9f91199535de46f516a70d944c8a1a90b504
|
7
|
+
data.tar.gz: fe0b106e493c83b4bd1b84e40ef228564e7205be7474034cbaaf0000f2ec095bd15affb257eb5f9d11040fa562087deae295de67b78a88bff298f70c02497161
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Vagrant-portinfo
|
2
2
|
|
3
|
-
Vagrant plugin for displaying forwarded ports. Currently, only VirtualBox provider is supported.
|
3
|
+
Vagrant plugin for displaying (currently active) forwarded ports. Currently, only VirtualBox provider is supported.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -11,14 +11,41 @@ $ vagrant plugin install vagrant-portinfo
|
|
11
11
|
## Usage
|
12
12
|
|
13
13
|
```
|
14
|
-
$ vagrant portinfo
|
14
|
+
$ vagrant portinfo [name] [name] ...
|
15
15
|
```
|
16
16
|
|
17
17
|
## Example
|
18
18
|
|
19
|
+
```
|
20
|
+
$ vagrant portinfo
|
21
|
+
default (c516429) running
|
22
|
+
--------------------------------------------------------------------------------
|
23
|
+
guest: 22 host: 2222
|
24
|
+
```
|
25
|
+
|
26
|
+
```
|
27
|
+
$ vagrant portinfo c516429 04e4471
|
28
|
+
default (c516429) running
|
29
|
+
--------------------------------------------------------------------------------
|
30
|
+
guest: 22 host: 2222
|
31
|
+
default (04e4471) running
|
32
|
+
--------------------------------------------------------------------------------
|
33
|
+
guest: 22 host: 2220
|
34
|
+
guest: 80 host: 8080
|
35
|
+
```
|
36
|
+
|
37
|
+
Plugin also supports `--machine-readable` flag:
|
38
|
+
```
|
39
|
+
$ vagrant portinfo --machine-readable
|
40
|
+
1437575900,db,forwarded_port,22,2202
|
41
|
+
1437575900,db,forwarded_port,80,2201
|
42
|
+
1437575900,web,forwarded_port,22,2200
|
43
|
+
1437575900,web,forwarded_port,80,10081
|
44
|
+
```
|
45
|
+
|
19
46
|
## Contributing
|
20
47
|
|
21
|
-
1. Fork it ( https://github.com/
|
48
|
+
1. Fork it ( https://github.com/kuboj/vagrant-portinfo/fork )
|
22
49
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
23
50
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
24
51
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -1,13 +1,11 @@
|
|
1
1
|
module Vagrant
|
2
2
|
module Portinfo
|
3
|
-
class Command < Vagrant.plugin(
|
3
|
+
class Command < Vagrant.plugin("2", :command)
|
4
4
|
def self.synopsis
|
5
5
|
"prints information about ports forwarded of a running machine."
|
6
6
|
end
|
7
7
|
|
8
8
|
def execute
|
9
|
-
# options = {}
|
10
|
-
|
11
9
|
opts = OptionParser.new do |o|
|
12
10
|
o.banner = "Usage: vagrant portinfo [name]"
|
13
11
|
o.separator ''
|
@@ -32,8 +30,9 @@ module Vagrant
|
|
32
30
|
|
33
31
|
machine.provider.driver.read_forwarded_ports(machine.id, true).each do |i|
|
34
32
|
@env.ui.info("guest: #{i[3]}\thost: #{i[2]}")
|
33
|
+
@env.ui.machine("forwarded_port", i[3], i[2], target: machine.name.to_s)
|
35
34
|
end
|
36
35
|
end
|
37
36
|
end
|
38
37
|
end
|
39
|
-
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-portinfo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Jursa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|