HubClient
Service hub client
Installation
Add this line to your application's Gemfile:
gem 'hub_client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hub_client
Usage
First let's create initializer file and configure the client:
HubClient.configure do |config|
config.env = "IL" # Optional
config.endpoint_url = "http://user:[email protected]" # scheme://host:port
config.access_token = "token" # Optional
end
To publish any message to the hub:
HubClient.publish('message', { pay: "load" })
Hub API version remark
You can set the service hub api version by change the HUB_VERSION const
Contributing
- Fork it ( http://github.com/
/hub_client/fork ) - Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request