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.
Webp-ffi - ruby wrapper for libwebp
I just finished first version of webp-ffi. For now it support encode png, jpg or tiff image to webp (with options, like quality, resize, crop) and decode to png. [more inside]
CLI + KISS = CLI.K
Aficionados of simplicity, allow me to introduce you to my new command-line interface option parser, CLI.K. Based on Michel Marten’s excellent Clap library, CLI.K takes the code a few steps further by supporting multiple options per definition, single letter “run-on” options and, clearly the most fetching of features, a simple call to the private Kernel method #cli handles it all.
Using ActiveModel::Serializers with DataMapper
Since Steve Klabnik released version 0.7.0 of the active_model_serializers gem and Ryan Bates has produced an excellent Railscast on the topic, I thought I would contribute a little post on using ActiveModel::Serializers with DataMapper. I hope you enjoy it. Please tweet any questions to me @tpitale.
kramdown 1.0.0 released - now under MIT license
I just released kramdown 1.0.0! Feature/bug fix wise it is only an incremental update but from this point on forward kramdown will be released under the MIT license! Enjoy!
football.db - Free Open Football Fixtures&More (Champions League, Bundesliga, World Cup Quali etc.)
I’ve extracted all football fixtures from the sport.db into its own database, that is, football.db. Note, all football fixtures are now plain text (and, thus, reuseable in any programming language). Use the sportdb gem to setup your database, reuse ActiveRecord models, etc. Events include the Champions League 2012/13, World Cup Quali, Bundesliga, and other. Anything missing? Add yours. Cheers.
basic_config: Makes YAML configuration a bit better
Try it out if you haven’t: basic_config. It’s very simple and unobtrusive.
What's new in Sinatra 1.4?
Want to know what’s coming in Sinatra 1.4? Check out my blog post.
Paloma 2.0 - Page-Specific Javascript For Rails Done Right
A new version of Paloma is out! [more inside]
I Wish Ruby Had Interfaces
Types have a bad reputation in the Ruby community for making code harder to read, and adding unnecessary ceremony. In this article I’d like to show that a type system done right can help make code more readable and toolable without constraining the expressiveness of the language. Or in other words, I will show how a type system can allow the flexibility of Ruby and the toolability of Java to coexist in one language. Read more.
Overcoming IE's 4096 selector limit using the CssSplitter gem
There is an annoying CSS limit in IE versions 9 and below, which leads to all CSS selectors beyond the 4095th to be ignored. Due to Sass (–> more selectors) and the asset pipeline (–> bigger stylesheets) this is especially a problem in the Rails world. This blogpost gives a little bit of background on the issue and introduces the CssSplitter gem, which helps Rails developers to split up their overweight stylesheets for IE compatibility. http://railslove.com/blog/2013/03/08/overcoming-ies-4096-selector-limit-using-the-css-splitter-gem
Hound: Track your Rails models and create activity lists from the results
I’ve just built Hound. Hound tracks actions made on your Rails models and supports adding custom actions for easily creating activity lists for any of your models. It’s only just been released and it’s very simple right now but I plan on adding a lot of functionality down the road. https://github.com/injekt/hound
Hacking your bundle for fun and profit
André Arko of Bundler writes about little known Bundler tricks. Check it out here.
Faster, smaller and more beautiful web with WebP
An average page is now over 1300 kB in size and over 60% of that is in images… WebP provides 30-80% improvement over JPEG and PNG - latest news and updates from WebP team, and example Varnish/Nginx configs for WebP detection.
Method Signature You Can Sink Your Teeth Into
Nice intro to Ruby 2.0’s keyword arguments.
New version of gem lazy_caching
I have just released new version (v3.0.0) of gem lazy_caching. It contains a lot of great improvements. Check it now!
Sinatra in SIX lines
Did you know that you only need six lines to implement Sinatra? What crazy things can you do with flip flops? And what’s coming for Ruby 3.0? Check out my talk on this and many more rather irrelevant but highly entertaining things.
Add sitemap support to your Rails 3.x app using DuckMap
Adding a sitemap to your Rails 3.x app is very easy with DuckMap. In fact, all you really need to do is add the duck_map gem to your Rails app and view it at: http://localhost:3000/sitemap.xml [more inside]
Steel City Ruby CFP Opened & Lineup Announced
Steel City Ruby Conf 2013 has opened its CFP and announced its base lineup. The newly launch website has more info.
Full lineup of speakers announced for SpreeConf in Washington, D.C.
The schedule for SpreeConf 2013 has been announced. The conference will be held on March 20-21 and feature two full days of training and talks dedicated to the world’s most flexible e-commerce platform. Tons of Ruby/Rails goodness even if you don’t have an e-commerce project coming up! [more inside]
Inspecting Rails 4 using Ruby 2.0
Ruby 2.0 has a brand new feature very few people talked about: TracePoint. This Ruby 2.0 TracePoint example shows how to use this new feature to look at what Rails does when she handles requests. More specifically what classes and methods are used and how often.
Upgrading Rails: Gems Extracted in Rails 4
I posted a list of gems extracted from Rails 4. When upgrading a Rails 3 application, you may need to pull in a few of these.
RTanque - A videogame for Ruby devs
RTanque is a RoboCode (java) clone for Ruby. The goal is to program the logic for a tank and then send it into battle. Great for learning Ruby or to organize a local competition.
Gemnasium gem 1.0.0 is out
Tech-Angels just launched an open-source gem to upload just the needed files from your projects: gemnasium-1.0.0. More info on the blog post or the project readme.