README.md in capistrano_sentinel-0.0.10 vs README.md in capistrano_sentinel-0.0.12

- old
+ new

@@ -4,13 +4,13 @@ Overview -------- CapistranoSentinel is a simple ruby implementation that allows you to emit websocket events before a task is invoked by Capistrano. -This gem only has the websocket client that emit events to a host (default 0.0.0.0 port 1234 and path /ws) +This gem only has the websocket client that emit events to a default host and port , see here more details: **[Configuration options](#configuration-options)** -Currently there is no posibility to change the default configuration becasue this was just released few days ago, but this will be added soon +You can change that configuration following the description below Requirements ------------ 1. [websocket >= 1.2](https://github.com/imanel/websocket-ruby) @@ -35,9 +35,47 @@ Add the following to your Capfile ```ruby require 'capistrano_sentinel' +``` + +Configuration options +===================== + +```ruby + CapistranoSentinel.configure do |config| + + # if the connection needs to be secure ( using port 443) + config.secure = false + + # the host on which the server is listening to connections + config.host = '0.0.0.0' + + # the port on which the server is listening to connections + config.port = 1234 + + # the path to which the server is listening to connections + config.path = '/ws' + + # if it receives a ping message, does it need to respond automatically + config.auto_pong = true + + # how many bites can it read from the connection + config.read_buffer_size = 2048 + + # if the conection can reconnect in case the connection was unsuccessful + config.reconnect = false + + # how many times can retry the connection + config.retry_time = 0 + + # if this is enabled, the task will sleep until the socket receives a message back in this format + # {"action"=>"invoke", "task"=><task_name>, "job_id"=><job_id>, "approved"=>"yes"}, + # where the task_name needs to be the task that is waiting for approval and + # the job_id needs to be set using ENV['multi_cap_job_id'], for parallel processing ( if the job id is missing , will be automatically generated with SecureRandom.uuid) + config.wait_execution = true + end ``` Usage Instructions ==================