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.
Apphera API now open source
I just launched Apphera Core, which is the main API for our open source social media monitoring and engagement. Have fun checking it out.
Sinatra Cookbook nearly here
As some of you may remember I had a Kickstarter campaign last year to fund the writing of Sintara Cookbook, however I got delayed and not made as much progress as planned, but this week will be lauching the first 8 chapters to buy and sending these to kickstarter backers too. [more inside]
Green Ruby News #83
Bunch of links collected for the first week of september: http://greenruby.org/grn-083.html.
football.db - More New 2014/15 Seasons - HTTP JSON API for Champions League, La Liga, Serie A, etc.
Hello, The plain text football fixtures for leagues, teams, match schedules, and more that you can read with the sportdb gem into your SQL database of choice (e.g. rake build DATA=es) now includes more 2014/15 seasons e.g. the European Champions League, the Spanish Primera División, the Italian Serie A, and more. Or try the HTTP JSON API e.g. event/cl.2014_15/teams or event/cl.2014_15/round/1 and so on or better build your own HTTP JSON API using the starter kit. All data, code and samples public domain. Enjoy. Cheers.
Find next / previous Active Record(s) in one query
order_query finds next or previous records relative to the current one efficiently, using techniques popularized by Markus Winand. Version 0.1.3 just came out with several performance improvements. Read more on Github.
Service Oriented Architecture using HTTP vs AMQP
I published a series of articles about Service Oriented Architecture - discussing the choice between SOA using HTTP vs using a message broker like RabbitMQ. Hopefully useful to those of you thinking about ways to break up your monolithic Rails application.
New Features in Rails 4.2
I have highlighted few features of Rails 4.2 in a blog post. Have a look.
Coping with an Inferiority Complex
I just published a blog post on dealing with my inferiority complex http://dennismonsewicz.com/post/96510058290/inferiority-complex [more inside]
Use your MongoDB document _id as your created_at timestamp for date range queries
In case you didn’t know, you can use your MongoDB document _id field for date range queries instead of having to use a separate created_at field and create a separate index for it. Here’s how simple it is to do it.
Tutorial Series to Set up Rails and Foundation
After we wrote the tutorial series to set up Bootstrap and Rails, we got a few requests to write a series for setting up Zurb Foundation on a Rails app. And… here they are! [more inside]
Refactoring in Code Reviews: My Experience
I’ve been trying to incorporate refactoring into our code reviews. The idea is to use refactoring as a way to understand code while reviewing it. I picked up this idea from the book “Refactoring” by Martin Fowler. Here’s a blog post of my experience with this technique. [more inside]
Different controllers for different contexts
When we first start with Rails we learn to create one controller for each resource, but separating your contexts into multiple controllers can help a lot with making your application easier to understand, maintain and grow.
NightcrawlerSwift teleports your assets to a OpenStack Swift bucket
Like the X-Men nightcrawler this rubygem teleports your assets to a OpenStack Swift bucket/container. It was designed to sync your assets with OpenStack Swift and allow some operations with your buckets/containers. https://github.com/tulios/nightcrawler_swift
Great New Feature in RSpec 3: Verifying Doubles
This article discusses a new feature in RSpec 3 called verifying doubles. Verifying doubles ensure that doubles stay in sync with actual code. The article explains how to start using this feature and includes some general thoughts about how this feature will impact testing practice.
Blogpost about not well known I18n feature - pluralization.
We just posted new article on our blog http://2n.pl/blog/i18n_pluralization - it is really usefull when you translate languages with many plural forms.
My First Ruby Gem
I came across this excellent walkthrough about creating a rubygem and thought that it would be helpful to others.
Seamlessly Navigate Rails Projects With Tmux
I just posted an article Seamlessly Navigate Rails Projects With Tmux. I hope you find it useful!
Service objects in Rails will help you design clean and maintainable code. Here's how.
A good read demonstrating how using service objects decouples concerns, simplifies testing and helps produce clean, maintainable code: Service objects in Rails will help you design clean and maintainable code. Here’s how..
Acceptance Tests at a Single Level of Abstraction
Each acceptance test tells a story: a logical progression through a task within an application. As developers, it’s our responsibility to tell each story in a concise manner and to keep the reader engaged, aware of what is happening, and understanding of the purpose of the story. [more inside]
A few tips for cutting down exception noise
Exceptions should be exceptional, they should be unexpected. But how unexpected can an error be if you see it thirty times a day? [more inside]
The Serialization Duck Type
We’re going to take a look at common Duck Types in Ruby. [more inside]
Downloading track from SoundCloud with Ruby
How to get raw sound track from SoundCloud with Ruby?
The value of the docs badge
I blogged about the value of the docs badge provided by Inch CI and what project maintainers can get out of it. [more inside]
DSL for Pundit
After migrating several projects from Cancan to Pundit i’ve wrote a simple DSL for make writing Pundit’s rules easier pundit_dsl
Role-Based Authorization in Rails
I’ve written an article on Rails authorization, showing how to implement simple role-based authorization, and comparing the Pundit and CanCan gems, with links to the rails-devise-roles example application, which you can generate with Rails Composer.