README.md in chap-0.0.9 vs README.md in chap-0.1.0
- old
+ new
@@ -80,10 +80,19 @@
<pre>
$ cap deploy # cap recipe calls "chap deploy"
</pre>
+Example capistrano deploy
+
+```ruby
+namespace :deploy do
+ task :default do
+ run "chap deploy"
+ end
+```
+
Chef Chap LWRP:
<pre>
# chef LWRP creates chap.yml and chap.json setup files and calls "chap deploy"
chap_deploy "chapdemo" do
@@ -121,13 +130,12 @@
Special methods:
* run - output the command to be ran and runs command.
* log - log messages to [shared_path]/chap/chap.log.
* symlink_configs - useful as a chap/deploy hook. Symlinks any config files in [shared_path]/config/* over to [release_path]/config.
-* with - used to prepend all commands with the run method in a block with another command. A example is provided below.
+* with - used to prepend all commands within a block with another command. A example is provided below.
-
with example:
<pre>
with "cd #{release_path} && RAILS_ENV=#{node[:environment]} " do
run "rake do:something1"
@@ -143,22 +151,24 @@
</pre>
### Test deploy hooks
-When a chap hook fails, you want want to quicky test it on the server without having commit new code and running a full deploy. You can edit the chap/* hooks on the spot and test them via:
+When a chap hook fails, you might want to quicky test it on the server without having commit new code and running a full deploy. You can edit the chap/* hooks on the spot and test them via:
<pre>
$ cap hook deploy
$ cap hook restart
</pre>
This will test the hooks on the latest timestamp release at [deploy_to]/releases/[timestamp].
### Syncing restart phase
-Some apps require that all the code be available on all the servers before a restart should happen on any of the servers. For example, if you're serving assets on the same server as your app code, you wan to make sure that the assets have been download on all servers before any of the servers start serving the new assets. To sync the retart phase you have to break out the capistano recipe so that it calls 2 chap command:
+Some apps require that all the code be available on all the servers before a restart should happen on any of the servers. For example, if you're serving assets on the same server as your app code, you want to make sure that all the assets have been download on all servers before any of the servers start serving the new assets. To sync the retart phase you have to break out the capistano recipe so that it calls 2 chap command:
-<pre>
-$ chap deploy --stop-at-symlink
-$ chap deploy --cont-at-symlink
-</pre>
+```ruby
+task :chap do
+ run "chap deploy -q --stop-at-symlink"
+ run "chap deploy -q --cont-at-symlink"
+end
+```
\ No newline at end of file