Skip to content

gfoiani/ngrok-tunnel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ngrok::Tunnel

Ngrok-tunnel gem is a ruby wrapper for ngrok

Gem Version Code Climate

Installation

Add this line to your application's Gemfile:

gem 'ngrok-tunnel'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ngrok-tunnel

Usage

require 'ngrok/tunnel'

# spawn ngrok (default port 3001)
Ngrok::Tunnel.start

# ngrok local_port
Ngrok::Tunnel.port
=> 3001

# ngrok external url
Ngrok::Tunnel.ngrok_url
=> "http://aaa0e65.ngrok.com"

Ngrok::Tunnel.ngrok_url_https
=> "https://aaa0e65.ngrok.com"

Ngrok::Tunnel.running?
=> true

Ngrok::Tunnel.stopped?
=> false

# ngrok process id
Ngrok::Tunnel.pid
=> 27384

# ngrok log file descriptor
Ngrok::Tunnel.log
=> #<File:/tmp/ngrok20141022-27376-cmmiq4>

# kill ngrok
Ngrok::Tunnel.stop
=> :stopped
# ngrok custom parameters
Ngrok::Tunnel.start(port: 3333, 
                    subdomain: 'MY_SUBDOMAIN', 
                    authtoken: 'MY_TOKEN', 
                    log: 'ngrok.log', 
                    config: '~/.ngrok')

Contributing

  1. Fork it ( https://github.com/bogdanovich/ngrok-tunnel/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Ngrok-tunnel gem is a simple ruby wrapper for ngrok http://ngrok.com

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%