ngrok-tunnel 2.0.17 → 2.0.20
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +8 -5
- data/lib/ngrok/tunnel.rb +1 -0
- data/lib/ngrok/tunnel/version.rb +1 -1
- data/spec/tunnel/tunnel_spec.rb +12 -2
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b2baef8128147cadcb6858143c00c4380bff8f2
|
4
|
+
data.tar.gz: 84784c4e4992ee324434e010223bcda7d856c199
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd86f77e18570238f54aafe6797b241fc1f2d09e17a45748d5025a99d8af9e490659640fc5929c760be5f03be959e8b382ecc743ef4499135663ed177cf6839a
|
7
|
+
data.tar.gz: deeaaad3b014a8676bea57e55cda44eb44b4b480b762a7538f92ad6ae54885b06998b6e1859b307a941ed88e83bcfd4372bcc02442fd21e04825032c615b24af
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
# Ngrok::Tunnel
|
2
2
|
|
3
|
-
Ngrok-tunnel gem is a ruby wrapper for ngrok
|
3
|
+
Ngrok-tunnel gem is a ruby wrapper for ngrok v2.
|
4
4
|
|
5
5
|
[](http://badge.fury.io/rb/ngrok-tunnel) [](https://codeclimate.com/github/bogdanovich/ngrok-tunnel)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
+
*Note:* You must have ngrok v2+ installed available in your `PATH`.
|
10
|
+
|
9
11
|
Add this line to your application's Gemfile:
|
10
12
|
|
11
13
|
```ruby
|
@@ -61,10 +63,11 @@ Ngrok::Tunnel.stop
|
|
61
63
|
|
62
64
|
```ruby
|
63
65
|
# ngrok custom parameters
|
64
|
-
Ngrok::Tunnel.start(port: 3333,
|
65
|
-
subdomain: 'MY_SUBDOMAIN',
|
66
|
-
|
67
|
-
|
66
|
+
Ngrok::Tunnel.start(port: 3333,
|
67
|
+
subdomain: 'MY_SUBDOMAIN',
|
68
|
+
hostname: 'MY_HOSTNAME',
|
69
|
+
authtoken: 'MY_TOKEN',
|
70
|
+
log: 'ngrok.log',
|
68
71
|
config: '~/.ngrok')
|
69
72
|
|
70
73
|
```
|
data/lib/ngrok/tunnel.rb
CHANGED
@@ -75,6 +75,7 @@ module Ngrok
|
|
75
75
|
exec_params = "-log=stdout -log-level=debug "
|
76
76
|
exec_params << "-authtoken=#{@params[:authtoken]} " if @params[:authtoken]
|
77
77
|
exec_params << "-subdomain=#{@params[:subdomain]} " if @params[:subdomain]
|
78
|
+
exec_params << "-hostname=#{@params[:hostname]} " if @params[:hostname]
|
78
79
|
exec_params << "-config=#{@params[:config]} #{@params[:port].to_i} > #{@params[:log].path}"
|
79
80
|
end
|
80
81
|
|
data/lib/ngrok/tunnel/version.rb
CHANGED
data/spec/tunnel/tunnel_spec.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
describe Ngrok::Tunnel do
|
3
3
|
|
4
4
|
describe "Before start" do
|
5
|
-
|
5
|
+
|
6
6
|
it "should not be running" do
|
7
7
|
expect(Ngrok::Tunnel.running?).to be false
|
8
8
|
end
|
@@ -75,4 +75,14 @@ describe Ngrok::Tunnel do
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
|
78
|
+
describe "Custom hostname" do
|
79
|
+
it "should fail without authtoken" do
|
80
|
+
expect {Ngrok::Tunnel.start(hostname: 'example.com')}.to raise_error
|
81
|
+
end
|
82
|
+
|
83
|
+
it "should fail with incorrect authtoken" do
|
84
|
+
expect {Ngrok::Tunnel.start(hostname: 'example.com', authtoken: 'incorrect_token')}.to raise_error
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ngrok-tunnel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Bogdanovich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -89,6 +89,7 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- .gitignore
|
91
91
|
- .rspec
|
92
|
+
- CHANGELOG.md
|
92
93
|
- Gemfile
|
93
94
|
- LICENSE.txt
|
94
95
|
- README.md
|
@@ -125,3 +126,4 @@ summary: Ngrok-tunnel gem is a ruby wrapper for ngrok
|
|
125
126
|
test_files:
|
126
127
|
- spec/spec_helper.rb
|
127
128
|
- spec/tunnel/tunnel_spec.rb
|
129
|
+
has_rdoc:
|