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.
New Jekyll Theme Directory Browse by Author, A-Z, And More - A Jekyll Site ;-)
Hello, Max White has relaunched the Jekyll theme directory listing more than 100+ ready-to-fork static sites. What’s news? You can now browse by authors, A to Z. You can subscribe to a web feed and best of all you can try out live demos. Any theme missing? Add yours! It’s just another Jekyll site ;-) Cheers. PS: My favorite theme? Of course Dr Jekyll Classics Books ;-) What’s yours? Let us know. Cheers. (Update: Use new themes.jekyllrc.org domain).
4th edition of RubyIssue(s)
A curated list of ruby related issues collected from GitHub. Bi-monthly email delivery. This 4th edition focuses on documentation. Help the Ruby OS community writing some docs!
From RSpec to Fix
I wrote a short article to introduce Fix 0.7 features, and compare it with RSpec 3.3. Feedback are welcome!
football.db - European Champions League 2015/16 Fixtures (try $ sportdb new cl2015-16
Hello, The plain text football fixtures (datasets) for leagues, teams, match schedules, and more that you can read with the sportdb gem into your SQL database of choice now includes the European (UEFA) Champions League 2015/16. Try using the cl2015-16.rb Datafile to (download and) build yourself a copy e.g.: $ sportdb new cl2015-16 All data, code, and league and JSON HTTP API starter kits public domain. Enjoy. Cheers.
Restful-client - A micro-services environment helper
A handy HTTP client that provides opinionated solutions for some of the common micro-services use cases: https://github.com/AvnerCohen/restful-client
Example Applications for Rails 4.2.4
Not a big deal, but I’ve updated the RailsApps Example Applications for Rails 4.2.4. I keep them up to date with the current release. More importantly, the ones that use the Gibbon gem (for MailChimp) are updated for Gibbon 2.0.
PostgreSQL for Ruby Developers
If you want to learn SQL and improve your database skills in general I just published the perfect book for you: https://gumroad.com/l/postgres
RuboCop 0.34 is out!
Apart from the usual myriad of bugfixes, improvements and new cops, this version introduces a results caching functionality. This functionality will speed up tremendously consecutive RuboCop runs on the same codebase. [more inside]
David Heinemeier Hansson Interview
DHH on Developer On Fire I interviewed David Heinemeier Hansson on my podcast. He was inspiring and had a lot of really amazing things to say and shared his very different outlook. I’d love to know what you think. It was fun speaking with him.
Save image as progressive image using paperclip and imageMagick
Otimizing images is one of the most important branch of the web optimization process. Images that are delivered by the web server to the client’s browser must be optimized in order to improve the page load speed and to offer a better user experience. It’s known that perceived speed is more important than actual speed. Read more here
Envlogic – gem to have a Rails.env like environment var behaviour in non Rails apps
Envlogic is a simple gem that will help you manage your Ruby application environment. Read more here
Testing race conditions in your Rails app
Only 15 people can subscribe to a course, only limited number of people can buy this physical or virtual product, only 200 people can go to a concert, etc. How do you test that this limitation actually work? And not only work but that it works under heavy load, when there are multiple customers trying to buy the last item because it is a hot event or the product is offered with a big discount? [more inside]
How can you avoid developing a monolithic Rails app?
Top Down Vertical Slice Integration
Creating Ruby enumerators on the fly
When you treat your collections as enumerators, you get to use all your favorite functions like #map and #reduce without having to write any extra code. In this post I show you how easy it is to create enumerators on the fly, without defining extra classes or messing around with the Enumerable module. http://blog.honeybadger.io/creating-ruby-enumerators-on-the-fly/
Grape API Throttling with Grape-Attack gem
Grape-Attack has your API endpoints covered. Grape-Attack is a middleware for Grape to add endpoint-specific throttling. Will also take care of setting custom rate limit headers for you.
Please use a favicon for RubyFlow
Please use a favicon for RubyFlow website http://www.rubyflow.com/
Protect your Rails app from PNG bomb attacks
A new Carrierwave plugin to check “real” image size bypassing ImageMagick (which may be fooled by a PNG bomb): https://github.com/DarthSim/carrierwave-bombshelter [more inside]
How to store and securely manage configuration options in Rails
Store secrets in environment variables, secure and manage them. I collected all information about the topic here: https://rorsecurity.info/portfolio/secure-configuration-of-rails-applications
Extending Pundit with dedicated policies
Pundit is a wonderful authorization library and it truly shines through the use of OOP and plain Ruby. However, when used with more than one or two user roles, policy objects can quickly become riddled with complex conditional logic. This article looks at how the basic OO concepts that underly Pundit can be put to good use to create dedicated policies per user role.
Colt Gem RubyCritic Analysis
RubyCritic is easy to use. Here is some stats for Colt gem: Code Metrics using RubyCritic gem
Announcing Ruby Fix 0.7!
After months of drafts, we’re proud to announce the release of Fix! [more inside]
Building a Ruby on Rails App Part 1: The app
We’ve built a real Ruby on Rails app that tracks sale ranking of Rails books on Amazon. And we’re describing the process step by step at Lugo Labs blog.
Devise and Omniauth Upside Down
Devise has an omniauthable module you can mix in the User model to use providers for authentication. My claim is that the proper way of doing it is the opposite, with OmniAuth proposing a Devise strategy as yet another provider. Included : a proof of concept…. :-)