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.
Handling Paginated Resources in Ruby
Extracting data from an API can get messy once pagination is involved. We’ll look at a few ways of dealing with this complexity to enumerate paginated resources, including “recursive each” and the Kernel#to_enum method. https://rossta.net/blog/paginated-resources-in-ruby.html
Rails isn’t trendy anymore. Hooray for Rails!
Rails is still alive and strong, but it’s not the flavor of the day anymore. Who cares?
Inspect Network-Traffic in Capybara with Poltergeist
A short example on how to inspect your Network-Traffic inside a Capybara-Spec when using Poltergeist as driver.
Ruby Refinements
The Ruby language provides many powerful tools for software engineers to utilize. For instance, classes that have been previously defined and evaluated can be reopened and changed. This is commonly referred to as “monkey patching”, a term which elicits almost universal disdain among Ruby developers. Luckily, monkey patching is not the only option for making these types of changes.
You’ll love module_function
A quick summary what module_function is and when to use it.
Sometimes, It's Good to Be Shy
An overview of some of the techniques which may be used to write flexible enough code which smoothly adapts to change.
Kafka for Rubyists
A brief introduction to Apache Kafka and how you may be able to leverage it in your applications.
Exploring unit testing in Ruby
In this article I explore different ways to unit test in Ruby, how to isolate your code from dependencies in your tests, and how it may change how you write your code.
Beerpay.io released - A way to monetize open source projects
Beerpay comes to fill that gap between making open source and making a living. In this post you can read the basics of beerpay.
11th edition of RubyIssue(s)
This is the 11th episode of our guided tour through the Ruby universe of issues. Bonus: Bi-monthly email delivery. In this episode you will read about issues from Shoulda-Matcher, Bootstrap-Sass, Lotus and Rubocop.
You’ve Got a Friend in Friendly_Id
There’s always more than one way to solve a problem. One common solution to ugly urls in Rails applications is slug generation; but there are so many different tools out there — how do you know which one to choose? The friendly_id gem is a super powerful solution to this problem, and provides a wide range of functionality. This blog post explores why you’ve got a new friend in this gem.
Getting started with Distributed Ruby (DRb)
The Ruby stdlib contains a little known library called dRuby, which allows multiple Ruby processes to talk to each other over the network. Find out how you can use druby for distributed computing: http://nithinbekal.com/posts/distributed-ruby/
Cleaner RSpec examples and failure messages
Some examples on how to write concise specs by taking advantage of RSpec’s built-in matchers, and a way to get less failure message spam. Read the post
Practical Rails Projects and Delivery Timelines
We’ll review the types of projects you’ll be able to create, and how long it might take to complete your project in this article: Practical Rails Projects And Delivery Timelines
Book published: Trailblazer - A New Architecture For Rails
Trailblazer brings a high-level architecture for building web applications. By introducing operations, forms, callback and policy objects, representers and more, software gets better structured, faster and testable. [more inside]
Introducing activejob-retriable: Automatically retry failed jobs with an exponential
This gem aims to mimic most of the functionality of Sidekiq’s RetryJobs middleware. [more inside]
Wye Tech News #2
Here is the second issue of our weekly compilation of interesting news and articles about Ruby, Rails, JavaScript and web development related stuff that we found during the week.
Gem 'ryakuzu' - interface for schema.rb
Ryakuzu may be useful, when you need to quickly change the name/type of columns, and tables, or remove/rename it. Ryakuzu provides simple CRUD operations on your schema.rb and starts the migration for you. All temporary migration files are automatically deleted after migration. https://github.com/ID25/ryakuzu
How to connect to databases with different schemas with Sequel and Roda
Minimal example of how to connect into multiple databases with different schema inside one Roda app using Sequel
Tocer 1.0.0
Tocer (a.k.a. Table of Contenter) is command line interface for generating table of contents for Markdown files. This is a great tool for adding to your build process to ensure documentation is never out-of-date. If you happen to be using Gemsmith for new gem creation, it has built-in support for Tocer. Enjoy!
Create Visual Magic with Bootstrap Gem
Bootstrap is a framework that makes it easy for a developer to create a nice design for an application or a website. The framework also comes with JavaScript, making it easier to create scroll spies, accordions, modals and popovers. The bootstrap gem also has a solid, thorough and easy to understand documentation providing example codes for most, if not all of the components that Bootstrap provides. Read more at RailsCarma Blog
Rails, Secure Cookies, HSTS and friends
In this article I review the motivation and the internals of some interesting security features in Ruby on Rails. Read more here.
Stripe on Rails 4.2.5 and RSpec 3.4
Stripe sample Rails 4.2.5 project with the features: [more inside]
Ruby gem "cards_lib" 0.2.0 released!
Arguably the “smartest” library available in Ruby for designing and creating your own card games. With features such as [more inside]
Ensure you understand ensure
Did you know that ensure gets executed every time you leave begin block regardless of exceptions? http://undefined-reference.org/2015/12/13/ensure-you-understand-ensure.html