<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mariano Guerra's Log (Posts about fiaca)</title><link>http://marianoguerra.org/</link><description></description><atom:link href="http://marianoguerra.org/categories/fiaca.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Mon, 18 Nov 2024 17:56:26 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>CouchApp III: subiendo los cambios automaticamente</title><link>http://marianoguerra.org/posts/201010couchapp-iii-subiendo-los-cambios/</link><dc:creator>Mariano Guerra</dc:creator><description>&lt;p&gt;ahora que tenemos todo lo que necesitamos para crear nuestra couchapp, podemos ir al directorio _attachments y empezar a modificar el código para que haga lo que queramos&lt;/p&gt;&lt;br&gt;&lt;p&gt;después de un rato vas a notar que necesitas hacer push de los cambios a couchdb cada vez que queres probarlos, si sos como yo esto se va a poner molesto bastante rápido, hagamos que las herramientas nos ayuden&lt;/p&gt;&lt;br&gt;&lt;pre&gt;#install inotify-tools&lt;br&gt;sudo apt-get install inotify-tools&lt;br&gt;&lt;/pre&gt;&lt;br&gt;&lt;p&gt;con inotify tools vamos a correr un script que va a monitorear cualquier cambio de archivos y va a hacer un push cuando eso suceda, voy a excluir los cambios en *.swp ya que vim crea esos archivos y cambian bastante seguido&lt;/p&gt;&lt;br&gt;&lt;p&gt;corre este comando en algún shell y dejalo corriendo&lt;/p&gt;&lt;br&gt;&lt;pre&gt;inotifywait -q -e modify -m -r . | while read line; do if echo $line | grep -v .*.swp; then couchapp push; fi; done&lt;br&gt;&lt;/pre&gt;&lt;br&gt;&lt;p&gt;ahora edita algún archivo y guardalo, anda al shell donde tenes el script corriendo, vas a ver algo como esto:&lt;/p&gt;&lt;br&gt;&lt;pre&gt;./_attachments/ MODIFY index.html&lt;br&gt;2010-10-22 11:00:48 [INFO] Visit your CouchApp here:&lt;br&gt;http://wariano:secret@localhost:5984/datos/_design/datos/index.html&lt;br&gt;&lt;/pre&gt;&lt;br&gt;&lt;p&gt;ahora podes editar tus archivos y los cambios van a ser automáticamente subidos a couchdb&lt;/p&gt;</description><category>couchapp</category><category>couchdb</category><category>fiaca</category><guid>http://marianoguerra.org/posts/201010couchapp-iii-subiendo-los-cambios/</guid><pubDate>Fri, 22 Oct 2010 15:12:00 GMT</pubDate></item><item><title>[EN] CouchApp III: pushing the changes automatically</title><link>http://marianoguerra.org/posts/201010en-couchapp-iii-pushing-changes/</link><dc:creator>Mariano Guerra</dc:creator><description>&lt;p&gt;now we have all we need to start creating our couchapp, go to the _attachments directory and start modifying the code to do what you want&lt;/p&gt;&lt;br&gt;&lt;p&gt;after a moment you will notice that you need to push the changes to couchdb each time you want to test it, if you are like me this will get annoying pretty fast, let's make the tools help us&lt;/p&gt;&lt;br&gt;&lt;pre&gt;#install inotify-tools&lt;br&gt;sudo apt-get install inotify-tools&lt;br&gt;&lt;/pre&gt;&lt;br&gt;&lt;p&gt;with inotify tools we will run a script that will monitor any file change and make a couchapp push when that happens, I will exclude the changes in *.swp files since vim create those and they change pretty often&lt;/p&gt;&lt;br&gt;&lt;p&gt;in some shell run this and leave it running&lt;/p&gt;&lt;br&gt;&lt;pre&gt;inotifywait -q -e modify -m -r . | while read line; do if echo $line | grep -v .*.swp; then couchapp push; fi; done&lt;br&gt;&lt;/pre&gt;&lt;br&gt;&lt;p&gt;now edit some file and save it, go back to the shell where the script is running, you should see something like:&lt;/p&gt;&lt;br&gt;&lt;pre&gt;./_attachments/ MODIFY index.html&lt;br&gt;2010-10-22 11:00:48 [INFO] Visit your CouchApp here:&lt;br&gt;http://wariano:secret@localhost:5984/datos/_design/datos/index.html&lt;br&gt;&lt;/pre&gt;&lt;br&gt;&lt;p&gt;now you can edit your files and the changes will be pushed automatically to couchdb&lt;/p&gt;</description><category>couchapp</category><category>couchdb</category><category>fiaca</category><guid>http://marianoguerra.org/posts/201010en-couchapp-iii-pushing-changes/</guid><pubDate>Fri, 22 Oct 2010 15:07:00 GMT</pubDate></item></channel></rss>