<?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>My Pragmatic life</title>
	<atom:link href="http://grosser.it/feed/" rel="self" type="application/rss+xml" />
	<link>http://grosser.it</link>
	<description>Building web applications and fighting the daily madness -- Michael Grosser</description>
	<lastBuildDate>Wed, 22 Feb 2012 16:18:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='grosser.it' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>My Pragmatic life</title>
		<link>http://grosser.it</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://grosser.it/osd.xml" title="My Pragmatic life" />
	<atom:link rel='hub' href='http://grosser.it/?pushpress=hub'/>
		<item>
		<title>vpn-fuse aka kill this app when vpn fails</title>
		<link>http://grosser.it/2012/02/06/vpn-fuse-aka-kill-this-app-when-vpn-fails/</link>
		<comments>http://grosser.it/2012/02/06/vpn-fuse-aka-kill-this-app-when-vpn-fails/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 05:43:56 +0000</pubDate>
		<dc:creator>pragmatig</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://grosser.it/?p=1919</guid>
		<description><![CDATA[Lets say you are running something over VPN, and VPN suddenly fails, then this will kill the app you dont want to connect via the normal interface. Its just a small ruby script you can put into e.g. /usr/bin/ vpn-fuse VpnName 'killall secret-app' vpn-fuse BankNetwork 'killall bank-client' vpn-fuse iPredator 'killall transmission-gtk' ... so far only [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1919&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Lets say you are running something over VPN,<br />
and VPN suddenly fails, then this will kill the app you dont want to connect via the normal interface.</p>
<p>Its just a small ruby script you can put into e.g. /usr/bin/</p>
<p><code>
<pre style="font-size:12px;">
vpn-fuse VpnName 'killall secret-app'
vpn-fuse BankNetwork 'killall bank-client'
vpn-fuse iPredator 'killall transmission-gtk'
...
</pre>
<p></code></p>
<p>so far only tested on Ubuntu&#8230;</p>
<p><a href="https://github.com/grosser/dotfiles/blob/master/bin/vpn-fuse" title="vpn-fuse">vpn-fuse</a></p>
<br /> Tagged: <a href='http://grosser.it/tag/ruby/'>Ruby</a>, <a href='http://grosser.it/tag/vpn/'>VPN</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmatig.wordpress.com/1919/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmatig.wordpress.com/1919/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmatig.wordpress.com/1919/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmatig.wordpress.com/1919/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmatig.wordpress.com/1919/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmatig.wordpress.com/1919/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmatig.wordpress.com/1919/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmatig.wordpress.com/1919/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmatig.wordpress.com/1919/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmatig.wordpress.com/1919/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmatig.wordpress.com/1919/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmatig.wordpress.com/1919/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmatig.wordpress.com/1919/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmatig.wordpress.com/1919/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1919&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://grosser.it/2012/02/06/vpn-fuse-aka-kill-this-app-when-vpn-fails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4fc8066b5aeba133f665ec8f30f92a9c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pragmatig</media:title>
		</media:content>
	</item>
		<item>
		<title>XMarks for all mobile browsers</title>
		<link>http://grosser.it/2012/02/05/xmarks-for-all-mobile-browsers/</link>
		<comments>http://grosser.it/2012/02/05/xmarks-for-all-mobile-browsers/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 05:30:10 +0000</pubDate>
		<dc:creator>pragmatig</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://grosser.it/?p=1914</guid>
		<description><![CDATA[Need your bookmarks on the go !? https://mymarks.heroku.com the source is at https://github.com/grosser/mymarks, happy forking<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1914&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Need your bookmarks on the go !?</p>
<p><a href="https://mymarks.heroku.com/">https://mymarks.heroku.com</a></p>
<p>the source is at <a href="https://github.com/grosser/mymarks">https://github.com/grosser/mymarks</a>, happy forking <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmatig.wordpress.com/1914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmatig.wordpress.com/1914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmatig.wordpress.com/1914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmatig.wordpress.com/1914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmatig.wordpress.com/1914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmatig.wordpress.com/1914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmatig.wordpress.com/1914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmatig.wordpress.com/1914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmatig.wordpress.com/1914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmatig.wordpress.com/1914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmatig.wordpress.com/1914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmatig.wordpress.com/1914/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmatig.wordpress.com/1914/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmatig.wordpress.com/1914/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1914&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://grosser.it/2012/02/05/xmarks-for-all-mobile-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4fc8066b5aeba133f665ec8f30f92a9c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pragmatig</media:title>
		</media:content>
	</item>
		<item>
		<title>Do not show I18n missing translation tooltips in production</title>
		<link>http://grosser.it/2012/02/04/do-not-show-i18n-missing-translation-tooltips-in-production/</link>
		<comments>http://grosser.it/2012/02/04/do-not-show-i18n-missing-translation-tooltips-in-production/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 03:41:54 +0000</pubDate>
		<dc:creator>pragmatig</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[I18n]]></category>

		<guid isPermaLink="false">http://grosser.it/?p=1906</guid>
		<description><![CDATA[Problem: Lots of stuff does not need any translation, so we simply leave it untranslated (e.g. firstname shows as Firstname). But this leaves ugly &#8220;missing translation&#8221; spans in out html. Instead of entering senseless translations for everything thats missing, we simply deactivate the tooltips in production, while also avoiding raising/rescuing theses MissingTranslation errors to improve [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1906&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><b>Problem:</b><br />
Lots of stuff does not need any translation, so we simply leave it untranslated (e.g. firstname shows as Firstname). But this leaves ugly &#8220;missing translation&#8221; spans in out html.<br />
Instead of entering senseless translations for everything thats missing, we simply deactivate the tooltips in production, while also avoiding raising/rescuing theses MissingTranslation errors to improve performance(rescue/raise is not cheap).</p>
<p><b>Code:</b><br />
<code>
<pre style="font-size:12px;overflow:hidden;">
# http://grosser.it/2012/02/04/do-not-show-i18n-missing-translation-tooltips-in-production/
# config/initializers/disable_i18n_tooltips.rb
# missing translations
# - Do not show tooltips in production/test
# - Do not raise ( speedup) for every missing translations
I18n::Backend::Base.class_eval do
  def translate_with_default(locale, key, options = {})
    if options[:rescue_format] == :html &amp;&amp; ['test','production'].include?(Rails.env)
      default = key.to_s.gsub('_', ' ').gsub(/\b('?[a-z])/) { $1.capitalize }
      options.reverse_merge!(default: default)
    end
    translate_without_default(locale, key, options)
  end

  alias_method_chain :translate, :default
end
</pre>
<p></code></p>
<br /> Tagged: <a href='http://grosser.it/tag/i18n/'>I18n</a>, <a href='http://grosser.it/tag/rails/'>Rails</a>, <a href='http://grosser.it/tag/ruby/'>Ruby</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmatig.wordpress.com/1906/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmatig.wordpress.com/1906/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmatig.wordpress.com/1906/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmatig.wordpress.com/1906/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmatig.wordpress.com/1906/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmatig.wordpress.com/1906/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmatig.wordpress.com/1906/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmatig.wordpress.com/1906/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmatig.wordpress.com/1906/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmatig.wordpress.com/1906/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmatig.wordpress.com/1906/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmatig.wordpress.com/1906/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmatig.wordpress.com/1906/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmatig.wordpress.com/1906/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1906&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://grosser.it/2012/02/04/do-not-show-i18n-missing-translation-tooltips-in-production/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4fc8066b5aeba133f665ec8f30f92a9c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pragmatig</media:title>
		</media:content>
	</item>
		<item>
		<title>parallel_split_test &#8212; Split slow tests into multiple chunks and run them in parallel</title>
		<link>http://grosser.it/2012/02/04/parallel_split_test-split-slow-tests-into-multiple-chunks-and-run-them-in-parallel/</link>
		<comments>http://grosser.it/2012/02/04/parallel_split_test-split-slow-tests-into-multiple-chunks-and-run-them-in-parallel/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 03:31:24 +0000</pubDate>
		<dc:creator>pragmatig</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://grosser.it/?p=1903</guid>
		<description><![CDATA[If you want to run 1 big/slow test file, use Parallel-Split-Test, it splits it into multiple chunks and then runs them in parallel. PS: If you have lots of tests you should take a look at Parallel-Tests, which runs multiple files in parallel. This became necessary because in our current project: spec runtime=3h (without integration) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1903&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you want to run 1 big/slow test file, use <a href="https://github.com/grosser/parallel_split_test">Parallel-Split-Test</a>, it splits it into multiple chunks and then runs them in parallel.</p>
<p>PS: If you have lots of tests you should take a look at <a href="https://github.com/grosser/parallel_tests">Parallel-Tests</a>, which runs multiple files in parallel.</p>
<p>This became necessary because in our current project: spec runtime=3h (without integration) / slowest file=5 minutes. Now this time is only 1/3rd.</p>
<br /> Tagged: <a href='http://grosser.it/tag/rails/'>Rails</a>, <a href='http://grosser.it/tag/ruby/'>Ruby</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmatig.wordpress.com/1903/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmatig.wordpress.com/1903/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmatig.wordpress.com/1903/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmatig.wordpress.com/1903/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmatig.wordpress.com/1903/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmatig.wordpress.com/1903/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmatig.wordpress.com/1903/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmatig.wordpress.com/1903/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmatig.wordpress.com/1903/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmatig.wordpress.com/1903/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmatig.wordpress.com/1903/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmatig.wordpress.com/1903/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmatig.wordpress.com/1903/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmatig.wordpress.com/1903/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1903&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://grosser.it/2012/02/04/parallel_split_test-split-slow-tests-into-multiple-chunks-and-run-them-in-parallel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4fc8066b5aeba133f665ec8f30f92a9c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pragmatig</media:title>
		</media:content>
	</item>
		<item>
		<title>Prevent ActionMailer from sending to deleted users / blacklisted addresses</title>
		<link>http://grosser.it/2011/12/22/prevent-actionmailer-from-sending-to-deleted-users-blacklisted-addresses/</link>
		<comments>http://grosser.it/2011/12/22/prevent-actionmailer-from-sending-to-deleted-users-blacklisted-addresses/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 10:11:11 +0000</pubDate>
		<dc:creator>pragmatig</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Mail]]></category>

		<guid isPermaLink="false">http://grosser.it/?p=1890</guid>
		<description><![CDATA[No need to check in normal code, just do everything as usual and this interceptor will prevent you from spamming people who do not want any emails. Its not perfect(missing bc/bcc filters but if should be fine for 90% of cases) #config/initializers/blacklisted_emails.rb class MailInterceptor def self.delivering_email(message) if User.where(:email =&#62; message.to, :receive_emails =&#62; false).any? message.perform_deliveries = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1890&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>No need to check in normal code, just do everything as usual and this interceptor will prevent you from spamming people who do not want any emails.<br />
Its not perfect(missing bc/bcc filters but if should be fine for 90% of cases)</p>
<pre style="font-size:12px;overflow:auto;">
#config/initializers/blacklisted_emails.rb
class MailInterceptor
  def self.delivering_email(message)
    if User.where(:email =&gt; message.to, :receive_emails =&gt; false).any?
      message.perform_deliveries = false
    end
  end
end

Mail.register_interceptor(MailInterceptor)
</pre>
<br /> Tagged: <a href='http://grosser.it/tag/mail/'>Mail</a>, <a href='http://grosser.it/tag/rails/'>Rails</a>, <a href='http://grosser.it/tag/ruby/'>Ruby</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmatig.wordpress.com/1890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmatig.wordpress.com/1890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmatig.wordpress.com/1890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmatig.wordpress.com/1890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmatig.wordpress.com/1890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmatig.wordpress.com/1890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmatig.wordpress.com/1890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmatig.wordpress.com/1890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmatig.wordpress.com/1890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmatig.wordpress.com/1890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmatig.wordpress.com/1890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmatig.wordpress.com/1890/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmatig.wordpress.com/1890/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmatig.wordpress.com/1890/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1890&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://grosser.it/2011/12/22/prevent-actionmailer-from-sending-to-deleted-users-blacklisted-addresses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4fc8066b5aeba133f665ec8f30f92a9c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pragmatig</media:title>
		</media:content>
	</item>
		<item>
		<title>You dont need RSpec in :development</title>
		<link>http://grosser.it/2011/12/11/you-dont-need-rspec-for-development/</link>
		<comments>http://grosser.it/2011/12/11/you-dont-need-rspec-for-development/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 17:52:07 +0000</pubDate>
		<dc:creator>pragmatig</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://grosser.it/?p=1885</guid>
		<description><![CDATA[You can speed up development load time and get rid of rspec in development if you simply not require it in :development and just load the tasks in the Rakefile where they are needed. # Gemfile group :development, :test do gem 'rspec-rails', :require =&#62; false end # Rakefile require File.expand_path('../config/application', __FILE__) require 'rspec-rails' if ['test', [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1885&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can speed up development load time and get rid of rspec in development if you simply not require it in :development and just load the tasks in the Rakefile where they are needed.</p>
<pre style="overflow:auto;font-size:12px;">
# Gemfile
group :development, :test do
  gem 'rspec-rails', :require =&gt; false
end

# Rakefile
require File.expand_path('../config/application', __FILE__)
require 'rspec-rails' if ['test', 'development'].include?(Rails.env)
...
</pre>
<p>Repeat for any other testing lib for even more speedup <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br /> Tagged: <a href='http://grosser.it/tag/rails/'>Rails</a>, <a href='http://grosser.it/tag/ruby/'>Ruby</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmatig.wordpress.com/1885/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmatig.wordpress.com/1885/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmatig.wordpress.com/1885/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmatig.wordpress.com/1885/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmatig.wordpress.com/1885/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmatig.wordpress.com/1885/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmatig.wordpress.com/1885/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmatig.wordpress.com/1885/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmatig.wordpress.com/1885/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmatig.wordpress.com/1885/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmatig.wordpress.com/1885/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmatig.wordpress.com/1885/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmatig.wordpress.com/1885/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmatig.wordpress.com/1885/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1885&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://grosser.it/2011/12/11/you-dont-need-rspec-for-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4fc8066b5aeba133f665ec8f30f92a9c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pragmatig</media:title>
		</media:content>
	</item>
		<item>
		<title>Running tests via spork directly from Rubymine</title>
		<link>http://grosser.it/2011/12/06/running-tests-via-spork-directly-from-rubymine/</link>
		<comments>http://grosser.it/2011/12/06/running-tests-via-spork-directly-from-rubymine/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 03:48:59 +0000</pubDate>
		<dc:creator>pragmatig</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://grosser.it/?p=1874</guid>
		<description><![CDATA[Very fast test execution from inside Rubymine. Cmd+F8 + 2 seconds == test results 1 Activate DRB in Rubymine Run &#62; Edit configurations &#62; Defaults &#62; RSpec &#62; Use DRB Server 2 a) Start spork from Rubymine Tools &#62; Run Spork DRB Server 2 b) (alternatively) start spork from the commandline Code # spec/spec_helper.rb Spork.prefork [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1874&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Very fast test execution from inside Rubymine.<br />
Cmd+F8 + 2 seconds == test results <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><b>1 Activate DRB in Rubymine</b><br />
Run &gt; Edit configurations &gt; Defaults &gt; RSpec &gt; Use DRB Server</p>
<p><b>2 a) Start spork from Rubymine</b><br />
Tools &gt; Run Spork DRB Server</p>
<p><b>2 b) (alternatively) start spork from the commandline</b><br />
<b>Code</b></p>
<pre style="font-size:12px;overflow:auto;">
  # spec/spec_helper.rb
Spork.prefork do
  if ENV["RUBYMINE_HOME"]
    puts "Rubymine support"
    $:.unshift(File.expand_path("rb/testing/patch/common", ENV["RUBYMINE_HOME"]))
    $:.unshift(File.expand_path("rb/testing/patch/bdd", ENV["RUBYMINE_HOME"]))
  end
end
</pre>
<p>and run it via:</p>
<pre style="font-size:12px;">
RUBYMINE_HOME=/Applications/Rubymine\ 3.2.4.app/ spork
</pre>
<br /> Tagged: <a href='http://grosser.it/tag/rails/'>Rails</a>, <a href='http://grosser.it/tag/ruby/'>Ruby</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmatig.wordpress.com/1874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmatig.wordpress.com/1874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmatig.wordpress.com/1874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmatig.wordpress.com/1874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmatig.wordpress.com/1874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmatig.wordpress.com/1874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmatig.wordpress.com/1874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmatig.wordpress.com/1874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmatig.wordpress.com/1874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmatig.wordpress.com/1874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmatig.wordpress.com/1874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmatig.wordpress.com/1874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmatig.wordpress.com/1874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmatig.wordpress.com/1874/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1874&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://grosser.it/2011/12/06/running-tests-via-spork-directly-from-rubymine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4fc8066b5aeba133f665ec8f30f92a9c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pragmatig</media:title>
		</media:content>
	</item>
		<item>
		<title>Capybara: use current_path_info instead of current_path / current_url</title>
		<link>http://grosser.it/2011/11/26/capybara-use-current_path_info-instead-of-current_path-current_url/</link>
		<comments>http://grosser.it/2011/11/26/capybara-use-current_path_info-instead-of-current_path-current_url/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 03:41:22 +0000</pubDate>
		<dc:creator>pragmatig</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Capybara]]></category>

		<guid isPermaLink="false">http://grosser.it/?p=1864</guid>
		<description><![CDATA[Capybara has current_url, which returns an url that is unmatcheable since it includes a randomized port, and current_path with contains neither query nor fragment(aka hash/anchor) and is therefore rather useless. Behold the perfect current_path_info, which returns the full path and query + fragment. Code def current_path_info current_url.sub(%r{.*?://},'')[%r{[/\?\#].*}] &#124;&#124; '/' end Tagged: Capybara<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1864&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Capybara has current_url, which returns an url that is unmatcheable since it includes a randomized port, and current_path with contains neither query nor fragment(aka hash/anchor) and is therefore rather useless.</p>
<p>Behold the perfect current_path_info, which returns the full path and query + fragment.</p>
<p><b>Code</b></p>
<pre style="font-size:12px;">
def current_path_info
  current_url.sub(%r{.*?://},'')[%r{[/\?\#].*}] || '/'
end
</pre>
<br /> Tagged: <a href='http://grosser.it/tag/capybara/'>Capybara</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmatig.wordpress.com/1864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmatig.wordpress.com/1864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmatig.wordpress.com/1864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmatig.wordpress.com/1864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmatig.wordpress.com/1864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmatig.wordpress.com/1864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmatig.wordpress.com/1864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmatig.wordpress.com/1864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmatig.wordpress.com/1864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmatig.wordpress.com/1864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmatig.wordpress.com/1864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmatig.wordpress.com/1864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmatig.wordpress.com/1864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmatig.wordpress.com/1864/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1864&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://grosser.it/2011/11/26/capybara-use-current_path_info-instead-of-current_path-current_url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4fc8066b5aeba133f665ec8f30f92a9c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pragmatig</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding travis hook to new github project via the commandline</title>
		<link>http://grosser.it/2011/11/20/adding-travis-hook-to-new-github-project-via-the-commandline/</link>
		<comments>http://grosser.it/2011/11/20/adding-travis-hook-to-new-github-project-via-the-commandline/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 01:12:22 +0000</pubDate>
		<dc:creator>pragmatig</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://grosser.it/?p=1854</guid>
		<description><![CDATA[I got tired of clicking through the github menus, so after some toying around with the octopi github client (which does not work as expected&#8230;), I wrote this small script using pure rest-client. Creates a new travis hook based on the travis info in your .gitconfig and also triggers the initial test-run. add to ~/.gitconfig [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1854&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I got tired of clicking through the github menus, so after some toying around with the octopi github client (which does not work as expected&#8230;), I wrote this small script using pure rest-client.</p>
<p>Creates a new travis hook based on the travis info in your .gitconfig<br />
and also triggers the initial test-run.</p>
<p><b>add to ~/.gitconfig</b></p>
<pre style="font-size:12px;">
[travis]
  user = xxx
  token = yyy
</pre>
<p><b>download &amp; run the <a href="https://github.com/grosser/dotfiles/blob/master/bin/github-add-travis">Script</a></b><br />
wget https://raw.github.com/grosser/dotfiles/master/bin/github-add-travis</p>
<p>./github-add-travis github-password project-name</p>
<br /> Tagged: <a href='http://grosser.it/tag/ruby/'>Ruby</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmatig.wordpress.com/1854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmatig.wordpress.com/1854/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmatig.wordpress.com/1854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmatig.wordpress.com/1854/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmatig.wordpress.com/1854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmatig.wordpress.com/1854/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmatig.wordpress.com/1854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmatig.wordpress.com/1854/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmatig.wordpress.com/1854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmatig.wordpress.com/1854/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmatig.wordpress.com/1854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmatig.wordpress.com/1854/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmatig.wordpress.com/1854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmatig.wordpress.com/1854/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1854&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://grosser.it/2011/11/20/adding-travis-hook-to-new-github-project-via-the-commandline/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4fc8066b5aeba133f665ec8f30f92a9c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pragmatig</media:title>
		</media:content>
	</item>
		<item>
		<title>Switching form Public Domain to MIT</title>
		<link>http://grosser.it/2011/10/27/switching-for-public-domain-to-mit/</link>
		<comments>http://grosser.it/2011/10/27/switching-for-public-domain-to-mit/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 23:00:21 +0000</pubDate>
		<dc:creator>pragmatig</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://grosser.it/?p=1848</guid>
		<description><![CDATA[All my new projects will be released under MIT / those I work on will be switched, which will still means the same as before: Do wtf you want with this code, no need for any naming/license copying. After reading some articles I realized that public domain does not always work since some countries do [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1848&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>All my new projects will be released under MIT / those I work on will be switched, which will still means the same as before: Do wtf you want with this code, no need for any naming/license copying.</p>
<p>After reading some <a href="http://stackoverflow.com/questions/219742/open-source-why-not-release-into-public-domain">articles</a> I realized that public domain does not always work since some countries do not allow it and its also unclear what happens when the code causes problems &lt;-&gt;  lawsuit.</p>
<p>Ill also try to add a s.license = &#8216;MIT&#8217; to all gemspecs, to make license management easier.</p>
<br /> Tagged: <a href='http://grosser.it/tag/ruby/'>Ruby</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmatig.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmatig.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmatig.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmatig.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmatig.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmatig.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmatig.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmatig.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmatig.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmatig.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmatig.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmatig.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmatig.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmatig.wordpress.com/1848/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=grosser.it&amp;blog=2921704&amp;post=1848&amp;subd=pragmatig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://grosser.it/2011/10/27/switching-for-public-domain-to-mit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4fc8066b5aeba133f665ec8f30f92a9c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pragmatig</media:title>
		</media:content>
	</item>
	</channel>
</rss>
