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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: faca40f252fe4f78be3d5e14af996de57d8ee1fd
4
- data.tar.gz: 5f96ad690b353a50ecbfda8ba33c5e567767fda1
3
+ metadata.gz: c523463b71cbc013067f6af3699389c4cff64bfe
4
+ data.tar.gz: 3a6cb9f2127feb957c8d3f6633f91c0e4e7198f0
5
5
  SHA512:
6
- metadata.gz: 080fbe00ebf0061ad8a1ea808b5bf55d49df0080976424b19ac757827e5b7b1053ee2bdd4bccc59a7bd6a9d7e74850a366b627a2e7abe006d4bf0e42f2eb05df
7
- data.tar.gz: a7431ad91c83e591e041c460851f268bda7ca755f3be5dd3a362743d183e4c13c22a935f55111cb346e3bea4a3e7edf920d4e13ae5407230217b8bc4867411bd
6
+ metadata.gz: 7f5f99af343dc707ffbfa79fb78fa20d57a418b1cce1e40e0497d08d4a9a8422e7b278ba7e951440377fa6cbc91a9f91199535de46f516a70d944c8a1a90b504
7
+ data.tar.gz: fe0b106e493c83b4bd1b84e40ef228564e7205be7474034cbaaf0000f2ec095bd15affb257eb5f9d11040fa562087deae295de67b78a88bff298f70c02497161
data/.gitignore CHANGED
@@ -35,3 +35,7 @@ Gemfile.lock
35
35
  .rvmrc
36
36
 
37
37
  .idea
38
+
39
+ # vim tmp files
40
+ *.swp
41
+ *.swo
data/Gemfile CHANGED
@@ -1,5 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
+ gemspec
4
+
3
5
  group :development do
4
6
  gem "vagrant", git: "https://github.com/mitchellh/vagrant.git"
5
7
  end
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/[my-github-username]/vagrant-portinfo/fork )
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('2', :command)
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
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Portinfo
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  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.6
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-04-17 00:00:00.000000000 Z
11
+ date: 2015-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler