Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Bogdanovich committed Oct 24, 2014
2 parents 662b7f4 + 9986f3e commit 5f124fa
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Ngrok::Tunnel

ngrok-tunnel provides ruby wrapper for ngrok
Ngrok-tunnel gem is a ruby wrapper for ngrok

[![Gem Version](https://badge.fury.io/rb/ngrok-tunnel.svg)](http://badge.fury.io/rb/ngrok-tunnel)

## Installation

Expand All @@ -23,33 +25,43 @@ Or install it yourself as:
```ruby
require 'ngrok/tunnel'

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

# ngrok local_port
Ngrok::Tunnel.local_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
=> #<File:/tmp/ngrok20141022-27376-cmmiq4>

# kill ngrok
Ngrok::Tunnel.stop
=> :stopped

```

## Contributing

1. Fork it ( https://github.com/[my-github-username]/ngrok-tunnel/fork )
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`)
Expand Down

0 comments on commit 5f124fa

Please sign in to comment.