ngrok-tunnel 2.0.17 → 2.0.20

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: 345b50b29647280a25cfffc5a9760f1ce997e880
4
- data.tar.gz: 321b8283dc66b52c8c090d5010a0564f3cedc681
3
+ metadata.gz: 1b2baef8128147cadcb6858143c00c4380bff8f2
4
+ data.tar.gz: 84784c4e4992ee324434e010223bcda7d856c199
5
5
  SHA512:
6
- metadata.gz: 2214165863141c199b46937b81cea71c6ae9c7a26079999707b668ff2249bb3627077fe0c276b338d984fa5782457665a8380928059a89ce6795081e4365b734
7
- data.tar.gz: 409b12c367b4c52a4d1582b79b69ce6dbdcdc1d6d0d67a949d7c985b4518299bbcbcea262e24b8e934d6c700d308fca3168fb91207eda72f269a1026f814b95e
6
+ metadata.gz: dd86f77e18570238f54aafe6797b241fc1f2d09e17a45748d5025a99d8af9e490659640fc5929c760be5f03be959e8b382ecc743ef4499135663ed177cf6839a
7
+ data.tar.gz: deeaaad3b014a8676bea57e55cda44eb44b4b480b762a7538f92ad6ae54885b06998b6e1859b307a941ed88e83bcfd4372bcc02442fd21e04825032c615b24af
@@ -0,0 +1,7 @@
1
+ ## 2.0.20
2
+
3
+ - Added support for custom hostname
4
+
5
+ ## 2.0.16
6
+
7
+ - Supports ngrok v2.0.16
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
  [![Gem Version](https://badge.fury.io/rb/ngrok-tunnel.svg)](http://badge.fury.io/rb/ngrok-tunnel) [![Code Climate](https://codeclimate.com/github/bogdanovich/ngrok-tunnel/badges/gpa.svg)](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
- authtoken: 'MY_TOKEN',
67
- log: 'ngrok.log',
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
  ```
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  module Ngrok
2
2
  class Tunnel
3
- VERSION = "2.0.17"
3
+ VERSION = "2.0.20"
4
4
  end
5
5
  end
@@ -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
- end
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.17
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-06-11 00:00:00.000000000 Z
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: