RubyFlow The Ruby and Rails community linklog

×

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

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

Verified Double gem

Hi everybody, I’ve been working on verified_double, a gem for verifying mocks in rspec. It works similar to rspec-fire, but instead of checking if the doubled objects respond to the mocked methods, the gem looks for tests tagged to confirm the validity of those methods. The gem’s still in its infancy, but I hope it’s usable for the most common cases.

Faraday - Using Backup Host for Remote Requests

Nowadays almost every Rails application interact with the remote service or API. The problem is that you can’t fully trust those services and you forced to add a lot of test coverage and exception handling for this part of code. Once i worked with the API that had mirror server for case when the main one is unavailable. I write a middleware for Faraday, which will use backup host(provided by user) if the original one is unresponsive. [more inside]

Attrio 0.4 released

Today we released Attrio-0.4 (attributes manager for plain old Ruby objects). In this release several issues were fixed but the most significant change is that attributes defined with Attrio are inheritable. Also all class level variables were removed. [more inside]

Casting: adding behavior to objects without using extend

Most software developers tend to write code where objects are given too many responsibilities. Code with bloated objects is more difficult to test, to understand and to maintain in the long run. To keep the code small and focused, different strategies can be used to extract behavior. A new gem, “casting”, claims to bring the benefits of both mix-ins and delegation, but without their drawbacks. Read more: https://discuss.gemnasium.com/t/casting-adding-behavior-to-objects-without-using-extend/34

chruby 0.3.6 and ruby-install 0.2.0 released!

Released chruby 0.3.6 and ruby-install 0.2.0. chruby is an ultra-minimal Ruby switcher (~90 LoC), that does one thing and one thing only, switches Rubies. ruby-install downloads, compiles and installs any version of Ruby, JRuby, Rubinius or MagLev. ruby-install supports automatically installing into ~/.rubies / /opt/rubies and can install additional dependencies using your system’s package manager.

Loading older posts