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.
How to Write Future-proof Mocks in RSpec 3
Tests are an important component in most software applications. Whether tests drive the development, or are bootstrapped on after the fact, tests need to be reliable for future development to progress. An application’s complexity rises with time. During and after this increase, ensuring that a test suite makes the right assertions and mocks in an intelligent and sturdy way is crucial.
JSON API Apps With Lotus
Do you need a fast and lightweight JSON API app? It must be powerful, flexible, quick to develop and easy to deploy? Here’s a tutorial that shows how to build it with Lotus. It will take you 15 minutes, deploy included.
Static Site Generator of the Year 2015 - Middleman or Jekyll?
Hello, For today’s Vienna.html (static site) meetup I’ve prepared a talk titled “The World’s Greatest (Free) Static Site Builders / Generators”. Browse the slides (use space to flip through) or the all-in-one page source. What your favorite static site builder / generator? Jekyll? Middleman? Nanoc? Any other? Vote for Year 2015 Award on Twitter. Cheers.
Peeking Under The Hood of ActionController Parameters, Part 2
It’s really easy to forget how much of Rails is abstracted away into a black box. Simple things like strong parameters or how a controller’s action’s handle the request-response cycle can seem magical — until we look at what’s actually going on under the hood. This blog post looks at how ActionController::Parameters isn’t just as simple as a Ruby Hash, and explores where parameters get set in ActionController::Metal.
How Linters Can Help You Ship Code Faster
Linters as a tool to become better developer - write cleaner code and adapt to every style guide quickly [more inside]
Union Station Feature highlight: Weekly Summary
Union Station’s weekly summary is an email service to keep your team up to date on the current status of your application. The summary contains statistics on throughput, performance, deployments, and system load, read more about it on our blog!
Inspecting Method Parameters in Ruby 2.2.3
Learn how to inspect method parameters in Ruby 2.2.3.
Rails Asset Pipeline Simple Guide
This guide aim to provide really simple way to explain how asset pipeline work and how you can using it with your rails application. [more inside]
Rubycritic's newest team - Revamping code quality analysis
Hot News from Rubycritic! New team and version 2.0 and 2.1 release, check all the news: http://bit.ly/1MGNNpN
Documenting an API by testing
Here is a blogpost about a way to document an API by testing used at TaskRabbit. http://tech.taskrabbit.com/blog/2015/11/21/tests-doc/
Building a Ruby on Rails app part 5: The front end
Here is the fifth and last instalment of Building a Ruby on Rails app series, where we show to develop the front end.
How to handle failure in Ruby on Rails
In my slides, I explain through a refactor how I handle failure and return meaningful errors to the end user. http://slides.com/apneadiving/handling-error-in-ruby-rails/fullscreen
Infinite Sequences in Ruby
How to use Ruby’s Enumerator to emulate infinite sequences from functional languages like Clojure. https://rossta.net/blog/infinite-sequences-in-ruby.html
How to Deploy All Day yet Deploy Nothing
I’ve wrote a new blog post where I explain how much issues I had when trying to deploy the most standard rails app possible to Elastic Beanstalk via Docker. Basically it’s a rant in why in the hell deployment 2015 isn’t as easy as making a blog with Rails was 10 years ago. Read here: How to Deploy All Day yet Deploy Nothing
Testing async ActionMailer jobs with ActiveJob in Minitest
If you send mails via ActiveJob and use Minitest, here’s a bit of code that helps you test it: https://www.krautcomputing.com/blog/2015/11/22/testing-async-actionmailer-jobs-with-activejob-in-minitest/
Administrate Gem Added to Rails Composer
The nice new Administrate gem from Thoughtbot is now an option in Rails Composer when you build a starter application. Chris Oliver shows what the gem can do in a GoRails screencast.
Three Ways to Redefine a Private Method
Learn the different ways to redefine a private method and evaluate the impact of each approach.
Create maintainable queries in Ruby with query object and criterias
Leaving query logic in a single class lead to god objects hard to maintain, I explain a maintainable alternative with query objects and criterias http://teotti.com/create-maintainable-mongodb-queries-in-ruby-with-query-object-and-mongoid-criterias/ The examples use mongodb but can be implemented with Active Record too.
Minitest-ok 0.1.0
Minitest-ok 0.1.0 released. Using Minitest::Ok, you can write: [more inside]
Understanding Rack Middleware
Rack middleware is a simple and yet powerful way to plug custom reusable code into not just Rails but virtually any Ruby web application. But wrapping your head around Rack middleware and the way it works can be a daunting task at first. Let’s write some plain ruby to better grasp what’s going on behind the scenes.
Basics of Protected Methods in Ruby 2.2.3
Learn the Basics of Protected Methods in Ruby 2.2.3 using simple examples.
sermepa_web_tpv gem updated to new hmac 256 signature
I’ve just released a new update of the Spanish payment gateway sermepa_web_tpv. It implements the new signature system based on hmac 256