<?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/"
	>

<channel>
	<title>Bradly Feeley &#187; Merb</title>
	<atom:link href="http://bradlyfeeley.com/category/merb/feed/" rel="self" type="application/rss+xml" />
	<link>http://bradlyfeeley.com</link>
	<description>San Diego Ruby on Rails Developer</description>
	<lastBuildDate>Wed, 07 Oct 2009 02:50:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Authentication Setup with Merb Auth and Merb Stack</title>
		<link>http://bradlyfeeley.com/2008/10/11/authentication-setup-with-merb-auth-and-merb-stack/</link>
		<comments>http://bradlyfeeley.com/2008/10/11/authentication-setup-with-merb-auth-and-merb-stack/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 22:45:16 +0000</pubDate>
		<dc:creator>Bradly Feeley</dc:creator>
				<category><![CDATA[Merb]]></category>
		<category><![CDATA[merbcamp]]></category>
		<category><![CDATA[merb_auth]]></category>

		<guid isPermaLink="false">http://bradlyfeeley.com/?p=74</guid>
		<description><![CDATA[This week I was lucky enough to spend two days at the Merb Sprint. At the sprint I spent some time testing the install and setup process for the Merb Stack and merb_auth (the merb authentication gem). Dan Neighman (aka hassox) spent some time with me going over the merb_auth process and this is my [...]]]></description>
			<content:encoded><![CDATA[<p>This week I was lucky enough to spend two days at the Merb Sprint. At the sprint I spent some time testing the install and setup process for the Merb Stack and merb_auth (the merb authentication gem). <a href="http://hassox.blogspot.com/" target="_blank">Dan Neighman</a> (aka hassox) spent some time with me going over the merb_auth process and this is my attempt to pass the information on.</p>
<p>This walkthrough will take you through the steps to get a Merb app up and running with a protected resource. It assumes you are running Merb 0.9.9 or greater with the Merb Stack (merb-core, merb-more, and datamapper).</p>
<p>Lets start at the beginning and create an app<br />
<code>$ merb-gen app authentication_app<br />
$ cd authentication_app</code></p>
<p>By default merb-gen app will create a user model for you in app/models/user.rb. The model is there, but we still need to create the table in the database and add a user to authenticate with. Lets do that now.<br />
<code>$ rake db:auto_migrate</code></p>
<p>To create our first user we can drop into Merb&#8217;s irb console mode with merb -i. Like Rails&#8217; script/console, merb -i gives you access to your models and other classes.</p>
<p><code>$ merb -i<br />
u = User.new<br />
u.login = 'joe'<br />
u.password = u.password_confirmation = 'password'<br />
u.save<br />
exit</code></p>
<p>In order to test authentication we need something to protect. Any controller would work, but lets create a resource.<br />
<code>$ merb-gen resource secret</code></p>
<p>We will need to add a route to the resource also<br />
<code># router.rb<br />
Merb::Router.prepare do<br />
resources :secrets<br />
...<br />
end</code></p>
<p>To protect a controller with authentication we can use the before filter ensure_authenticated<br />
<code># app/controllers/secrets.rb<br />
class Secrets &lt; Application<br />
before :ensure_authenticated<br />
...<br />
end</code></p>
<p>Everything should now be setup in our app. Lets give it a run through.</p>
<p>First you need to start you merb server. Make sure you are in your merb app&#8217;s root directory.<br />
<code>$ merb</code></p>
<p>Now you can test access to your resource is denied before authentication.</p>
<p>http://localhost:4000/secrets</p>
<p>Login in and try to access the recourse again.</p>
<p>http://localhost:4000/login</p>
<p>http://localhost:4000/secrets</p>
<p>You should now be able to access the resource. Awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://bradlyfeeley.com/2008/10/11/authentication-setup-with-merb-auth-and-merb-stack/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Merb Overheard Launched</title>
		<link>http://bradlyfeeley.com/2008/10/03/merb-overheard-launched/</link>
		<comments>http://bradlyfeeley.com/2008/10/03/merb-overheard-launched/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 22:02:10 +0000</pubDate>
		<dc:creator>Bradly Feeley</dc:creator>
				<category><![CDATA[Merb]]></category>
		<category><![CDATA[launch]]></category>
		<category><![CDATA[merb overheard]]></category>
		<category><![CDATA[pluto]]></category>

		<guid isPermaLink="false">http://bradlyfeeley.com/?p=60</guid>
		<description><![CDATA[Recently, Merb has been getting a lot of attention. With significant changes leading up to the 1.0 release, and now with it&#8217;s own conference, the Merb community needs a centralized place where relevant information can be found. Say hello to Merb Overheard.
Merb Overheard follows the planet-type aggregation sites similar to Planet Ruby on Rails and [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, Merb has been getting a lot of attention. With significant changes leading up to the 1.0 release, and now with it&#8217;s <a href="http://www.merbcamp.org" target="_blank">own conference</a>, the Merb community needs a centralized place where relevant information can be found. Say hello to <a href="http://www.merboverheard.com" target="_blank">Merb Overheard</a>.</p>
<p><a href="http://www.merboverheard.com" target="_blank">Merb Overheard</a> follows the planet-type aggregation sites similar to <a href="http://www.planetrubyonrails.com" target="_blank">Planet Ruby on Rails</a> and <a href="http://www.planet-php.net/" target="_blank">Planet PHP</a>. It follows a list of relevant blogs and aggregates those articles into one place.</p>
<p>When I first decided to build <a href="http://www.merboverheard.com" target="_blank">Merb Overheard</a> I was originally planning on writing it in Merb of course, but I starting to realize all the battles I was going to have ahead of me. Caching and pagination of no database objects were not something I really wanted to deal with, so I decided to try something different. Instead of trying to shove the aggregator into a framework, why not just build out the pages statically?</p>
<p><a href="http://www.merboverheard.com" target="_blank">Merb Overhead</a> is just a plain old ruby script that gets ran every 30 minutes from a cron task. Each time it is ran, all the pages are recreated using Erubius. This script, weighing in at a whopping 8 lines of code, implements two classes in a library I wrote called <a href="http://www.github.com/bradly/pluto" target="_blank">Pluto</a>. The class for the feed aggregator is only 30 lines. The class to generate the view is only 45 lines.</p>
<p>The code is <a href="http://www.github.com/bradly/pluto" target="_blank">released on Github</a> so go nuts creating collecting all your <a href="http://www.geocities.com/furbyfans/" target="_blank">Furby Fan Club</a> sites or whatever else strikes your fancy.</p>
]]></content:encoded>
			<wfw:commentRss>http://bradlyfeeley.com/2008/10/03/merb-overheard-launched/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Merb 0.9.3 and Feather Error: undefined method `empty?&#8217; for nilNilClass</title>
		<link>http://bradlyfeeley.com/2008/05/08/merb-093-and-feather-error-undefined-method-empty-for-nilnilclass/</link>
		<comments>http://bradlyfeeley.com/2008/05/08/merb-093-and-feather-error-undefined-method-empty-for-nilnilclass/#comments</comments>
		<pubDate>Thu, 08 May 2008 19:47:45 +0000</pubDate>
		<dc:creator>Bradly Feeley</dc:creator>
				<category><![CDATA[Merb]]></category>
		<category><![CDATA[feather]]></category>

		<guid isPermaLink="false">http://bradlyfeeley.com/?p=3</guid>
		<description><![CDATA[Recently when setting up this blog using Feather, a new blog app written with Merb, I started getting the following error when hitting the home page:
undefined method `empty?&#8217; for nil:NilClass
Turns out there is a bug is merb-cache (part of merb-more) that is causing the problem. It&#8217;s patched in wycatz&#8217; branch so pull down his latest [...]]]></description>
			<content:encoded><![CDATA[<p>Recently when setting up this blog using Feather, a new blog app written with Merb, I started getting the following error when hitting the home page:<br />
undefined method `empty?&#8217; for nil:NilClass</p>
<p>Turns out there is a bug is merb-cache (part of merb-more) that is causing the problem. It&#8217;s patched in wycatz&#8217; branch so pull down his latest version and get blogging!</p>
<p>Special thanks to my buddy Peter to figuring this one out.</p>
]]></content:encoded>
			<wfw:commentRss>http://bradlyfeeley.com/2008/05/08/merb-093-and-feather-error-undefined-method-empty-for-nilnilclass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
