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.
How to Apply RuboCop to Your Large Rails Codebase
Learn how to use HoundCI and RuboCop to maintain your codebase with an evolving team.
How to Write a Cucumber Test for Google Maps
Trying to write a Cucumer test for a Google Maps related feature is a bit trickier than you might expect. It involves tweaking the Google Map on the testing environment and using a javascript capable driver like Selelnium. How to Write a Cucumber Test for Google Maps
Finding and Fixing Frustrating Test Behavior
Tests that behave oddly by failing or even passing in unexpected ways decrease confidence in your test suite, and are simply a pain. Luckily there are some pragmatic solutions to frustrating tests. [more inside]
Bootstrapping a Business Around Open Source
Phusion, the authors behind the popular Passenger app server, published an article on how they’ve built a business around open source. This article discusses how building a business can make an open source project sustainable. Features a quote from Mike Perham who now works on the Sidekiq gem full time.
Hunting Down The Scoop On ActiveRecord Scopes
Scopes are a handy tool provided to us by ActiveRecord
. But how do you know when to use a scope? And what makes a scope different — and sometimes more useful! — than a class method? This blog post hunts down the scoop on exactly how the scope
method works.
New rails importing gem
A new and modern importing gem for ruby on rails. https://github.com/ndea/rimportor
Using a Proc for Rails' asset_host
A quick Rails workaround for CORS headers not appearing on your fonts: http://cookieshq.co.uk/posts/rails-tips-asset-host-proc
CAS Authentication Explained
There are some great tools in Ruby for doing single sign-on with CAS. But before you get started, you should make sure you understand the basic concept of how CAS works.
Ruby 2.2.3 Module Basics : Part 6
Ruby 2.2.3 Module methods such as private_class_method, private_instance_methods, private_method_defined?, protected_method_defined? and public_method_defined? is covered in this video
Fix RSpec!
A short session that demonstrate RSpec capacity to match abstract stuff such as the Answer to Life, the Universe, and Everything, literally. [more inside]
Ruby 2.2.3 Module Basics : Part 5
Ruby 2.2.3 Module methods such as instance_methods, method_defined?, class_exec and module_eval is covered in this video
How to write better ruby using mutation testing
Mutation testing is a powerful tool for improving your code. It can help eliminate bugs and find untested code paths. https://blog.blockscore.com/how-to-write-better-code-using-mutation-testing/?ref=rubyflow
Understading `self` in Ruby
A lot of problems faced by beginning Rubyists are caused by not understanding self
. In this post we’ll take a deep dive into self
under conditions both common and uncommon. - http://blog.honeybadger.io/ruby-self-cheat-sheet/
Benchmarking Karafka – how does it handle multiple TCP connections
Recently I’ve released a Ruby Apache Kafka microframework, however I don’t expect anyone to use it without at least a bit information on what it can do. Here are some measurements that I took. http://dev.mensfeld.pl/2015/11/benchmarking-karafka-how-does-it-handle-multiple-tcp-connections/
How to Combine Ruby Sequel and Active Record in One App
Sequel vs ActiveRecord in Rails + easy migration tips: https://netguru.co/blog/ruby-sequel-active-record-app
8th edition of RubyIssue(s)
This is the latest edition of our curated list of ruby related issues collected from GitHub. Bi-monthly email delivery. In this edition you will read about issues from Errbit, Bundler, Ruboto, Shoes and Diaspora.
Fixing File Access Vulnerabilities in Ruby/Rails
A look into how attackers can gain access to your system and manipulate paths, directories, and files to gain access to files they ought not to! This post explores what the File Access vulnerability is, and how to fix it.
The Pretentious Gem
Do you have a pretentious boss or development lead that pushes you to embrace BDD/TDD but for reasons hate it or them? here is a gem to deal with that. Now you CAN write your code first and then GENERATE tests later!! Yes you heard that right! To repeat, this gem allows you to write your code first and then automatically generate tests using the code you’ve written in a straightfoward manner! [more inside]
Policy Object Adventures
Policy objects are pretty much just like service objects. In fact, from what I understand, policy object is actually a service object. The only difference is that policy objects encapsulate operations that exclusively return boolean values. This is how I first structured policy objects in a Rails app. http://blog.katpadi.ph/policy-object-adventures/
Image Manipulation
In applications related to rails manipulation has to be done while uploading the image as per the requisites of the application like back-ground, color and size, which would give a unique look to the applications. Read full article at RailsCarma’s Blog.
Rails 5 allows setting custom HTTP Headers for assets
Read How Rails 5 allows setting custom HTTP Headers for assets and how it solved some Caching Issues for us on Heroku and Fastly.
Ruby 2.2.3 Module Basics : Part 4
Ruby 2.2.3 Module methods such as const_set, constants, include?, included_modules, instance_method is covered in this video
File Uploads 2015
While the Ruby community wasn’t looking, the rest of the world has moved on to having standalone servers to manage & process their file uploads. [more inside]
Simple Rails Maintenance Mode
Downtimes happen and it pays to be prepared. See how easy it is to get a flexible maintenance page ready to go on your Rails or Rack app with Turnout.