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.
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.
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:
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! Read more
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.
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. Read more
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.
Ruby 2.2.3 Module Basics : Part 3
Ruby 2.2.3 Module basics such as autoload, const_defined? and const_get is covered in this video
factbook.sql World Factbook Country Profiles in SQL (Incl. factbook.db Download)
Hello, I’ve updated the factbook gem, that is, v1.1. What’s news? The script now lets you build an SQL database from the official web pages (country profiles) published by the CIA. To make it easy to get started I’ve added (yet another) new project, that is, /factbook.sql that offers an SQL schema for the World Factbook and includes a pre-built single-file SQLite database, that is, factbook.db for download. Note, using the factbook scripts you can build yourself an up-to-date copy. All code and data public domain. Cheers.
Performance/Load testing with Jmeter/Rails
Performance and load testing with Rails and jmeter from Apache. How to set it up and a min-framework to run your benchmarks easily read more
Mac as IDE
Are you using this editor and that version control app? Think bigger. Instead of jumping between apps or forcing yourself to an IDE use your Mac as a system where apps work together for the greater good.
Ruby's $_ variable
If you’ve ever used Ruby to process text from the command-line, you’ve used — whether you knew it or not — the $_ variable. Knowing where this global is used can help you write shorter and sweeter one-liners that make processing text a breeze; this article explains how.
RailsDB Standalone & runsql to execute SQL directly from command line
Major update for RailsDB. Now you can use RailsDB as standalone app without adding to Gemfile. Read more
Class Hierarchies and Factories in an Object-Oriented language
Ruby is a truly object-oriented language, so our thinking shouldn’t be bound by legacy, class-oriented patterns. This article investigates solutions without complex or inadequate hierarchies and factories, using Modules and Method Injection instead.
attache - Open Source File Upload/Download Microservice
This presentation covers the rationale behind creating an open source microservice for doing file (image) uploads and downloads. Essentially, attache is almost like a self-hosted imgix clone and it is a great replacement for paperclip, carrierwave, dragonfly and even refile. Check out the repo and the demo app.
Rails Response and Assets Compression on Heroku
Shrinking your web response and assets is critical in making your app speedy fast on Heroku. In this blog post, I looked at a few methods to achieve web response and assets compression on Heroku.
Dasherize - CI and GitHub Dashboard for your projects
Dasherize is a beautiful material-based dashboard for your projects which provides you with an overview of open Pull Requests and Issues, and statuses of your CI, all on a single web page. Currently supports GitHub, Travis, CodeShip and CircleCI. Read the blog for some technical details.
deppbot - Automated Dependency Updates
deppbot ensures that your Ruby apps are always up-to-date and saves you time by doing so. Based on your configured schedule, deppbot will run bundle update on your Ruby apps and send the update as a Pull Request to GitHub. You just have to review and merge the informative Pull Request if all’s good and wait for the next one from deppbot. Check out the service or read the blog post to find out more.