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.
Take ownership of your code!
Knowing who owns a project or section of a code base is very helpful when asking questions or requesting feedback. This gem allows developers to define OWNERS files throughout their repository to provide a human and machine readable way to determine who the maintainers are for specific files of code. https://github.com/shuber/owners
How To Convert Your Entire Project To Ruby 1.9 Or 2.2 Syntax
The new ruby hash syntax is so much more readable. This article describes converting your entire project to 1.9 or 2.2 format with a simple command. http://solidfoundationwebdev.com/blog/posts/how-to-convert-your-entire-project-to-ruby-1-9-or-2-2-syntax
The Building Blocks of Reliable Software
When solving requirements for a system, you should extract specific roles out into service objects. The lazy path is to solve problems directly where you encounter them such as in the controller, model or view (given you are using MVC of course): https://www.madetech.com/blog/the-building-blocks-of-reliable-software
Private classes in Ruby
Did you know you can have Private classes in Ruby which can help showing that the class is an implementation detail of the Unit?
How to Schedule Tasks With Ruby on Rails
When it comes to Ruby on Rails which prefers convention over configuration, a scheduler is a must. Scheduling job can be defined as “a decision process of committing resources between varieties of tasks”. It is basically a function enabling one to perform routine tasks as part of a sequence. Read more at RailsCarma Blog
An Introduction to APIs with Phoenix
Micah Woods builds a restful API with Phoenix and compare it to a Ruby on Rails API. Read more here.
Generate URL Regularexpression
I created the ruby gem which generates the regular expression for URL. Please try it and give me feedbacks! https://github.com/dtaniwaki/url_regexp
Testing aggregates with commands and events
As part of my attempt to explore the DDD world, I described some possible ways to test an aggregate in Ruby.
A brief tour of Nokogiri Decorators
Jacob Rothstein published a nice piece on how Nokogiri decorators work and how they’re used by Loofah, a library that sanitizes HTML and other formats.
EOTS now allows HTML in labels and captions!
EOTS (Email Of The Species), the gem for easily declaring your email types and their fields, is now at version 0.0.2, and now allows HTML in labels and captions. (Just be aware, these should therefore be hardcoded in an initializer, never using stored user input!) Rubygems info is at https://rubygems.org/gems/eots , code is at https://github.com/davearonson/eots , and a site that uses it (mine) at http://www.Codosaur.us (but please don’t send me emails just to test it).
Is Ruby 2.3 Faster? Immutable (Frozen) String Literals Performance
I took one of my Rails apps and enabled immutable string literals (the experimental feature in Ruby 2.3 that is going to be the default in 3.0). Read on to find out how that changed its performance: http://ruby-performance-book.com/blog/2016/02/is-ruby-2-3-faster-frozen-string-literals-performance.html
Elixir Pipe Operator for Ruby: Chainable Methods
There has been discussions of how to have something like Elixir’s awesome Pipe Operator in Ruby. So this is my attempt at a small, simple solution that might be useful: Chainable Methods.
Yet Another Faat Update!
HI, guys! I updated my gem-generator Faat! With the help of the community, I decided to remove such entities as Resources and leave for logic Services. Here is article!
Spree 3.0.6.1 released
This Spree release contains numerous fixes backported from 3.1.0.beta. We’d like to thank all the contributors who made this happen. [more inside]
Testing Mixins in Isolation with Minitest and RSpec
Learn how to make sure your mixins work properly by testing them in isolation with Minitest and RSpec. Read more here.
Ruby Asia Newsletter
Ruby news, articles and interesting links from Asia delivered to your inbox once every two weeks. Curated with care by @winstonyw, organiser of RedDotRubyConf in Singapore.
Clojure's iterate in Ruby
Ruby doesn’t have sequences like Clojure… or does it? In this post, we look at emulating the Clojure function iterate
with Ruby Enumerator
for fun. https://rossta.net/blog/clojure-iterate-in-ruby.html
Active Support Improvements in Rails 5
Rails 5 introduces number of new methods in Rails 5 [more inside]
Rails 5 improves searching for routes with advanced options
Rails 5 brings additional options for rake routes task to display specific routes. [more inside]
Ruby Threads and ActiveRecord Connections
Unlike independent processes, all Ruby Threads within the same process share memory, enabling each individual Thread to consume or process objects and elements from the same data store. A problem occurs with ActiveRecord connection consumption when using these Threads.
Exploring MRI Source Code
Ever wanted to pry under the hood and see how Ruby works? http://www.blackbytes.info/2016/02/exploring-mri/
5 Tips to Speed up your Website
Improve perfomace of website is big story. Today, I’ll share with you 5 tips to speed up your website. Read more: http://goo.gl/SN9k6M
How to speed up Ruby on Rails updates using PostgreSQL
Learn how to speed up migrations and make your updates atomic with these simple PostgreSQL optimizations for your next RoR project.
Envforcing environment variable requirements
Envforcer is a Ruby gem that enforces environment variable requirements in Rails applications. http://blog.mojotech.com/envforcing-environment-variable-requirements/