The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
bundle exec rails … executes Bundler.setup 3 times
Santiago Pastorino posted about it here.
Your Rails Application is Missing a Domain Controller
Do you find it difficult to determine the API of the domain layer in your complex Rails application? Where should you put workflow logic that collaborates with multiple models? Are you models getting bloated with multiple responsibilities? Perhaps your Rails application is missing a Domain Controller.
I just released a gem for multipart emails w/ alt. content types & attachments in ActionMailer 3
When you need alternative content types and (inline) attachments in a email, the correct MIME hierarchy quickly becomes complex. My new gem mail_alternatives_with_attachments makes it easy just like the rest of ActionMailer.
attr_accessible_block gives you dynamic attr_accessible
attr_accessible_block is an ActiveModel plugin that gives a few features to deal with mass-assignment while runtime.
034 Ruby Rogues Benchmarking and Profiling
This week the Ruby Rogues discussed benchmarking and profiling, tools to use, what the results mean and how to (and not to) use those results, with Aaron Patterson.
Introducing Kue - A Rails Ready Key Value Store That Uses ActiveRecord Under The Hood
An activerecord backed key value store gem called kue.
csv_import gem
I just launched csv_import gem. Any ideas, suggestions are welcomed.
market_beat gem released
Market Beat fetches stock quotes and 100+ other market indicators (including real-time) from publicly available sources. Currently Google and Yahoo U.S. financial reporting services are supported. Check out Market Beat source code on Github.
gabbler gem released
Feed Gabbler any coherent text file with adequate number of sentences. Once trained, Gabbler produces pseudo-random phrases based on the original text. Check out Gabbler source code on Github.
awesome_print gem 1.0.2 released
Maintenance release of your bug bash party favorite. New version adds formatting of Mongoid documents, improves Rails.logger.ap, and more. Check out CHANGELOG for details.
Konf - Simple Configuration Reader
Simple configuration reader: Konf. There are many like it, but this one is mine.
Making a custom Markdown renderer with Redcarpet
I just blogged some fun custom Markdown rendering code with Redcarpet. Normally, I’m all about best practices, but this code is just quick and dirty!
Get a Sinatra/JSON/MongoDB service up and running in 5 minutes or less
A quikstart walkthrough tutorial of creating a Sinatra JSON API coupled with MongoDb
Mounting a Cell to a Route with Cells 3.8.
Cells 3.8 is out! Since we got rid of the ActionController dependency we can now mount cells on Rails routes, directly and have super fast view components.
Let’s Talk About Conditional Expressions
Evan Light talks about conditional expressions in this guest blog post on RubyLearning.
Otto - auto-define your rack apps in plain-text
Apps built with Otto have three, basic parts: a rackup file, a ruby file, and a routes file. If you’ve built a Rack app before, then you’ve seen a rackup file before. The ruby file is your actual app and the routes file is what Otto uses to map URI paths to a Ruby class and method.
dust-deploy (sprinkle/chef/puppet alternative)
I just launched dust. It’s a ssh/facter only push-deployment tool, designed to handle complex linux server structures. Configure nodes using simple yaml files, and push your nginx, iptables, mysql, duplicity, ssh authorized_keys, … to one or multiple servers.
Write better Cucumber steps using the rel attribute
I just blogged about Cucumber and the rel attribute. It’s really more about web standards and automated testing, though.
Rails: rails vs ./script/rails
As the DevOps guy in our organization, I spend a lot of time booting consoles and running scripts against our application, so Jesse’s post about the overhead of rails and exec(2) really piqued my interest. A savings of a second or two can make a big difference. Read on to see the difference between rails and ./script/rails in our application.
The rails command and exec(2)
The rails command is just a thin wrapper around exec(2). Read the article to find out what exec(2) is, why the rails command uses it, and how you can skip it altogether.
Thinking of using Ruby metaprogramming?
Be sure to follow some simple best practices; see: Learning from the masters part 2: three metaprogramming best practices.
Eventually: an evented API with Ruby callback idioms in mind
I just finished writing eventually, a new gem built with a similar API to the excellent EventEmitter library that comes with NodeJS. The README says it all, or go grab it off rubygems and let me know how it fares. Comments welcome.
link_to_unless_current and other secret helpers
I’ve just finished a blog post about link_to’s little brothers and sisters: http://www.rails-troubles.com/2009/12/to-link-or-not-to-link-rails-link.html [more inside]
Evax Gem: Another Ruby Assets Compressor
The idea behind it is to have a really simple library to compress your assets in the simplest way without any weird dependency (who said Java?). There are nice assets packaging systems out there but they have too many options for some cases. Sometimes, you just want to play with a pet project. I hope that Evax will help you!