<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>has_many :thoughts: Tag capistrano</title>
    <link>http://blog.kineticweb.com/articles/tag/capistrano</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Musings from a Ruby on Rails development team</description>
    <item>
      <title>Capistrano Twitter task, take 2</title>
      <description>&lt;p&gt;In my &lt;a href="http://blog.kineticweb.com/articles/2008/02/10/capistrano-twitter-task"&gt;original post&lt;/a&gt;, I explained how I used the twitter4r gem to post when we deployed an app with capistrano. &lt;a href="http://rubyology.com/"&gt;Chris Matthieu&lt;/a&gt; posted &lt;a href="http://blog.kineticweb.com/articles/2008/02/10/capistrano-twitter-task#comments"&gt;a comment&lt;/a&gt; about how to do it without the twitter4r gem. I actually like this better, especially after we started having trouble with the twitter4t gem. So, here&amp;#8217;s his version that I adapted slightly:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;desc&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;posts to twitter that an application has been deployed to a web server&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;span class="ident"&gt;task&lt;/span&gt; &lt;span class="symbol"&gt;:send_tweet&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;open-uri&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;net/http&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;

  &lt;span class="ident"&gt;url&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;URI&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;parse&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;http://twitter.com/statuses/update.xml&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
  &lt;span class="ident"&gt;req&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Net&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;HTTP&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Post&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;url&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;path&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="ident"&gt;req&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;basic_auth&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;your_username&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;:&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;your_password&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;req&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;set_form_data&lt;/span&gt;&lt;span class="punct"&gt;({'&lt;/span&gt;&lt;span class="string"&gt;status&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Deployed &lt;span class="expr"&gt;#{application}&lt;/span&gt; to &lt;span class="expr"&gt;#{rails_env}&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;})&lt;/span&gt;
  &lt;span class="ident"&gt;res&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Net&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;HTTP&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;url&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;host&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;url&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;port&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;start&lt;/span&gt; &lt;span class="punct"&gt;{|&lt;/span&gt;&lt;span class="ident"&gt;http&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt; &lt;span class="ident"&gt;http&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;request&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;req&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;}&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Thanks, Chris!&lt;/p&gt;</description>
      <pubDate>Sat, 16 Feb 2008 11:17:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:5a3fefee-ff34-41e8-87fd-ba9d8ed177d6</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2008/02/16/capistrano-twitter-task-take-2</link>
      <category>capistrano</category>
      <category>twitter</category>
    </item>
    <item>
      <title>Capistrano Twitter task</title>
      <description>&lt;p&gt;Justin had an idea that we should post to &lt;a href="http://www.twitter.com"&gt;Twitter&lt;/a&gt; whenever we deploy a new version of our apps to either a staging site or the production app. Turns out, this is really easy with the &lt;a href="http://twitter4r.rubyforge.org/"&gt;twitter4r gem&lt;/a&gt;. I used a twitter account that Justin created expressly for our internal notices and set its updates to be private. Then I created this task:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;desc&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;posts to twitter that something was deployed&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;span class="ident"&gt;task&lt;/span&gt; &lt;span class="symbol"&gt;:send_tweet&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;rubygems&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;gem&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;twitter4r&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;twitter&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;twitter/console&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;twitter&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Twitter&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Client&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;from_config&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;config/twitter.yml&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt;&lt;span class="ident"&gt;rails_env&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="ident"&gt;status&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;twitter&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;status&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:post&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;deployed &lt;span class="expr"&gt;#{application}&lt;/span&gt; to &lt;span class="expr"&gt;#{rails_env}&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;The twitter4r library loads a simple yaml file that contains the username and password of the twitter account to use. And one line of code posts the status update with the name of the app and the environment from previously-defined variables.&lt;/p&gt;


	&lt;p&gt;That&amp;#8217;s it! The great thing about using Twitter for this, as Justin pointed out, is that each one of us developers can consume this information how we choose: IM, Growl messages with &lt;a href="http://iconfactory.com/software/twitterrific"&gt;Twitterific&lt;/a&gt;, &lt;span class="caps"&gt;SMS&lt;/span&gt;, etc. So it&amp;#8217;s really just the syndication technology that we&amp;#8217;re taking advantage of.&lt;/p&gt;


	&lt;h2&gt;Update&lt;/h2&gt;


	&lt;p&gt;Chris&amp;#8217;s comment below prompted me to come up with a &lt;a href="http://blog.kineticweb.com/articles/2008/02/16/capistrano-twitter-task-take-2"&gt;new version&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 10 Feb 2008 10:37:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:c9889033-88a8-4c6a-a2cb-23b2bf7694c5</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2008/02/10/capistrano-twitter-task</link>
      <category>capistrano</category>
      <category>ruby</category>
      <category>twitter</category>
      <category>Rails</category>
    </item>
    <item>
      <title>Updates on Git use in Mac OS X (Tiger)</title>
      <description>&lt;p&gt;Note: This article is still on using Git under Tiger (10.4.10, respectively)... Until I have time to run down to the Apple store tomorrow and do a nice clean install of Leopard onto my Macbook, I will not have the appropriate means of writing a proper article on Git use under 10.5.&lt;/p&gt;


	&lt;p&gt;This is for anyone that reads this blog, and used my previous article on compiling Git. I left the proper Git tutorials to the behmouth of external articles out there, on using Git as Rails project/deployment &lt;span class="caps"&gt;SCM&lt;/span&gt;. I&amp;#8217;m also a firm believer in &lt;span class="caps"&gt;DIY&lt;/span&gt;, and the same applies to learning new things. Nobody ever taught me a damn subject (completely) in person on anything I use day-to-day&amp;#8230; so &lt;span class="caps"&gt;DIY&lt;/span&gt; and&amp;#8230;&lt;/p&gt;


&lt;div style="text-align:center;margin:10px;"&gt;
&lt;a href="http://git.or.cz/" target="_blank"&gt;&lt;img src="http://git.or.cz/git-logo.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Welcome to the wonderful world of Git folks!&lt;/strong&gt;
&lt;/div&gt;

	&lt;p&gt;Since my last article, actually a day ago, Geoffrey Grosenbach over at &lt;a href="http://www.peepcode.com"&gt;Peepcode Screencasts&lt;/a&gt; released &lt;a href="http://peepcode.com/products/git"&gt;Video 015, on Git&lt;/a&gt;. This should really, visually, help out those that are really having problems crasping the simple things in Git. There are other &lt;a href="http://blog.nbwd.co.uk/2007/8/16/using-git-for-rails-development"&gt;numerous&lt;/a&gt; &lt;a href="http://scie.nti.st/2007/9/4/capistrano-2-0-with-git-shared-repository"&gt;advances&lt;/a&gt; in &lt;a href="http://cheat.errtheblog.com/s/gitsvn/"&gt;using&lt;/a&gt; Git with your Rails applications. So I&amp;#8217;ll keep things &lt;span class="caps"&gt;DRY&lt;/span&gt; here&amp;#8230;&lt;/p&gt;


	&lt;p&gt;One thing I will update you with though, a quick and simple way to update your source compiled installation of Git, by using Git&amp;#8217;s repository itself.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;# git clone git://git.kernel.org/pub/scm/git/git.git
# cd git
# make configure
# ./configure --prefix=/usr/local
# make all doc
# sudo make install install-doc&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;You will now have a completely refreshed version of Git on your system.&lt;/p&gt;


	&lt;p&gt;Take note, Grosenbach mentions the benefits of having a compiled version of Git on your system. He does not, however, give more than a quick mention that it may be slightly difficult gathering up the proper dependency chain onto your system. That was what my previous article was for.&lt;/p&gt;


	&lt;p&gt;Enjoy, and let me know how things go for you&amp;#8230; justin_at_kineticweb.com.&lt;/p&gt;</description>
      <pubDate>Thu, 25 Oct 2007 23:46:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:00613e8c-c07f-49d8-ab44-75debc11d631</guid>
      <author>Justin Reagor</author>
      <link>http://blog.kineticweb.com/articles/2007/10/25/updates-on-git-use-in-mac-os-x-tiger</link>
      <category>git</category>
      <category>scm</category>
      <category>svn</category>
      <category>capistrano</category>
      <trackback:ping>http://blog.kineticweb.com/articles/trackback/70</trackback:ping>
    </item>
  </channel>
</rss>
