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.
JointJS: Small library that does wonder with Turbolinks
I have been using this small library for over a year now and I thought some of you might like what you see.
A Markov Model created in 3 lines of Ruby.
This is a pretty straightforward example of Markov Chain’s in essentially 3 lines of Ruby to generate “somewhat” realistic hacker news titles. Check out the code with an explanation of how it works.
MicroEvent.rb
A minimal library that allows you to add observer callbacks to Ruby objects. It is implemented in about 15 lines of code. I have used it to build a minimal logging library.
What's your Rails default stack?
You could create a custom Rails template that meets your preferences to speed up your setup process. Or you could use another default stack that’s not an exact match, but gets the job done. Bootstrap your Rails apps faster with Suspenders.
Regexy - collection of useful regular expressions for ruby and rails
Tired of googling things like ‘ruby regex url validation’? Meet regexy - collection of useful regular expressions for ruby and tool that provides a friendly syntax to combine them. You can always create an issue or submit a pull request if you don’t find what you want.
How Do I Know Whether My Rails App Is Thread-safe or Not?
Heroku now recommends using Puma as the app server for your Rails apps. It will help you get more juice out of a dyno, but comes with a caveat: your app needs to be thread-safe. But how can you make sure if that’s the case with your app? Let’s find out.
Substitution with Regex Groupings
More advanced string substitutions. No more need to split strings to map updates and then rejoin. http://6ftdan.com/allyourdev/2015/03/12/substitution-with-regex-groupings/
Policy Object pattern
Small library implements Policy Objects, that isolate policies (invariants) from objects following them. https://github.com/nepalez/policy
best practices releasing semantic versioned Ruby libraries
After building libraries for multiple teams and consuming libraries from others I came up with a list of best practices to handle errors, deprecations and releasing. http://teotti.com/best-practices-releasing-semantic-versioned-ruby-libraries/
Open source iOS library for easier file networking
‘Together with netguru team, we developed carrierwave-iOS, an easy-to-use iOS library which provides a flexible way to download, upload and edit asset files. It’s designed to integrate with carrierwave-iOS-Rails Ruby gem and ease all your file networking aches and pains.’
DIY Ruby CPU profiling - Part I
The learnings from implementing a CPU profiler for Rbkit are being condensed into a series of blog posts that will show you how to write a CPU profiler for Ruby yourself. Check out the first post of the series here : crypt.codemancers.com.
Passenger 5.0.4, fixes more "this website is under heavy load" errors
Hi, I’m Hongli Lai, author of Passenger. We’ve just released version 5.0.4 which fixes more “this website is under heavy load” bugs. This is an important bug that can take sites down, so I all users who are on 5.0.1 and 5.0.2 to upgrade immediately. [more inside]
Business Process - Straightforward Service Object
There are many implementations of the service object pattern out there. We have sat down, rethought it, and came up with the Business Process gem. Easy to plug in into the rails app, in order to encapsulate logic from your controllers. Just name the service by name of the process you want to have, and execute it… as simple as that!
Creating a RubyGems plugin
If you ever wondered how people create that RubyGems plugin that gives you a “gem custom-command”, here’s a how-to.
New gem for Minitest color output 'color_pound_spec_reporter'
Print your test with some basic Ruby Objects color coded. Makes for easier to read test results. https://github.com/danielpclark/color_pound_spec_reporter
Adding Functionality to Ruby Classes with Decorators
Here’s a new post on Adding Functionality to Ruby Classes with Decorators. Hope you enjoy!
Simple Captcha in Ruby On Rails
Just wrote blog on Simple Captcha in Ruby On Rails
A successful ruby on rails performance analysis guideline
In this post I describe a basic guideline I follow to raise awareness of feature performance degradation in a Ruby on Rails web application. The fundamentals apply to other programming language and frameworks: be aware of the expected traffic, responsible feature delivery and load testing.
Refactor Away A Conditional -- Design is Refactoring
Conditionals! No one likes them. They look innocent enough to start, but they attract more conditionals and grow into thorny nests of nested ifs. Blech-o! [more inside]
Vim Config for Rails Ninjas
In this post I’m going through my vim config trying to explain as much as I can all the config options that I use. My work is 99% Ruby on Rails and I use vim to do it so expect my config to have a focus on Ruby. Check out my Vim Config for Rails Ninjas
A couple of callback gotchas (and a Rails 5 fix)
Ever saved a record that your jobs couldn’t find? Or had a callback skipped by your test run? In my latest post, you’ll learn easy fixes for both these problems, and how Rails 5 will make one of those problems go away for good.
Programmers need to learn how to benchmark, or I will kill them all
I was reminded of Zed’s rant last week when my painfully intelligent cofounder with a PhD published a very interesting benchmark, that was wrong by a factor of 3. None of the 30,458 programmers who viewed his post have pointed out his mistake, so I thought it’d be worth talking about some common benchmark issues.
It's All In The Rails Family: Using acts_as_tree
Organizational nerds rejoice! This post explores acts_as_tree and will help you organize all the things.
Ruby: Actionable Meta
Execute all things meta. http://6ftdan.com/allyourdev/2015/03/09/ruby-actionable-meta/