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.
A short summary of the mass assignment vulnerability
You may have heard the news about github being hacked and the associated hype around the mass assignment vulnerability. In case you missed it: my new blog post Secure your Rails apps! tries to summarize what was going on, what this vulnerability is and how to protect against it.
Announcing RocketPants
We’ve just released the first public version of RocketPants, a set of tools built on top of ActionController to make building reasonably designed API-specific portions of your applications a little bit easier.
sudo_attributes: Override ActiveRecord protected attributes with ease
With the recent buzz over Github’s mass-assignment security vulnerability, I thought some people might find my sudo_attributes gem useful. It provides a simple API for overriding protected ActiveRecord attributes while not interfering with existing behavior. It is useful in the parts of your application that are not exposed to mass-assignment from external, unfiltered sources. [more inside]
Zonebie: Random Timezones in your Rails Tests
Highgroove just released the zonebie gem: it runs your Rails/ActiveSupport tests in a random timezone to prevent bugs where code wrongly depends on a certain zone being set.
Ruby on REST 4: Using Representers in Rails
The fourth post in the “Ruby On REST” series explains how the roar-rails gem helps using Roar’s representers in Rails REST services. Following the fruit and bowl example it discusses how to parse and render REST documents in a Rails environment.
method_profiler: Find slow methods in your Ruby code
MethodProfiler collects performance information about the methods in your objects and creates reports to help you identify slow methods. The collected data can be sorted in various ways, converted into an array, or pretty printed as a table.
Semaphore is looking for beta testers
Semaphore, a new continuous integration app for Rails projects, is looking for beta testers. It can import any GitHub repository, while the set up & build process is made completely automatic.
Javascript - Really Awesome Tests Simply
I just finished a blogpost about some of my js testing project and how to use them in a straight forward way.
CapybaraEmail
Easily test (and click through) your ActionMailer emails in Capybara
ActiveWarehouse (Ruby ETL) v1.0.0.rc1 is out
If you need to extract data from a system, adapt and transform it to reuse it in another app or a reporting system, while still using Ruby, then look at ActiveWarehouse. [more inside]
Acts as nested interval, like nested set, only faster!
I just ported Pythonic’s acts as nested interval to Rails 3. Nested interval is like nested set, only it’s inserts are faster. [more inside]
writing readable ruby
Over on the Highgroove blog, Brian posts some thoughts on writing readable ruby.
Ruby Object Model - S1 set-theoretically
The document at www.atalon.cz now contains an appendix with a superstructure representation that shows how superclass and eigenclass links can be modelled by set inclusion and membership.
Please stop embedding Bootstrap classes in your HTML!
We love Bootstrap at our company, but we hate seeing people hard-code classes like “span6” and “row” into their HTML. This blog post shows you how you can harness the power of Less to keep your HTML semantic while using Bootstrap.
Changing the default Ruby on Ubuntu 12.04 LTS to 1.9
I think it’s worth getting some help with the next LTS version of Ubuntu. It may already be too late to get Ruby 1.9 included but perhaps if we can get the right people helping out quickly enough maybe that could change? [more inside]
generate Rails app from mind map
I just launched GMindApp. It allows you to generate workflow web applications from mind map drawn from Freemind. Gmindapp will convert the workflow into Ruby on Rails application which you can customize models, views and controllers as usual. It will generate tables and keep track of workflow, security according to the mind map. [more inside]
Rails 3.2.2 has been released
Rails 3.2.2 has been released. This release contains various bug fixes and two important security fixes. The official announcement advises, “Users are recommended to upgrade as soon as possible.” Here are detailed instructions for Installing Rails 3.2 with advice and tips.
A Taste of Metaprogramming
I’ve posted A Taste of Metaprogramming to rakeroutes.com. It’s a quick look into using define_method and method_missing to dynamically write methods for a class.
How I deceased my rails startup time by 60%
I just blogged about how I deceased my rails startup time by 60% with ruby patches from funny-falcon
TConsole 1.1: Dedicated console for MiniTest suite runs
TConsole 1.1 is out! TConsole is a dedicated environment for running your MiniTest suites, both for Rails test suites and for any other project you’re working on that happens to test with MiniTest. It supports Rails environment preloading if you’re into that kind of thing, and also offers a nice concise syntax for running specific test classes and methods. Check out this quick screencast for a demo, or just check out the project page on GitHub.
Work-Stealing & Recursive Partitioning with Fork/Join
JDK7’s Fork/Join combines a double ended queue (deque) and a recursive job partitioning step to minimize synchronization - a great design pattern to keep in mind for single host and distributed cases! A look under the hood of the Fork/Join framework, and a few JRuby examples which will light up all of your available cores.
Learning from Rails' failures
I compiled a list of things Rails didn’t/doesn’t do right in the hope that we can learn from our mistakes.
Two Factor Authentication Example Rails App
I just pushed code to . A bare bones example Rails 3.2 application and test suite demonstrating the use of the Authlogic gem and custom two-factor authentication (TFA) with Google authenticator support. Feedback on the implementation will be appreciated.
Did you know Ruby 1.9 supports the goto statement?
It turns out The Joke Is On Us: How Ruby 1.9 Supports the Goto Statement.