RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
October 31, 2014
Memoization is an optimization technique where you cache the results of expensive method calls. When the method is called with the same set of arguments, the cached result is returned. In this post, we will look at how we can implement memoization using Ruby's metaprogramming features. [Continue reading...]
Anonymous functions and closures are a useful concepts included in most modern programming languages. Back to Basics: Anonymous Functions and Closures goes into depth in Ruby and JavaScript on this concept.
October 30, 2014
RSpec gives you a number of ways of setting up prior to test runs, but only some of these have direct analogs in Minitest. In this post, I show you the code that will let you approximate RSpec's features (and explain when and why you might want to avoid using it).

http://chriskottom.com/blog/2014/10/4-fantastic-ways-to-set-up-state-in-minitest/
Not a fan of RVM or rbenv for installing Ruby on your production/development servers? Ruby 1.9.2, 1.9.3, 2.0.0, 2.1.x for Debian, Ubuntu, CentOS, RHEL, Fedora is now just a download away.
The very real danger with commenting code is that it becomes outdated while the codebase rapidly evolves. And out of date comments are far worse than no comments. So what's the alternative?How to write code that speaks for itself.
In this post we will explore how we've implemented feature flags in a current web-application we're working on. It's a very simple process which means there are no excuses not to use a feature flag in your application.
October 29, 2014
I just wrote article about Zopfli Compression Algorithm and Zopfli-ffi Ruby wrapper.
Last weekend I set myself to customize content_tag to allow dynamic tag generation.

Too vague? Head over to my blog and read about it ;)

http://pothibo.com/2014/10/create-complex-html-tags-in-rails
Trailblazer introduces several new abstraction layers into Rails. It gives developers structure and architectural guidance and finally answers the question of "Where do I put this kind of code?" in Rails. My book's first sample chapter is available now as a free download.
October 28, 2014
ITTIA DB SQL is a proven choice for robotic data storage, providing a safe and efficient way to update and query local data on various embedded platforms. With ITTIA DB SQL, data is always available to multiple concurrent tasks and can be easily distributed to other robots and control systems . As a result, robots become autonomous data analysts and decision makers.
Delayed Job Plugin to kill Heroku worker processes!
I just published a post about how to test execution of a before_filter with RSpec custom matcher.
I’m so delighted with the new Active Job feature I decided to release a new example application and tutorial right now, rather than waiting for Rails 4.2 final. Here's Mailing List with Active Job plus an article, Updating to Rails 4.2. Of course, you can build it with Rails Composer.
You're working with a brand new library or feature, and you just can't understand the documentation. Maybe it's hard to set up, so you have to bounce between RDocs until you learn how everything fits together. Maybe the documentation doesn't even exist. Or maybe you just learn best by seeing lots of examples. You need some help. But where do you learn how to use a feature, if not its documentation?
We have just released version 2.2.0 of our Intercity Chef Repository https://intercityup.com/blog/intercity-chef-repository-2-2-0-released/
Take care of your joints! Replace `console.log` with `log` in your Rails App. 5 minutes gem for for Great Good!

https://github.com/the-teacher/the_log
Representable 2.1 Is Faster!  nicksda.apotomo.de
The new representable release allows to skip rendering and parsing of properties dynamically. This allows to exclude properties at run-time, e.g. to reflect permission restrictions. It also got faster and we added a debug mode to help understanding what Representable does internally.
October 27, 2014
The protected method visibility in Ruby is one of its more confusing aspects. I recently took a closer look at it, and found that it has an interesting use case. [Continue reading...]
Handling exceptions is really important. I wrote a short post on how to handle reentrancy and other failures in Sidekiq workers: Adding reentrancy and a on failure fallback for your Sidekiq workers
A lot of people use RSpec to do TDD/BDD, but in this two-part tutorial Chris Kottom shows step-by-step how you can use Minitest to do the same thing.
A couple of practical tips on setting up perfect pair programming configuration What’s a Pair to Do.
October 26, 2014
Green Ruby News #90  greenruby.org
Green Ruby News #90 like every sunday night, some links of the week about ruby, rails, webdev and devops.
Hello,

I have just launched Sunalytics.co - a SaaS app, which will bring out all the data from your Rails application to non-developer users in beautiful charts!

Writing export scripts to 3rd party analytics services was yesterday. Sunalytics uses Active Record to find the relationships between the database tables and presents them in a friendly interface.

Give me a shout of your impressions at support @ sunalytics . co

Thank you!
Martin
There was an article featured in RubyWeekly that mentioned business as an essential skill for developers. I used to blog about business and marketing, but stopped. That article encouraged me to start again. Here's a blog post on how to initiate word of mouth and reach more of your target customers.
Introducing ImageDrop gem  iamnan.github.io
I just released the ImageDrop gem and demo. Good for avatars and such.

