README.md in cogy-0.2.0 vs README.md in cogy-0.2.1
- old
+ new
@@ -337,13 +337,17 @@
It can be overriden in the application by creating a view in
`app/views/cogy/error.text.erb`.
## Deployment
-Cogy provides the `cogy:notify_cog` task for Capistrano. The following options
-need to be set:
+Cogy provides the `cogy:notify_cog` task for Capistrano. This task should run
+*after* the application server is respawned/restarted, so that the new commands
+are picked up. In Capistrano 2 for example, it should run after
+`deploy:restart`.
+The following options need to be set:
+
* `cogy_release_trigger_url`: This is the URL of the Cog Trigger that will
install the newly deployed bundle (ie. `!cogy:install`).
* `cogy_endpoint`: Where the Cogy Engine is mounted at.
For example `http://myapp.com/cogy`.
@@ -360,27 +364,30 @@
# in config/deploy.rb
require "cogy/capistrano"
set :cogy_release_trigger_url, "<TRIGGER-INVOCATION-URL>"
set :cogy_endpoint, "<COGY-MOUNT-POINT>"
+
+after "deploy:restart", "cogy:notify_cog"
```
-The `cogy:notify_cog` task is automatically hooked after `deploy:restart`.
-
### Capistrano 3
Add the following in your Capfile:
```ruby
require "cogy/capistrano"
```
-The `cogy:notify_cog` task should be manually hooked after the task that
-restarts the application. For example:
+Then configure the task and hook it:
```ruby
# in config/deploy.rb
-after "deploy:restart_app", "cogy:notify_cog"
+
+set :cogy_release_trigger_url, "<TRIGGER-INVOCATION-URL>"
+set :cogy_endpoint, "<COGY-MOUNT-POINT>"
+
+after "<app-restart-task>", "cogy:notify_cog"
```
## Development
Running the tests and RuboCop: