<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Bruno Arueira</title>
	<atom:link href="http://brunoarueira.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://brunoarueira.wordpress.com</link>
	<description>Experiências cotidianas! / Everyday experiences!</description>
	<lastBuildDate>Wed, 11 Jan 2012 12:01:29 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='brunoarueira.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Bruno Arueira</title>
		<link>http://brunoarueira.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://brunoarueira.wordpress.com/osd.xml" title="Bruno Arueira" />
	<atom:link rel='hub' href='http://brunoarueira.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Wait an response from ajax request</title>
		<link>http://brunoarueira.wordpress.com/2012/01/11/wait-an-response-from-ajax-request/</link>
		<comments>http://brunoarueira.wordpress.com/2012/01/11/wait-an-response-from-ajax-request/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 11:58:38 +0000</pubDate>
		<dc:creator>Bruno Arueira</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ajax request]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[synchronizing javascript process]]></category>

		<guid isPermaLink="false">http://brunoarueira.wordpress.com/?p=149</guid>
		<description><![CDATA[Hi, I was had some problem with javascript processing why I need the response from ajax request and with return do some process and manipulation inserting contents, something like that: $(&#8220;#btn-export&#8221;).click(function (event) { var graphicPage = $(&#8220;&#60;div id=&#8217;content&#8217;&#62;&#60;/div&#62;&#8221;); $.get(&#8220;/Report/graphic.htm&#8221;, function (data) { graphicPage.html(data); }); graphicPage.find(&#8220;img&#8221;).each(function(key, value) { $(value).attr(&#8220;src&#8221;,  document.location.protocol + &#8220;//&#8221; + document.location.host + $(value).attr(&#8220;src&#8221;)); [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=149&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I was had some problem with javascript processing why I need the response from ajax request and with return do some process and manipulation inserting contents, something like that:</p>
<blockquote><p>$(&#8220;#btn-export&#8221;).click(function (event) {<br />
var graphicPage = $(&#8220;&lt;div id=&#8217;content&#8217;&gt;&lt;/div&gt;&#8221;);</p>
<p>$.get(&#8220;/Report/graphic.htm&#8221;, function (data) {<br />
graphicPage.html(data);<br />
});</p>
<p>graphicPage.find(&#8220;img&#8221;).each(function(key, value) {</p>
<p>$(value).attr(&#8220;src&#8221;,  document.location.protocol + &#8220;//&#8221; + document.location.host + $(value).attr(&#8220;src&#8221;));</p>
<p>});</p>
<p>//more processing</p>
<p>$(&#8220;body&#8221;).append(&#8216;&lt;form id=&#8221;exportform&#8221; action=&#8221;../Report/Export&#8221; method=&#8221;post&#8221; target=&#8221;_blank&#8221;&gt;&lt;input type=&#8221;hidden&#8221; id=&#8221;exportdata&#8221; name=&#8221;exportdata&#8221; /&gt;&lt;/form&gt;&#8217;);<br />
$(&#8220;#exportdata&#8221;).val(graphicPage.html().toString());<br />
$(&#8220;#exportform&#8221;).submit().remove();<br />
});</p></blockquote>
<p>But my problem was on the final to send to the resource to be processed as Excel spreadsheet, because the ajax request is asynchronous and the graphicPage variable sometimes is empty and another time contain the original content from request. How to I solve that?</p>
<p>I was search this <a href="http://api.jquery.com/jQuery.get" target="_blank">link</a> (documentation of jQuery.get()) and the <a href="http://api.jquery.com/jQuery.get/#comment-30027542" target="_blank">last comment</a> an user (Hyponiq) gave the solution to another user. Solution:</p>
<blockquote><p><code>var value = (function () {<br />
var val = null;</code></p>
<p>$.ajax({<br />
&#8216;async&#8217;: false,<br />
&#8216;global&#8217;: false,<br />
&#8216;url&#8217;: &#8216;path/to/url.php&#8217;,<br />
&#8216;success&#8217;: function (data) {<br />
val = data;<br />
}<br />
});</p>
<p>return val;<br />
})();</p></blockquote>
<p>Using this solution I adapt to my problem and came up with this code:</p>
<blockquote><p>$(&#8220;#btn-export&#8221;).click(function (event) {<br />
var graphicPage = (function () {<br />
var value = $(&#8220;&lt;div id=&#8217;content&#8217;&gt;&lt;/div&gt;&#8221;);</p>
<p>$.ajax({<br />
async: false,<br />
global: false,<br />
url: &#8220;/Report/graphic.htm&#8221;,<br />
success: function (data) {<br />
value.html(data);<br />
}<br />
});</p>
<p>return value;<br />
})();</p>
<p>graphicPage.find(&#8220;img&#8221;).each(function (key, value) {<br />
$(value).attr(&#8220;src&#8221;, document.location.protocol + &#8220;//&#8221; + document.location.host + $(value).attr(&#8220;src&#8221;));<br />
});</p>
<p>//more processing</p>
<p>$(&#8220;body&#8221;).append(&#8216;&lt;form id=&#8221;exportform&#8221; action=&#8221;../Report/Export&#8221; method=&#8221;post&#8221; target=&#8221;_blank&#8221;&gt;&lt;input type=&#8221;hidden&#8221; id=&#8221;exportdata&#8221; name=&#8221;exportdata&#8221; /&gt;&lt;/form&gt;&#8217;);<br />
$(&#8220;#exportdata&#8221;).val(graphicPage.html().toString());<br />
$(&#8220;#exportform&#8221;).submit().remove();<br />
});</p></blockquote>
<p>There, now could cause the variable to be filled before processing.</p>
<p>Thanks,</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brunoarueira.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brunoarueira.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brunoarueira.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brunoarueira.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brunoarueira.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brunoarueira.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brunoarueira.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brunoarueira.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brunoarueira.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brunoarueira.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brunoarueira.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brunoarueira.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brunoarueira.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brunoarueira.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=149&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brunoarueira.wordpress.com/2012/01/11/wait-an-response-from-ajax-request/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf5da0d40d58e6622cac0ed85199fcb8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bruno_arueira</media:title>
		</media:content>
	</item>
		<item>
		<title>[Tip] Workspace Cannot Be Created with Titanium Studio</title>
		<link>http://brunoarueira.wordpress.com/2011/11/06/tip-workspace-cannot-be-created-with-titanium-studio/</link>
		<comments>http://brunoarueira.wordpress.com/2011/11/06/tip-workspace-cannot-be-created-with-titanium-studio/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 01:53:25 +0000</pubDate>
		<dc:creator>Bruno Arueira</dc:creator>
				<category><![CDATA[Tip]]></category>
		<category><![CDATA[Titanium Appcelerator]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[titanium appcelerator]]></category>
		<category><![CDATA[titanium workspace]]></category>
		<category><![CDATA[workspace]]></category>

		<guid isPermaLink="false">http://brunoarueira.wordpress.com/?p=146</guid>
		<description><![CDATA[Hi, I stopped again with posts, but soon will return. Today I had a tip for someone had been the error message &#8220;Workspace Cannot Be Created&#8221; with Titanium Studio at startup. I&#8217;ve found the solution that&#8217;s work for me. Simply, open the Terminal and type: /Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/TitaniumStudio -data &#8220;&#60;path to your workspace&#62;&#8221; After press Enter [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=146&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I stopped again with posts, but soon will return.</p>
<p>Today I had a tip for someone had been the error message &#8220;Workspace Cannot Be Created&#8221; with Titanium Studio at startup.</p>
<p>I&#8217;ve found the solution that&#8217;s work for me.</p>
<p>Simply, open the Terminal and type:</p>
<p>/Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/TitaniumStudio -data &#8220;&lt;path to your workspace&gt;&#8221;</p>
<p>After press Enter and your Titanium Studio will working perfectly again!</p>
<p>I had tried to change the config.ini file, but it still fails.</p>
<p>PS: The path above is of my setup on OS X.</p>
<p>Thanks,</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brunoarueira.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brunoarueira.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brunoarueira.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brunoarueira.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brunoarueira.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brunoarueira.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brunoarueira.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brunoarueira.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brunoarueira.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brunoarueira.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brunoarueira.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brunoarueira.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brunoarueira.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brunoarueira.wordpress.com/146/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=146&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brunoarueira.wordpress.com/2011/11/06/tip-workspace-cannot-be-created-with-titanium-studio/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf5da0d40d58e6622cac0ed85199fcb8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bruno_arueira</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails Tip: Prohibit certain route confuse other</title>
		<link>http://brunoarueira.wordpress.com/2011/09/04/rails-tip-prohibit-certain-route-confuse-other/</link>
		<comments>http://brunoarueira.wordpress.com/2011/09/04/rails-tip-prohibit-certain-route-confuse-other/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 14:05:27 +0000</pubDate>
		<dc:creator>Bruno Arueira</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails 3]]></category>
		<category><![CDATA[rails routes]]></category>
		<category><![CDATA[rails tip]]></category>
		<category><![CDATA[routes]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://brunoarueira.wordpress.com/?p=141</guid>
		<description><![CDATA[Hi, I searched the internet about the problem below, but it still fails. In my rails application I had somes routes similar to the following: SomeApp::Application.routes.draw do root :to =&#62; 'home#index' resources :person match '/:username' =&#62; 'users#show', :as =&#62; :profile end And I had a problem with routes&#8217; priority and I put a username route [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=141&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I searched the internet about the problem below, but it still fails.</p>
<p>In my rails application I had somes routes similar to the following:</p>
<blockquote>
<pre>SomeApp::Application.routes.draw do
  root :to =&gt; 'home#index'

  resources :person

  match '/:username' =&gt; 'users#show', :as =&gt; :profile
end</pre>
</blockquote>
<p>And I had a problem with routes&#8217; priority and I put a username route at my last line in routes.rb. But the another problem was found if I had Rails Engine routes? (Example: an Rails Engine to blog with routes as posts and comments)</p>
<p><strong>Remembering:</strong> the Rails Engine routes load after Rails routes of an application.</p>
<p>And the Record Not Found Exception was raised (I was configured to rendered 404 page on this exception), because the username posts or comments was not found in the database. Solution?</p>
<blockquote>
<pre>SomeApp::Application.routes.draw do
  root :to =&gt; 'home#index'

  resources :person

  match '/:username' =&gt; 'users#show', :as =&gt; :profile, :constraints =&gt; lambda { |request| User.find_by_username(request.path_parameters[:username]) != nil }
end</pre>
</blockquote>
<p>With the constraints added at my last line, my application avoid the username param was the same name of another route, the Record Not Found exception was raised passing to routes configured at Rails Engine.</p>
<p>I hope this tip can help others with similar problems.</p>
<p>Thanks,</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brunoarueira.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brunoarueira.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brunoarueira.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brunoarueira.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brunoarueira.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brunoarueira.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brunoarueira.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brunoarueira.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brunoarueira.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brunoarueira.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brunoarueira.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brunoarueira.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brunoarueira.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brunoarueira.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=141&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brunoarueira.wordpress.com/2011/09/04/rails-tip-prohibit-certain-route-confuse-other/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf5da0d40d58e6622cac0ed85199fcb8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bruno_arueira</media:title>
		</media:content>
	</item>
		<item>
		<title>MongoDb, MongoMapper and Rails 3</title>
		<link>http://brunoarueira.wordpress.com/2011/08/07/mongodb-mongomapper-and-rails-3/</link>
		<comments>http://brunoarueira.wordpress.com/2011/08/07/mongodb-mongomapper-and-rails-3/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 15:12:11 +0000</pubDate>
		<dc:creator>Bruno Arueira</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[mongomapper]]></category>
		<category><![CDATA[mongo_mapper]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails 3]]></category>

		<guid isPermaLink="false">http://brunoarueira.wordpress.com/?p=135</guid>
		<description><![CDATA[Hi, This post is my first in english. I was thinking to use mongodb (NoSQL database category) in one of my personal projects because your many benefits, some as: scalable and handle high volumes of data. And I thinked that relational database was lazy to my specific problem. (As soon as possible I will show my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=135&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>This post is my first in english.</p>
<p>I was thinking to use <a title="MongoDb" href="http://www.mongodb.org/">mongodb</a> (<a title="NoSql" href="http://en.wikipedia.org/wiki/NoSQL">NoSQL</a> database category) in one of my personal projects because your many benefits, some as: scalable and handle high volumes of data.</p>
<p>And I thinked that relational database was lazy to my specific problem. (As soon as possible I will show my project)</p>
<p>To test mongodb I choose made one rails app using mongo_mapper and was wonderful because I doesn&#8217;t have many problems to configure the tools since my machine was configured to rails development and need to install mongodb, generate rails 3 app, adapt the Gemfile to add <a title="MongoMapper" href="https://github.com/jnunemaker/mongomapper">mongo_mapper</a> and bson_ext.</p>
<p>After bundle install, configure your database (I like this approach <a href="http://www.viget.com/extend/getting-started-with-mongodb-mongomapper/">http://www.viget.com/extend/getting-started-with-mongodb-mongomapper/</a>, I was think that form is more rails like) and in your application.rb inside config folder add codes line using mongo_mapper as orm generator.</p>
<p>Resuming the steps are to use:</p>
<p>1º Rails stack on your machine to development;</p>
<p>2º Install mongodb;</p>
<p>3º Generate a new rails app;</p>
<p>4º Configure the Gemfile to using mongo_mapper and add bson_ext dependency to mongodb;</p>
<p>5º Configure database (using approach like I use or another);</p>
<p>6º Put code lines in your application.rb to config orm generator to use mongo_mapper, like code below;</p>
<pre>  config.generators do |generator|
      generator.orm :mongo_mapper
  end</pre>
<p>7º Generate your business rules and happy.</p>
<p>&nbsp;</p>
<p>In my example app I was used InheritedResources and  facility to develop models scaffolds. Another particular thing in my app was nested resource but nothing unusual to conventional rails app.</p>
<p>The example code at my github: <a href="https://github.com/brunoarueira/example_mongodb">https://github.com/brunoarueira/example_mongodb</a></p>
<p>&nbsp;</p>
<p>Thanks</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brunoarueira.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brunoarueira.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brunoarueira.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brunoarueira.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brunoarueira.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brunoarueira.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brunoarueira.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brunoarueira.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brunoarueira.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brunoarueira.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brunoarueira.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brunoarueira.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brunoarueira.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brunoarueira.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=135&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brunoarueira.wordpress.com/2011/08/07/mongodb-mongomapper-and-rails-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf5da0d40d58e6622cac0ed85199fcb8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bruno_arueira</media:title>
		</media:content>
	</item>
		<item>
		<title>Brincando com Sinatra</title>
		<link>http://brunoarueira.wordpress.com/2011/07/31/brincando-com-sinatra/</link>
		<comments>http://brunoarueira.wordpress.com/2011/07/31/brincando-com-sinatra/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 16:25:50 +0000</pubDate>
		<dc:creator>Bruno Arueira</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby gem]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://brunoarueira.wordpress.com/?p=131</guid>
		<description><![CDATA[Olá, O título parece meio paranormal já que brincar com Sinatra (http://pt.wikipedia.org/wiki/Frank_Sinatra) fisicamente seria impossível. Porém o post trata-se de falar sobre uma gem baseada em Ruby (linguagem que estou dedicando meus estudos) que não é tão &#8220;bruta&#8221; quanto o Rails, por exemplo, na questão de não possuir muitas dependências e faz com que o [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=131&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Olá,</p>
<p>O título parece meio paranormal já que brincar com Sinatra (<a href="http://pt.wikipedia.org/wiki/Frank_Sinatra">http://pt.wikipedia.org/wiki/Frank_Sinatra</a>) fisicamente seria impossível.</p>
<p style="text-align:justify;">Porém o post trata-se de falar sobre uma gem baseada em Ruby (linguagem que estou dedicando meus estudos) que não é tão &#8220;bruta&#8221; quanto o Rails, por exemplo, na questão de não possuir muitas dependências e faz com que o foco seja aplicações com utilização de rotas ou para poucas páginas.</p>
<p style="text-align:justify;">Pensando em estudar algo um pouco fora do Rails, como tenho estudado, resolvi fazer uma aplicação usando o <a title="Sinatra.rb" href="http://sinatrarb.com" target="_blank">Sinatra</a> bem simples para upload de imagem e conversão para preto e branco.</p>
<p>Antes de tudo darei um exemplo de como tão simples seria uma aplicação baseada nessa ruby gem, segue código:</p>
<blockquote><p>require &#8216;rubygems&#8217;<br />
require &#8216;sinatra&#8217;</p>
<p>get &#8216;/&#8217; do<br />
&#8216;Hello World!&#8217;<br />
end</p></blockquote>
<p>Com o código mostrado e usando o comando abaixo já se pode abrir o browser e ver a resposta na rota principal da aplicação.</p>
<p>Comando para iniciar a aplicação:</p>
<blockquote><p>ruby application.rb</p></blockquote>
<p style="text-align:justify;">Depois disso irá imprimir no console informando que a aplicação em Sinatra está funcionando e a porta em que se é esperado para a rota que foi determinada responder. No site do projeto há vários grandes cases com essa ruby gem como a parte de services do github para resposta quando o usuário requisita código ou atualiza nos repositórios.</p>
<p style="text-align:justify;">Sendo assim, pensei em fazer uma aplicação que respondesse com uma view na rota principal da aplicação (chamada comumente de root path) e uma rota post para converted onde exibirá a imagem convertida usando o <a title="RMagick" href="http://github.com/rmagick/rmagick" target="_blank">RMagick</a> como convertedor.</p>
<p style="text-align:justify;">A aplicação é bem simples e muito fácil de implementar, já que existe inúmeros tutorias para usar todas as gems associadas a este mini projeto. Vejam o código dela em <a title="Black &amp; White" href="http://github.com/brunoarueira/blackwhite" target="_blank">http://github.com/brunoarueira/blackwhite</a> e a app funcionando em <a title="Black &amp; White" href="http://blackwhite.heroku.com" target="_blank">http://blackwhite.heroku.com</a>.</p>
<p style="text-align:justify;">Até a próxima <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brunoarueira.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brunoarueira.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brunoarueira.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brunoarueira.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brunoarueira.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brunoarueira.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brunoarueira.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brunoarueira.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brunoarueira.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brunoarueira.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brunoarueira.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brunoarueira.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brunoarueira.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brunoarueira.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=131&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brunoarueira.wordpress.com/2011/07/31/brincando-com-sinatra/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf5da0d40d58e6622cac0ed85199fcb8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bruno_arueira</media:title>
		</media:content>
	</item>
		<item>
		<title>Utilização de jQuery</title>
		<link>http://brunoarueira.wordpress.com/2011/07/27/utilizacao-de-jquery/</link>
		<comments>http://brunoarueira.wordpress.com/2011/07/27/utilizacao-de-jquery/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 02:42:42 +0000</pubDate>
		<dc:creator>Bruno Arueira</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[fathom]]></category>
		<category><![CDATA[formly]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery ui]]></category>

		<guid isPermaLink="false">http://brunoarueira.wordpress.com/?p=127</guid>
		<description><![CDATA[Olá, Resolvi postar essa experiência sobre o que expressar a respeito de jQuery já que existe muito material na Internet. Então pensei ao invés de ficar falando sobre milhares de detalhes que circundam a utilização do jQuery mudei a concepção e resolvi mostrar como utilizar jQuery usando jQuery. Sim ficou meio louco, mas é a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=127&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Olá,</p>
<p>Resolvi postar essa experiência sobre o que expressar a respeito de jQuery já que existe muito material na Internet.</p>
<p>Então pensei ao invés de ficar falando sobre milhares de detalhes que circundam a utilização do jQuery mudei a concepção e resolvi mostrar como utilizar jQuery usando jQuery. Sim ficou meio louco, mas é a mais pura verdade.</p>
<p>Usei para montar os slides um plugin pra jQuery chamado Fathom e em cada slide fui mostrando um pouco do que se utilizava antigamente com Javascript e mostrando o jQuery, jQuery UI e outros plugins tais como o Formly, que se é utilizado para estilizar formulários uma grande mão na roda para desenvolvedores que não tem muita paciência ou noção de design e deseja fazer sites profissionais de forma prática.</p>
<p>Postei todos os slides no github, segue link:</p>
<p><a href="http://github.com/brunoarueira/utilizacao-de-jquery">http://github.com/brunoarueira/utilizacao-de-jquery</a></p>
<p>Até a próxima,</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brunoarueira.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brunoarueira.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brunoarueira.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brunoarueira.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brunoarueira.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brunoarueira.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brunoarueira.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brunoarueira.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brunoarueira.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brunoarueira.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brunoarueira.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brunoarueira.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brunoarueira.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brunoarueira.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=127&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brunoarueira.wordpress.com/2011/07/27/utilizacao-de-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf5da0d40d58e6622cac0ed85199fcb8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bruno_arueira</media:title>
		</media:content>
	</item>
		<item>
		<title>Database Cleaner, RSpec 2 e Cucumber</title>
		<link>http://brunoarueira.wordpress.com/2011/01/04/database-cleaner-rspec-2-e-cucumber/</link>
		<comments>http://brunoarueira.wordpress.com/2011/01/04/database-cleaner-rspec-2-e-cucumber/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 11:58:52 +0000</pubDate>
		<dc:creator>Bruno Arueira</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[database cleaner]]></category>
		<category><![CDATA[faker]]></category>
		<category><![CDATA[machinist]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[rspec 2]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://brunoarueira.wordpress.com/?p=123</guid>
		<description><![CDATA[Resolvi criar este post como dica para quem tiver o mesmo problema que passei. Estou me aventurando pelo mundo Ruby e começando a adotar corretamente BDD (Behaviour Driven Development), então em uma aplicação que estou fazendo para estudo (inicialmente) comecei a aplicar os conceitos utilizando RSpec e Cucumber, mais especificamente o RSpec 2 devido a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=123&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Resolvi criar este post como dica para quem tiver o mesmo problema que passei.</p>
<p style="text-align:justify;">Estou me aventurando pelo mundo Ruby e começando a adotar corretamente BDD (Behaviour Driven Development), então em uma aplicação que estou fazendo para estudo (inicialmente) comecei a aplicar os conceitos utilizando RSpec e Cucumber, mais especificamente o RSpec 2 devido a ser uma aplicação em Rails 3.</p>
<p style="text-align:justify;">Quando gerei alguns exemplos com RSpec 2 para validar meus models, não houve grandes problemas. Os dados ficavam lá, porém o banco de teste era sempre recriado então tava tranquilo.</p>
<p style="text-align:justify;">Com isso, como disse fiz algumas specs para meus models e depois parti para dar funcionalidades ao sistema usando o Cucumber. Assim começaram meus problemas, pois necessitava popular o banco de dados porém a cada iteração red-green-refactor (<a title="Red Green Refactor" href="http://en.wikipedia.org/wiki/Red-green-refactor" target="_blank">http://en.wikipedia.org/wiki/Red-green-refactor</a>) deveria ser apagado.</p>
<p style="text-align:justify;">Bem, para a parte de popular utilizei duas gems que considero excelentes uma delas é a Machinist (<a title="Github da gem Machinist" href="https://github.com/notahat/machinist" target="_blank">https://github.com/notahat/machinist</a>) e a outra é a Faker (<a title="Github da gem Faker" href="https://github.com/stympy/faker" target="_blank">https://github.com/stympy/faker</a>), sendo a primeira para instanciar objetos para meus testes de forma simples e objetiva, já a segunda gem é para dar mais característica aos dados que serão instanciados nos objetos criados pela Machinist, ou seja, cria dados fakes com características similares aos dados que deseja entrar nos models.</p>
<p style="text-align:justify;">Agora para parte de apagar o banco de dados para uma nova iteração?</p>
<p style="text-align:justify;">Não foi difícil encontrar e vi que a gem Database Cleaner (<a title="Github da gem Database Cleaner" href="https://github.com/bmabey/database_cleaner" target="_blank">https://github.com/bmabey/database_cleaner</a>) atendia a situação de limpar o banco de dados, já havia feito alguns exemplos de utilização antes mas em casos isolados.</p>
<p style="text-align:justify;">A partir disso, fiz a adição da gem ao Gemfile como manda o &#8220;figurino&#8221; para usar no Rails 3 e depois o famoso bundle install. Depois fiz as configurações como diz no README da gem no github e pronto ativei o autotest para rodar o RSpec e o Cucumber usando AUTOFEATURE=true autotest.</p>
<p style="text-align:justify;">Demorou alguns segundos e após entrar na primeira example da spec de um dos models erro, que depois foi propagado e tudo ficou vermelho, mas antes estava tudo bem verde sem nenhum problema.</p>
<p style="text-align:justify;">Em seguida, fui procurar o erro e descobri que era na gem de limpeza do banco de dados. Então de cara não consegui encontrar solução e abri uma Issue (https://github.com/bmabey/database_cleaner/issues/closed#issue/37) no github para ela. Enquanto isso tentei observar como a gem funcionava e percebi que ela usada no Rails vai no database.yml na pasta config da aplicação e busca todos os environments para limpar cada banco. Não haveria grandes problemas se eu não utilizasse um formato bem DRY (Don&#8217;t Repeat Yourself) de escrever o database.yml onde é definido como se fosse um environment contendo informações básicas para todos os outros environments, como segue abaixo:</p>
<pre><code> default: &amp;default
    adapter: postgresql
    encoding: utf8
    username: ********
    password: ********
    host: localhost
</code></pre>
<p style="text-align:justify;">&nbsp;</p>
<p style="text-align:justify;">E nos outros environments era basicamente fazer o seguinte:</p>
<pre><code> development:
    database: teste_dev
    &lt;&lt;: *default</code></pre>
<p style="text-align:justify;">&nbsp;</p>
<p style="text-align:justify;">Pronto não preciso mais ficar repetindo todas as informações para todos os environments, mas aí que vem o problema&#8230; lembra da gem database cleaner que varre o database.yml para limpeza de cada banco declarado? Então ele detecta o default como um ambiente que deveria possuir um banco de dados e quando ele é ativado carrega esse ambiente (environment) para apagar o banco de dados e assim está gerado o caos. Até chegar nisso tive que debugar o PostgreSqlAdapter que fazia a conexão e perceber que não estava sendo carregado o nome do banco e depois constatar que era por causa do formato DRY que escrevi no arquivo de configuração dos bancos.</p>
<p style="text-align:justify;">Mas e agora qual a solução?</p>
<p style="text-align:justify;">A solução que encontrei foi baseada em uma configuração que pode ser feita na gem de limpeza, onde pode se informar qual conexão deseja-se usar e foi feito da seguinte maneira:</p>
<pre><code>DatabaseCleaner[:active_record, :connection =&gt; :test].clean_with :truncation
</code></pre>
<p style="text-align:justify;">Após feito isto nos arquivos spec_helper.rb do RSpec e no env.rb do Cucumber ativei novamente o autotest e voilá todos os testes voltaram a ser verdes. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p style="text-align:justify;">Então é isso, aos poucos vejo que no mundo Ruby tudo é muito mais prático do que em outras linguagens e/ou plataformas.</p>
<p style="text-align:justify;">Até a próxima.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brunoarueira.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brunoarueira.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brunoarueira.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brunoarueira.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brunoarueira.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brunoarueira.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brunoarueira.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brunoarueira.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brunoarueira.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brunoarueira.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brunoarueira.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brunoarueira.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brunoarueira.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brunoarueira.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=123&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brunoarueira.wordpress.com/2011/01/04/database-cleaner-rspec-2-e-cucumber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf5da0d40d58e6622cac0ed85199fcb8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bruno_arueira</media:title>
		</media:content>
	</item>
		<item>
		<title>Retrospectiva: 2010 e Feliz Ano Novo</title>
		<link>http://brunoarueira.wordpress.com/2010/12/31/retrospectiva-2010-e-feliz-ano-novo/</link>
		<comments>http://brunoarueira.wordpress.com/2010/12/31/retrospectiva-2010-e-feliz-ano-novo/#comments</comments>
		<pubDate>Fri, 31 Dec 2010 13:25:38 +0000</pubDate>
		<dc:creator>Bruno Arueira</dc:creator>
				<category><![CDATA[Off-Topic]]></category>
		<category><![CDATA[Pessoal]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[feliz ano novo]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[retrospectiva 2010]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[rubyonrails]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[trabalho]]></category>

		<guid isPermaLink="false">http://brunoarueira.wordpress.com/?p=119</guid>
		<description><![CDATA[Começando pela parte de retrospectiva, esse ano foi muito incomum aos anos anteriores. Até metade do ano trabalhava na Universidade Candido Mendes &#8211; Campos dos Goytacazes/RJ e na Tec Campos Incubadora, depois saí da Incubadora e após isto recebi a proposta de ir trabalhar na Spassu para Petrobrás em Macaé/RJ. De uma hora para outra [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=119&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Começando pela parte de retrospectiva, esse ano foi muito incomum aos anos anteriores.</p>
<p style="text-align:justify;">Até metade do ano trabalhava na <a title="Universidade Candido Mendes - Campos dos Goytacazes/RJ" href="http://www.ucam-campos.br" target="_blank">Universidade Candido Mendes &#8211; Campos dos Goytacazes/RJ</a> e na <a title="Tec Campos Incubadora" href="http://www.uenf.br/teccampos" target="_blank">Tec Campos Incubadora</a>, depois saí da Incubadora e após isto recebi a proposta de ir trabalhar na Spassu para Petrobrás em Macaé/RJ.</p>
<p style="text-align:justify;">De uma hora para outra mudou drasticamente, pois antes mesmo trabalhando em dois lugares tinha tempo para tudo! Ao ir trabalhar em Macaé, meu tempo diminuiu, pois antes acordava 10 pras 7 da manhã tomava um café da manhã e me arrumava para começar às 8 na Incubadora, depois vinha em casa almoçar ainda tinha umas horas de descanso que podia aproveitar da maneira que quisesse.</p>
<p style="text-align:justify;">Em seguida, tinha que estar na Universidade às 15 horas e trabalhava até às 22 horas, já na situação atual acordo 20 pras 5 da manhã tomo algo, me arrumo e pego um ônibus às 5:10 que me leva para Macaé e fico duas horas viajando, chego por volta das 7 horas e começa a rotina e o fim do expediente é por volta das 17 horas, assim vou buscar o ônibus para voltar e consequentemente chego em casa 19:30 da noite.</p>
<p style="text-align:justify;">Nessa correria toda que está sendo consigo encontrar tempo para me dedicar ao meu namoro, com uma mulher super especial e compreensiva chamada Camila Souza. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p style="text-align:justify;">Além disso, este ano programava em Java (além de gosto, também trabalhava com a mesma) e estudando Rails fortemente. Agora estou com .NET e continuo estudando Rails!</p>
<p style="text-align:justify;">Neste meio tempo, lancei meu site para me aperfeiçoar no Rails e apresentar um pouco do que faço não deixem de acessar em <a title="Bruno Arueira" href="http://www.brunoarueira.com" target="_blank">http://www.brunoarueira.com</a>.</p>
<p style="text-align:justify;">Logo, minha vida mudou de ponta cabeça, tendo muitas mudanças e assim fechou meu ano resumidamente.</p>
<p style="text-align:justify;">Agora e 2011? Como será? Só enfrentando para ver! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align:justify;">E é com esse intuito que desejo um Feliz Ano Novo de muita paz, felicidade e muito sucesso a todos! Que venha inúmeras oportunidades para todos.</p>
<p style="text-align:justify;">Até o próximo post,</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brunoarueira.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brunoarueira.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brunoarueira.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brunoarueira.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brunoarueira.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brunoarueira.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brunoarueira.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brunoarueira.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brunoarueira.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brunoarueira.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brunoarueira.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brunoarueira.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brunoarueira.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brunoarueira.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=119&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brunoarueira.wordpress.com/2010/12/31/retrospectiva-2010-e-feliz-ano-novo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf5da0d40d58e6622cac0ed85199fcb8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bruno_arueira</media:title>
		</media:content>
	</item>
		<item>
		<title>Feliz Natal</title>
		<link>http://brunoarueira.wordpress.com/2010/12/24/feliz-natal/</link>
		<comments>http://brunoarueira.wordpress.com/2010/12/24/feliz-natal/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 11:01:15 +0000</pubDate>
		<dc:creator>Bruno Arueira</dc:creator>
				<category><![CDATA[Off-Topic]]></category>

		<guid isPermaLink="false">http://brunoarueira.wordpress.com/?p=117</guid>
		<description><![CDATA[Olá, Mesmo tendo voltado a rotina de não postar em pequenos espaços de tempo. Quero desejar aos leitores deste blog um feliz natal de muita paz e luz no caminho de todos. Segue uma frase que considero representar bem este momento: &#8220;Eu sempre pensei em Natal como um tempo bom; um bem, perdão, generosidade, época [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=117&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Olá,</p>
<p>Mesmo tendo voltado a rotina de não postar em pequenos espaços de tempo.</p>
<p>Quero desejar aos leitores deste blog um feliz natal de muita paz e luz no caminho de todos.</p>
<p>Segue uma frase que considero representar bem este momento:</p>
<h3><em><strong>&#8220;Eu sempre pensei em Natal como um tempo bom; um bem, perdão,  generosidade, época agradável; uma época em que os homens e mulheres  parecem abrir os corações deles/delas espontaneamente, e assim eu digo,  Deus abençoe o Natal!&#8221;</strong></em></h3>
<p style="text-align:right;">Charles Dickens</p>
<p style="text-align:left;">&nbsp;</p>
<p style="text-align:left;">Até,</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brunoarueira.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brunoarueira.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brunoarueira.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brunoarueira.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brunoarueira.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brunoarueira.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brunoarueira.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brunoarueira.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brunoarueira.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brunoarueira.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brunoarueira.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brunoarueira.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brunoarueira.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brunoarueira.wordpress.com/117/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=117&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brunoarueira.wordpress.com/2010/12/24/feliz-natal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf5da0d40d58e6622cac0ed85199fcb8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bruno_arueira</media:title>
		</media:content>
	</item>
		<item>
		<title>Lançamento do meu site</title>
		<link>http://brunoarueira.wordpress.com/2010/11/15/lancamento-do-meu-site/</link>
		<comments>http://brunoarueira.wordpress.com/2010/11/15/lancamento-do-meu-site/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 15:30:52 +0000</pubDate>
		<dc:creator>Bruno Arueira</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[css 3]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[rubyonrails]]></category>
		<category><![CDATA[site pessoal]]></category>

		<guid isPermaLink="false">http://brunoarueira.wordpress.com/?p=93</guid>
		<description><![CDATA[Pessoal, Como forma de aprendizado e de profissionalizar mais o meu serviço resolvi criar um site para mostrar o meu portfólio, os tipos de serviços que posso desenvolver e um pouco sobre mim acessem em http://www.brunoarueira.com. Mas qual é a parte do aprendizado em se criar um site? Tinha vontade a muito tempo de aprender [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=93&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Pessoal,</p>
<p style="text-align:justify;">Como forma de aprendizado e de profissionalizar mais o meu serviço resolvi criar um site para mostrar o meu portfólio, os tipos de serviços que posso desenvolver e um pouco sobre mim acessem em <a title="Bruno Arueira" href="http://www.brunoarueira.com" target="_blank">http://www.brunoarueira.com</a>.</p>
<p style="text-align:justify;"><em><strong>Mas qual é a parte do aprendizado em se criar um site?</strong></em></p>
<p style="text-align:justify;">Tinha vontade a muito tempo de aprender Ruby e consequentemente um dos frameworks mais famosos da linguagem que é o Rails, então o site foi todo desenvolvido utilizando:</p>
<ul style="text-align:justify;">
<li><a title="Ruby on Rails" href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a>;</li>
<li>CSS 3;</li>
<li><a title="jQuery" href="http://jquery.com/" target="_blank">jQuery</a>;</li>
<li>Criação de sitemap para facilitar indexação nos sistemas de busca;</li>
<li>Pesquisas sobre SEO (Search Engine Optimization) para o site ficar otimizado para os sistemas de busca;</li>
<li>Utilizando como backend a <a title="Web App Theme" href="https://github.com/pilu/web-app-theme" target="_blank">gem Web App Theme</a> para geração da estrutura de admin do site;</li>
<li><a href="https://github.com/josevalim/inherited_resources">Inherited Resources</a> para Controllers mais magros (vide <a title="Post do Akita sobre Controllers Restful Magros com Inherited Resources" href="http://akitaonrails.com/2009/09/01/screencast-controllers-restful-magros-com-inherited-resources" target="_blank">post do Akita</a>);</li>
<li><a title="Will Paginate" href="https://github.com/mislav/will_paginate" target="_blank">Gem Will paginate</a> para paginação dos dados apresentados na tela;</li>
<li>Internacionalização do sistema todo que se encontra em Português e em Inglês (falta ainda traduzir determinadas coisas) com o i18n do próprio rails, além das rotas com o <a title="Translate Routes" href="https://github.com/raul/translate_routes" target="_blank">Translate Routes</a>;</li>
<li>E possui um sistema de autenticação baseado na <a title="Devise" href="https://github.com/plataformatec/devise" target="_blank">gem Devise</a>;</li>
<li>Banco de dados PostgreSQL;</li>
</ul>
<p style="text-align:justify;">Sobre a parte de TDD que deve ser a base para qualquer software hoje em dia com intenção de facilitar a manutenção entre outros milhares de benefícios que este apresenta, foi utilizado uma abordagem que dá mais face aos testes automatizados que é o BDD e os mesmos estão listados a seguir:</p>
<ul style="text-align:justify;">
<li><a title="Rspec" href="https://github.com/dchelimsky/rspec/" target="_blank">Rspec</a>;</li>
<li><a title="Machinist" href="https://github.com/notahat/machinist" target="_blank">Machinist</a>;</li>
<li>Faker;</li>
<li><a title="Cucumber" href="https://github.com/aslakhellesoy/cucumber" target="_blank">Cucumber</a>.</li>
</ul>
<p style="text-align:justify;"><em><strong>Onde foi hospedado?</strong></em></p>
<p style="text-align:justify;">Foi hospedado no <a title="Heroku" href="http://heroku.com" target="_blank">heroku</a> utilizando uma conta básica free com o addon Custom Domains para adição do meu domínio próprio e no heroku o deploy é super simples usando comandos do GIT (controlador de versão muito utilizado atualmente).</p>
<p style="text-align:justify;"><em><strong>E a performance?</strong></em></p>
<p style="text-align:justify;">Utilizei algumas abordagens para melhorar a performance da renderização do html e cacheamento do CSS e do Javascript contido na página com a utilização do plugin <a title="Asset Fingerprint" href="https://github.com/eliotsykes/asset_fingerprint" target="_blank">Asset Fingerprints</a> e da gem <a title="Asset Packager" href="https://github.com/eandrejko/asset_packager" target="_blank">Asset Packager</a> (customizado para utilizar o yuicompressor da Yahoo) me baseando principalmente nos add ons para Firefox <a title="YSlow" href="https://addons.mozilla.org/pt-BR/firefox/addon/5369/" target="_blank">YSlow</a> da Yahoo e Page Speed da Google obtendo resultados satisfatórios neles.</p>
<p style="text-align:justify;">Também baseando-se na idéia de se criar um CDN (Content Delivery Network) criei uma app no Google App Engine para servir meus arquivos de CSS, Javascript e imagens seguindo <a title="Google App Engine as my own cdn" href="http://www.digitalistic.com/2008/06/09/10-easy-steps-to-use-google-app-engine-as-your-own-cdn/" target="_blank">um post que encontrei na Internet</a> criando a estrutura de uma app em Python para web tendo como conteúdo todos os assets do meu projeto!</p>
<p style="text-align:justify;">O site em si está simples com um layout bem customizado para as diferentes versões de browsers existentes que já se utilizam de CSS 3 ou não. E de certa maneira me deu um ótimo aprendizado sobre Ruby on Rails.</p>
<p style="text-align:justify;">Se lembrar de mais algo que foi utilizado nele atualizarei este post.</p>
<p style="text-align:justify;">Pois bem acessem e comentem, critiquem e dêem sugestões de melhorias que serão muito bem vindas.</p>
<p style="text-align:justify;">E caso queiram me contratar, podem entrar em contato através de contato @ brunoarueira.com, formulário de contato no site ou então deixando algum comentário informando o e-mail para que entre em contato!</p>
<p style="text-align:justify;">Até,</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brunoarueira.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brunoarueira.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brunoarueira.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brunoarueira.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brunoarueira.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brunoarueira.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brunoarueira.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brunoarueira.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brunoarueira.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brunoarueira.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brunoarueira.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brunoarueira.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brunoarueira.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brunoarueira.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brunoarueira.wordpress.com&amp;blog=4785823&amp;post=93&amp;subd=brunoarueira&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brunoarueira.wordpress.com/2010/11/15/lancamento-do-meu-site/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf5da0d40d58e6622cac0ed85199fcb8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bruno_arueira</media:title>
		</media:content>
	</item>
	</channel>
</rss>