Transform the lowly file input field into sophisticated looking drag-and-drop targets, complete with a preview image and placeholder text, with only 988 chars of minified js.
October 25, 2014
I wrote an article about how rails handles exceptions in your app , have a look !
I just put together a beginner-level blog post which walks through steps to setup a development environment in XCode to help debug Ruby C extensions.
October 24, 2014
Data validation is an important piece in software architecture. Delegating this responsibility to models increase the cost of maintenance. Lotus offers a different and powerful approach to the problem.

[read the announcement]
Previous weekend I've participated in annual Rails Rumble 2014. I've build app/product called Aloo. This is the story behind it, some details and some problems that I've discovered on my journey.
Serving static assets with Rack  abernardes.github.io
I think this is a pretty common scenario, and yet I struggled to find an example on how to do it. I was trying to build a single page application using AngularJS on the front-end and Cuba, a minimalistic web framework for Ruby running on top of Rack. Read it here
We published the part 2 and part 3 of the "Process Payment with Paypal in Rails" series!

Process Payments with Paypal in Rails, Part 2 - Charge Credit Cards
Process Payments with Paypal in Rails, Part 3 - Recurring Payments

Check them out!
October 23, 2014
Lita 4 released  docs.lita.io
Version 4 of Lita, the ChatOps framework for Ruby, has been released. Lita gives you a robot for your company's chat room which can serve as an interface for automated operations. Read the release announcement and upgrade guide for more details on what's new in the latest version and how to upgrade.
In Defense of Alias  erniemiller.org
I've been reading a lot of Ruby style recommendations lately, and I wanted to share a relatively unpopular opinion (with some justifications) in preference of "alias" over "alias_method".
The ROM project is being rebuilt using Sequel for RDBMS. Read more about it here.
How to score A+ in your ssllabs test: dev ops tips from a Ruby on Rails team.
I've just published follow up to our first Useful FactoryGirl methods post on the CookiesHQ blog. This one is about the building strategies in FactoryGirl.
October 22, 2014
Pronto performs quick automated code reviews with the help of various analysis tools (RuboCop, Brakeman, Flay, etc.) by checking only the introduced changes. And now it also lints your SCSS with the help of SCSS-Lint. Check it out: Pronto and pronto-scss.
Rails Crash Course  nostarch.com
Check out my new book, Rails Crash Course! It's based on the curriculum I've used to teach Ruby on Rails to both new programmers and experienced web developers. Head to http://www.nostarch.com/railscrashcourse for more info, and use the discount code GEMS for 30% off. I'd love to hear what you think of the book, and I hope you find it a useful resource.
I just launched a new release of Invisible Captcha with a bunch of changes: new options, better API, better tests (also Travis CI integration) and little code and docs refactor.

Invisible Captcha is a simple and flexible spam protection solution for Rails apps, based on the honeypot strategy. It's really simple under the hood, but effective. Take a look! GitHub repo.
I just published a post '5 Free eBooks for Learning Ruby on Rails Framework', do you have any other books that you could add to the list?
For anybody using Cloud 66 and/or Codeship: The two services now integrate and it only takes one line of code to set everything up.

You can read more here.
Maybe you’ve learned the “what” of Rails, but don’t understand the “why” and the “how.” Maybe you're about to give up on Rails because you just can’t put the pieces together. If you feel like running away when you stare at your newly-generated Rails app, I wrote a book for you.
I just released a utility for finding suboptimal Ruby class API usage. It uses runtime code analysis to find problems.
Just because your dependency doesn't contain Ruby or Objective-C doesn't mean you can't use Rubygems or Cocoapods to manage shared code.
There’s a lot confusion surrounding Ruby’s multithreading capabilities. Especially, with regards to all the changes between 1.8 and 1.9. So, let’s be absolutely clear: MRI Ruby does in fact support OS-level threads.
October 21, 2014
I released an open source Rails engine named Payola that you can drop into any application to have robust, reliable self-hosted Stripe payments up and running with just a little bit of fuss.
Taking a tag-based approach to content categorization gives your users much more flexibility in terms of quickly finding desired information, products, and blog entries. In this article I'll show you how to incorporate tagging and tag clouds into your Rails application using the powerful Acts As Taggable On gem. Read the article
So, you’re working on a new app, and Rails just generated a test for you. You uncomment it, come up with a name, and you’re ready to write your test, right? But then what? What do you write first? What should your test code look like? If you follow a simple pattern, you’ll turn those stubbed out lines of code into clear, well-structured test cases.
Rails Rumble is a 48-hour app-building competition. Requirements are easy: Rack framework, host on Heroku, nothing production-ready created prior to the start and no pushes after close. It occurred past weekend. Join discussion and sharing on reddit/r/rails.
October 20, 2014
I uploaded a new version of pumog 1.0.1. Pumog stands for **PuppetModuleGenerator** and can be used to generate a basic structure for new puppet module with or without documentation.