bogdanovich / ngrok-tunnel

Ngrok-tunnel gem is a simple ruby wrapper for ngrok http://ngrok.com
MIT License
85 stars 50 forks source link

Support remote addresses #9

Closed am17torres closed 8 years ago

am17torres commented 8 years ago

ngrok supports forwarding to servers on a different machine (non-local services), so I updated the port parameter to be an addr parameter.

bogdanovich commented 8 years ago

This one breaks backwards compatibility. Why not update it so both port and addr work

am17torres commented 8 years ago

I was getting these rspec warnings so I added more specific error checking in addition to the backwards compatibility changes.

WARNING: Using the raise_error matcher without providing a specific error or message risks false positives, since raise_error will match when Ruby raises a NoMethodError, NameError or ArgumentError, potentially allowing the expectation to pass without even executing the method you are intending to call. Actual error raised was #<Ngrok::Error: Tunnel session failed: Only paid plans may bind custom subdomains.\nFailed to bind the custom subdomain 'test-subdomain' for an unauthenticated client.\nSign up at: https://ngrok.com/signup\n\nIf you have already signed up, make sure your authtoken is installed.\nYour authtoken is available on your dashboard: https://dashboard.ngrok.com\n\nERR_NGROK_305\n>. Instead consider providing a specific error class or message. This message can be supressed by setting: RSpec::Expectations.configuration.warn_about_potential_false_positives = false.'

am17torres commented 8 years ago

I forgot to handle supporting Tunnel.port, gotta head out now but I'll finish this up tonight.

am17torres commented 8 years ago

Alright @bogdanovich all set. Let me know if there is anything else you think is missing.

bogdanovich commented 8 years ago

Thanks @am17torres !