https://github.com/paxa/waithook-ruby
Ruby client for waithook.com
https://github.com/paxa/waithook-ruby
Last synced: 5 months ago
JSON representation
Ruby client for waithook.com
- Host: GitHub
- URL: https://github.com/paxa/waithook-ruby
- Owner: Paxa
- Created: 2016-11-27T11:19:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-04-05T16:40:14.000Z (over 1 year ago)
- Last Synced: 2025-08-01T11:58:47.643Z (12 months ago)
- Language: Ruby
- Homepage: http://waithook.com
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Waithook ruby client
A ruby client [Waithook](http://waithook.com).
Wiathook is a service to transmit HTTP requests over websocket connection.
It's kinda Pub/Sub system for HTTP notifications, built for recieving webhook notifications behind proxy or when public IP is unknown (such as cloud CI server).
To recieve notifications you should add `http://waithook.com/some_random_string` as notification URL and start listening websocket messages at `wss://waithook.com/some_random_string`.
### Command line usage
Install:
```sh
gem install waithook
```
Subscribe and print incoming requests:
```sh
waithook waithook.com/my_path
```
Subscribe and forvard to other web server:
```sh
waithook waithook.com/my_path --forward http://localhost:3000/notify
```
### Ruby API
```ruby
Waithook.default_path = 'my-notification-endpoint' # or using ":path" option in Waithook.subscribe
waithook = Waithook.subscribe(timeout: 60, raise_on_timeout: true) do |webhook|
webhook.json_body['order_id'] == order_id
end
waithook.send_to("http://localhost:3000/notify")
```
### When it can be used?
* Testing integration with payment gateway
* Testing github webhooks
* Testing incoming email processing
* Testing slack bots
* Testing facebook webhooks
Waithook service just help to deliver webhook to your application when public IP is unknown or not available. It can help when multiple developers testing integration with other service on localhost or your automated tests running in CI.