RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

trevorturk — 26 posts

http://trevorturk.com/

I'm very happy to release CarrierWave version 0.5.3. It features a new fog storage provider written by @geemus, author of the fog gem. It seamlessly supports Amazon S3, Rackspace Cloud Files, and Google Storage for Developers. There are plenty of other bug fixes and improvements from lots of contributors new and old. You can read the full release notes here. Feedback on this new storage provider is definitely welcome. Enjoy!
I just published my first Rails 3 gem engine: delayed_job_admin. It's a simple admin interface for Delayed::Job. José Valim's enginex made it a breeze. I gather that Piotr Sarnacki pulled the functionality into the in-progress Rails 3.1, so making engines like this is going to be a no-brainer very soon. Give it a try - it's easier to create a well-tested gem engine than you might think!
I've done a quick blog post with a couple of rake tasks that let you easily cache your assets in a Rails 3 app on Heroku. This lets you use the javascript_include_tag and/or stylesheet_link_tag helpers with the "cache => true" option while working around Heroku's read-only filesystem constraint. Feedback is definitely welcome. Thanks!
I just wrote a short piece about how to get someone started with Rails. I'm using a simple "do it yourself" 3-part strategy that involves pushing them in head first and seeing if they can swim ;) I'm curious if anyone else has experience with this kind of thing, though. Comments and suggestions are more than welcome!
Automated Heroku Backups  almosteffortless.com
I think this is a good technique for automatic nightly PostgreSQL database backups from Heroku to Amazon S3. Feedback would be great!
WindyCityRails (a one day Ruby/Rails conference in Chicago on Sept 12, 2009) is only $99 if you register by August 1st. After that, it's going up to $149. Last year was great, and the schedule this year looks good, too.
El Dorado (an open source Rails app featuring a forum, group chat, etc) is now extremely easy to install on Heroku. This means that deploying El Dorado is no longer a pain in the ass. It also means that you can get started with El Dorado for free. Hopefully, other open-source Rails apps will follow suit? I'd sure appreciate it ;)
Time Bomb Tests  almosteffortless.com
Time Bomb Tests: easy cheesy reminders you can put into your test suite. They'll sit there like little time bomb reminders - exploding only when you need them to. Useful for reminding yourself about stuff, like what config lines to add when you upgrade to the next version of Rails.
This short article gives you a quick tip that'll speed up your Paperclip-related tests by approximately 70%.
I've been digging around for a good technique for identifying slow running tests after reading this article. I've been playing with ruby-prof and test timer, but I'm not happy with the results. It looks like this is possible with RSpec, but I can't find anything for Test::Unit. Help!
This handy login! test helper is pretty handy.
Quick and Dirty URL Validation  almosteffortless.com
Quick and Dirty URL Validation for Rails apps. Perhaps this will work for you?
patch -p0 rails-3.0
I've been using Paperclip to handle file uploads lately, and I wanted to be able to accept file "uploads" via URL.
Since I've started using attr_accessible for security reasons, I've been bitten a few times while in development. The problem is that attempts to mass-assign protected attributes fail silently, save for a note in the debug log. Here's a quick tip that explains how to raise these failed assignments as exceptions when testing your application.
To my mind, the only thing missing from Test::Unit is an easy way to defer tests. So, here's a quick and dirty way to defer tests in your Rails app without loading up test/spec or RSpec or what have you.
Weekly Digest, First Edition  almosteffortless.com
This is the first of what I hope will become a regular feature on my blog; a weekly digest of interesting links. Since this is the first edition, I've gone back into the archives a bit and pulled out some of my favorites from the last month or so. As a bonus, I thought I'd share the simple little Ruby script I'm using to pull this thing together with the quickness.
Describes a weird gotcha I ran into when using the delayed_job plugin.
Allowing file uploads with attachment_fu is super easy, but I've found that users sometimes want to be able to "upload" a file directly from a URL. This saves them the steps of downloading the file, finding it on their computer, uploading it into your app, etc.
Here's a quick how-to for Creating Valid Records with Populator and Faker. This is a great technique for loading up a database for demos, acceptance testing, or design.
Here's a quick and dirty way to ensure that you're using valid data for your fixtures. I'm not sure what the potential problems of basing all your tests on invalid data are, but I'm sure there's go to be something...
Is TextMate taking forever to load when switching between windows? The problem could be that it's reading all of the media files you've got in your public directory. I ignored public/system, log, and vendor/rails as this article suggests. Massive Victory. Highly Recommended.
Cookie Sessions and Security  groups.google.com
I've noticed that a lot of open-source rails apps come with a secret key used for cookie sessions checked into their public repo. My worry is that this key may be used by others in production, which could cause a security concern. If you think you might be affected, read more on the rails core list.
Simple Localization in Rails 2.2  almosteffortless.com
A short tutorial/exploration of the upcoming localization features scheduled for Rails 2.2.
WindyCityRails  windycityrails.org
WindyCityRails is a gathering for all who are passionate about Ruby on Rails. It's a small, non-profit conference that costs $99 to attend, and well be held in Chicago on Sept 20th. Only 180 seats available, so sign up soon! :)
Reposting... El Dorado version 0.9.2 (Group Chat Edition) has been released. This version of the "Rails app for small groups" adds a very simple real-time group chat to compliment the forum and file sharing features.