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.
Run services in the background
Something about Service pattern in Rails. How to run our services in the background and how to be lazy. Read more on our blog!
Hello, Minima! Theme - Get Started w/ GitHub Pages in 60 Seconds (Update V2)
Hello, I’ve updated the Hello, Minima! getting started in 60 seconds guide - using the latest and greatest Jekyll 3.3 version w/ Minima 2.0 (now running live on GitHub Pages). What’s news? Now just two steps to get started (add a _config.yml and an index.md). That’s it. No more step 3 required (that is, importing a style sheet) it will now get included automatically. See the Henry’s Hello, Minima! repo for the article and live demo. Cheers.
Using private attr_accessors is wrong
I’m working on an existing Rails application and there’s one pattern I see repeating often that I’m puzzled with. It’s especially common in service objects. Here’s couple of reasons you should not use private attr_accessors.
How BDD and Continuous Delivery Help Developers Maintain Flow
In this post I explore how BDD and CI/CD help us stay in the zone, where we do our best work.
Making Ruby Hash#dig even more awesome. Introducing Hash#dig_and_collect
In this blog post I will introduce Hash#dig_and_collect , a simple utility method that is built on top of Hash#dig to help you navigate nested hashes mixed up with arrays. [more inside]
It took me 2 days to solve my ruby/excon/openssl problem
https://gist.github.com/davidpaulhunt/1b78697e4f69c56a210cd9017ed198ad [more inside]
Mocking in Ruby with Minitest
Mocking is used to improve the performance of your tests. This tutorial will show you how to use mocks and stubs in Ruby with Minitest. [more inside]
Role based authorization module in Rails
This article shows how to implement a module that adds authorization logic to a controller class at action level based on user’s role.
Rubycoders is online
Rubycoders is a place where ruby programmers can find job announcements. The app is in beta testing, I need feedback! Free feel to register and explore the main features, then, if you want, you can drop me a line.
swift_client 0.1.5 released
This release of swift_client (a gem to interact with OpenStack Swift Object Storage) brings chunked downloads. https://github.com/mrkamel/swift_client
Duck typing vs type safety
If you ever thought you don’t need type safety in Ruby because of duck typing, check out my article on this subject which explains what type safety means in Ruby.
Introduction to fragment caching in Rails
This is a short introduction to fragment caching in Rails - how it works, some gotchas and things to remember. The article also shows what Russian-doll caching is. http://blog.ragnarson.com/2016/11/02/introduction-to-fragment-caching-in-rails.html
Purposes & Properties of Value Objects
What is and what makes a good Value Object? Learn how to implement their fundamental purposes and properties. https://blog.dnsimple.com/2016/11/purposes-and-properties-of-value-objects
Parallelising IOS UI tests with Ruby!
This article is about a proof of concept script I built using Ruby and a set of awesome gems to parallelise IOS UI tests across virtual machines: http://teotti.com/parallelising-ios-ui-tests/
rspec-benchmark v0.2.0
The new release of rspec-benchmark fixes issue of propagating errors when using perform_under matcher.
Implementing Twitter Bot with Ruby
When I was 15 years old, I dreamed of being able to develop bots. The story behind was terribly simple, – back then it was way too popular among us (the little nerds) to manage own IRC bots which could do some fancy things like log the discussion or just stay online for a long time. We thought it was kind of outstanding, and it reveals the level of our knowledge. Read more
Building a Well-Polished Ruby Gem
Daniel P. Clark shares his tips for publishing high-quality Ruby gems. Read more here.
openstruct-from_hash
openstruct-from_hash adds a recursive constructor called from_hash to the OpenStruct class. It is a small utility method that I use often, so I decided to share on Github and Rubygems. Cheers.
FizzBuzz In Too Much Detail
I know. FizzBuzz has been done to death. But I want to use it as a familiar base upon which we can explore some of the common tradeoffs involved in writing and maintaining software.
BaseForm - Another simple form objects Rails plugin for ActiveRecord based projects
An alternative way to implement form objects. Check it here.
Matches, Rankings, The Social Network, League of Legends, and Ruby?
Yesterday I posted how people do rankings by popularity all wrong and what is the correct way to start implementing it. To wrap it up, I just posted about how people to ranking by matchings also very wrong. If you ever want to do online gaming, you must know how to rank the players correctly.
Refactoring Swift ViewController the Rails way
Sure knowledge gathered in one technology can help in another