vagrant-foodshow 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/README.md +2 -2
- data/lib/vagrant-foodshow/config.rb +9 -8
- data/lib/vagrant-foodshow/util/ngrok_config.rb +13 -0
- data/lib/vagrant-foodshow/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70bb757fb91620373f0ff8ed75fc4a6a9f491f10
|
4
|
+
data.tar.gz: bb922e878f3e8e9ce9f50afa0d1055bb216f6251
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3e07cc7476493280b46f45631913d475c93c9b3793e7424c8b491e9d5854517d56c7cbff07dd4c926a87e847e5cabff62b1e57e3c63e84529b4555c71982678
|
7
|
+
data.tar.gz: 290de7d390ffed5d5aab9de8b70e61268680bbaec105cd9f6f48adb5fd902799e05176c3994442f3317f94b08bb54dcaaa971d4202aa38ca4a929847209e443a
|
data/Gemfile
CHANGED
@@ -3,9 +3,10 @@ source 'https://rubygems.org'
|
|
3
3
|
gem 'rake'
|
4
4
|
|
5
5
|
group :development do
|
6
|
-
gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git", :tag => "v1.
|
6
|
+
gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git", :tag => "v1.6.3"
|
7
7
|
end
|
8
8
|
|
9
9
|
group :plugins do
|
10
|
+
gem "vagrant-parallels", :git => "https://github.com/Parallels/vagrant-parallels"
|
10
11
|
gemspec
|
11
12
|
end
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ Ngrok tunnel can operate in TCP and HTTP modes. In HTTP tunnel mode `ngrok` prov
|
|
13
13
|
|
14
14
|
### Ngrok installation
|
15
15
|
|
16
|
-
You should go to [ngrok.com](http://ngrok.com) and download ngrok binary for your system.
|
16
|
+
You should go to [ngrok.com](http://ngrok.com) and download ngrok binary for your system. Vagrant-foodshow will search ngrok binary in PATH. `~/bin/ngrok` will be used if no ngrok binary in PATH. To disable search you may set `foodshow.ngrok_bin` option (See [Advanced tunnel example](#advanced-tunnel-example)).
|
17
17
|
|
18
18
|
### Plugin installation
|
19
19
|
|
@@ -132,7 +132,7 @@ Read this document if you want to start self-hosted server https://github.com/in
|
|
132
132
|
Option | Default | Scope | Purpose
|
133
133
|
-------|---------|---------|--------
|
134
134
|
`enabled` | `false` | config | Enable foodshow plugin
|
135
|
-
`ngrok_bin` |
|
135
|
+
`ngrok_bin` | `nil` | config+tunnel | By default vagrant-foodshow will search ngrok binary in PATH, then at ~/bin/ngrok. You may override this behavior by setting this option
|
136
136
|
`forward_ssh` | `false` | config | Automatically search and forward vagrant ssh guest port (authtoken required)
|
137
137
|
`timeout` | `10` | config | Max waiting time for establishing tunnel
|
138
138
|
`authtoken` | `nil` | config+tunnel | Auth token. Required for TCP tunnels and some functions (Go to [ngrok.com](http://ngrok.com) to get authkey)
|
@@ -58,13 +58,14 @@ module VagrantPlugins
|
|
58
58
|
|
59
59
|
def validate(machine)
|
60
60
|
errors = _detected_errors
|
61
|
-
|
62
|
-
errors << "
|
63
|
-
"
|
64
|
-
" You can
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
61
|
+
if @ngrok_bin == UNSET_VALUE
|
62
|
+
errors << "Ngrok binary not found!\n"\
|
63
|
+
" Make sure you have downloaded ngrok binary from http://ngrok.com\n"\
|
64
|
+
" You can do this:\n"\
|
65
|
+
" 1) Add directory with ngrok binary your PATH\n"\
|
66
|
+
" 2) Aut ngrok binary in ~/bin/ngrok\n"\
|
67
|
+
" 3) Set ngrok binary location with option foodshow.ngrok_bin in your vagrant file\n\n"\
|
68
|
+
" You can read docs at http://github.com/express42/vagrant-foodshow"
|
68
69
|
end
|
69
70
|
|
70
71
|
unless @authtoken
|
@@ -87,7 +88,7 @@ module VagrantPlugins
|
|
87
88
|
end
|
88
89
|
|
89
90
|
def finalize!
|
90
|
-
@ngrok_bin = ::
|
91
|
+
@ngrok_bin = VagrantPlugins::Foodshow::Util::NgrokConfig.where_ngrok if @ngrok_bin == UNSET_VALUE
|
91
92
|
|
92
93
|
@trust_host_root_certs = nil if @trust_host_root_certs == UNSET_VALUE
|
93
94
|
@server_addr = nil if @server_addr == UNSET_VALUE
|
@@ -4,6 +4,19 @@ module VagrantPlugins
|
|
4
4
|
class NgrokConfig
|
5
5
|
NGROK_ALLOWED_OPTIONS = %w(authtoken hostname httpauth proto subdomain host port server_addr trust_host_root_certs)
|
6
6
|
|
7
|
+
def self.where_ngrok
|
8
|
+
cmd = 'ngrok'
|
9
|
+
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
|
10
|
+
ENV['PATH'].split(::File::PATH_SEPARATOR).each do |path|
|
11
|
+
exts.each { |ext|
|
12
|
+
exe = ::File.join(path, "#{cmd}#{ext}")
|
13
|
+
return exe if ::File.executable?(exe) && !File.directory?(exe)
|
14
|
+
}
|
15
|
+
end
|
16
|
+
return ::File.expand_path('~/bin/ngrok') if ::File.executable?(::File.expand_path('~/bin/ngrok'))
|
17
|
+
return VagrantPlugins::Foodshow::Config::UNSET_VALUE
|
18
|
+
end
|
19
|
+
|
7
20
|
def self.build_cmd(config)
|
8
21
|
cmd = config.delete(:ngrok_bin) + " -log=stdout"
|
9
22
|
host = config.delete(:host)
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-foodshow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Borzykh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.5'
|
27
27
|
description: You can share your vagrant vm with your colleagues easily by using vagrant-foodshow
|
@@ -31,7 +31,7 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
- .gitignore
|
34
|
+
- ".gitignore"
|
35
35
|
- Gemfile
|
36
36
|
- MIT-LICENSE
|
37
37
|
- README.md
|
@@ -55,17 +55,17 @@ require_paths:
|
|
55
55
|
- lib
|
56
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- -
|
58
|
+
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
62
|
requirements:
|
63
|
-
- -
|
63
|
+
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
67
|
rubyforge_project: vagrant-foodshow
|
68
|
-
rubygems_version: 2.
|
68
|
+
rubygems_version: 2.4.1
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: You can share your vagrant vm with your colleagues easily by using vagrant-foodshow
|