RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
August 05, 2014
Parallel specs across CI server nodes based on each spec file's time execution. Knapsack, a new gem created by Artur Trzop, generates a spec time execution report and uses it for future test runs.

Read more >>
August 04, 2014
Quick tip how to use Pjax & Middleman.
Just a couple tips of stuff we commonly have to do in Ruby when doing file operations.
August 03, 2014
The finite_machine got even better. The major addition is ability to create your own state machine definitions by subclassing FiniteMachine::Definition. What are you waiting for? Try it out and let me know what you think
ActiveResource can be pretty helpful when you have a RESTful JSON API. Although it has some limitations. One of the most irritating is a lack of nested resources #new scope method. Luckily there's a way to make it work exactly as its ActiveRecord equivalent. For more details, plese refer to this post: ActiveResource relations – a bit of magic to make it look and feel more like ActiveModel relations
I just released paperclip-deflater 0.0.6. You can gzip attached files before you upload them through paperclip.
New Post on the Gem Main. Check it out!
August 02, 2014
Ruby tools for markup processing and code syntax highlight.
This is the second post in a series about getting to know RubyMotion. At the end of the previous post we had something on screen and had learnt some core principles of iOS development with RubyMotion, now we're going to get ourselves organised using classes for a controller and a view, and get some interaction going in the next part of the series, Gaining Control of RubyMotion with UIViewControllers
August 01, 2014
Check out Toptal’s new community-driven list of great Ruby interview questions. We've begun with an initial sampling of questions. Read them, comment on them, and even contribute your own.

Toptal is pleased to provide this service to the community and welcomes your feedback.
I wrote the article, which gives you nice hints and solutions (including workaround for different gems), which will help you in the process of upgrading you app.
Ruby on Rails Lovers! Just check out this post on 5 Reasons to Outsource Your Ruby On Rails Developer
Starting A RubyMotion Application  blog.motioninmotion.tv
Go through the process of creating a real iOS application using Ruby in this ongoing tutorial series. Part one is introducing you to the basics of just getting something on the screen and pointing out some core differences between most Ruby implementations and RubyMotion. http://blog.motioninmotion.tv/starting-a-rubymotion-application
Last night, I set up an SEO keyword tool and a Twitter+Facebook retargeting tool for seven different websites. Both tools require I add JavaScript snippets to my websites but I didn't touch my codebases or deploy anything new.

I got it done by using Segment.io, which I've been using for about a year as the primary "Adapter Pattern" for all analytics on my Ruby on Rails apps, Middleman apps, Rack apps, and other static sites. I have Google Analytics and Intercom set up through it and all kinds of other email, customer retention, and analytics tools.

In sum, those tools help me understand whether the things I've built are things that any users or customers actually want, helps me drive traffic to them, and help me grow the products.

Sometimes it's better to interact with Segment.io from the server-side, though. In Segment.io and Ruby, Josh talks about how to do it cleanly and in a testable way from inside a Rails app, with RSpec matchers.
Yukihiro “Matz” Matsumoto, Chief Designer of the Ruby Programming Language is presenting on Ruby.Next at the Ninefold offices in San FranView the live stream at 7pm (PDT).
July 31, 2014
I wrote a short article about resetting the auto incrementing id in a Rails app using PostgreSQL after importing old data in a new app.

I hope it saves you some time.
I wrote a small tutorial on formatting and displaying dates to users or customers. Hopefully, it's helpful.
Representable is a mapping gem to transform Ruby objects to and from hashes, JSON, XML, and YAML. This blog post explains the new features in the 2.0 release.
We've just posted a basic list of simple practices you can apply that will take you towards the goal of bulletproof-security (this is not a complete list, but something to get you started), take a look at Simplest Security Best Practices .
July 30, 2014
I'm proud to announce the initial release of Roda, a new ruby web framework based on the following ideas:

1) Use a routing tree, similar to Cuba and Rum
2) Make it easy to use like Sinatra
3) Make it extensible like Sequel
4) Avoid namespace pollution

Find out why you should use Roda
attr_searchable, the gem to add database agnostic fulltext search to ActiveRecord (for Mysql and PostgreSQL) is a young and ambitious project. As its set of features grew, it has become neccessary to change its DSL and name. Thus, 'attr_searchable' is called 'search_cop' now.

In addition to the new name, search_cop v1.0.0 is out now and ships with search_scope's:
https://github.com/mrkamel/search_cop

Check it out and install or migrate to 'search_cop'
How to Pick Languages  growingdevs.com
Adam Keys shares our latest GrowingDevs article on some techniques for picking languages. While not strictly about Ruby, this is a great guide for finding a language to try next.
I just published a tiny "how to": Google Analytics API access via Ruby (on Rails). Hope it helps some people!
Facilitate change in your Ruby code with the Single Responsibility Principle.
I wrote about Refactoring Logic from a Rails View. Hope you enjoy!
I just wrote a piece about the pattern we use to write maintainable JavaScript in our Rails apps. Have a read and let me know what you think.
Created 1 year ago the Shortcode gem has new hit version 1.0.0. Thanks to the community for submitting pull requests, bug reports and feature requests the gem has matured and become more full featured in it's year of existence. Features of note include:

* Simple and easy to use, renders templates with passed in attributes
* Custom helpers (like rails view helpers)
* Presenters
* erb, haml and slim template support

Hopefully next year will see just as much community participation and improvement to the gem.

Find out more https://github.com/kernow/shortcode
This project helps you to build wonderful presentations based on HTML and JavaScript.

The JavaScript-part is powered by reveal.js, a great framework to build HTML-/JavaScript-presentations. The infrastructure behind middleman-presentation is powered by middleman, a flexible static site generator which also offers a live preview of your presentation.

Features:
* Seperates style/assets from slide content by using bower
* Has a slide creator (Markdown, Erb, Liquid)
* Helps you to initialize new presentations
* You can have your own templates for (new) slides
* Allows to group slides
* Integrates with your preferred editor

Requirements:
Ruby >= 2.1.0

Read on...
Several months ago we were reaching a critical point in Art to Aid’s development. We had begun using Shopify about six months prior to test our theory that creatives and consumers want to work together to create good in the world; at least ten percent of every sale on Art to Aid goes to support a charitable organization of the artist’s choosing. We were closing in on flipping the switch on our own custom platform built on the popular Ruby on Rails ecommerce platform Spree. I had been happily denying the need for a deployment strategy more complex than a capistrano task pushing out to a single VPS. Continue reading blog
July 29, 2014
Sunny San Diego this year from November 17-19, 2014.

Registration is now open
Memoization is really common in Ruby, but the most popular pattern for memoizing method calls has some major flaws. I wrote about some of the more advanced patterns you can use to memoize your method calls, and show some interesting Ruby tidbits along the way.
I just wrote about 7 useful custom ActiveModel validators. Let me know if you've used similar ones or have any to contribute.
We wrote a new tutorial on how to use Capistrano 3 to deploy Rails apps.

Deploy Rails Apps with Capistrano 3
I found this below article interesting as well as helpful.
Rendering data content via JavaScript template using Dust.js

Please provide your feedback on the same.
a9n is a new gem, which helps to keep ruby and rails app configurations easily maintainable, verifiable and clean. Created by Krzysztof Knapik (@knapo).
A handy list of the most popular open source Ruby on Rails projects (ranked by the amount of stars on Github) - Most Loved RoR Open Source Projects.
I just created a Medium Collection ABC of Ruby on Rails. I need your feedback and suggestions. Thanks!
July 28, 2014
Ruby Gems are essential for every Ruby on Rails programmer. They are a small pieces of already written and tested code which provide some functionality. For example, there are many gems which provides admin interface for your app. It means that you instal the gem, make some basic setup and you ... Continue reading
I wrote an article on some tips I picked up with working on legacy Rails apps. I hope you like it!
I just released a new screencast about using jQuery UJS and AJAX in your Rails apps.
Scalable code without bloat: DCI, Use Cases, and You
July 27, 2014
Using factories is nice to simplify your specs, but you should be careful with the mutable objects you could be reusing there.
github_api v0.12.0 just released!  peter-murach.github.io
I've released github_api gem after few months of rewriting internals. It has magical unicorn logo!

The most notable improvements are in parsing of method arguments to allow for flexibility when specifying required parameters. Many new api calls have been added to match current GitHub API. Some major bugs have been fixed connected with making requests. Please see changelog for specific changes.

I'm looking forward to your feedback as this library is heading towards 1.0.0 release.
The Law of Demeter  nithinbekal.com
I wrote a blog post explaining the Law of Demeter with a simple example in Ruby.
Hello, Using a Ruby build script (that is, Rakefile) I've built up a GitHub org, that is, football.csv - for open football data in the CSV (comma-separated values) format, that is, plain old text. Leagues include the English Premier League, Championship, Bundesliga, Eredivisie, Süper Lig, Primera División, Pro League etc. for 10+ seasons (e.g. 2013/14-1993/94). Cheers.
I wrote a blogpost on Timeout Internals for CRuby to help people understand when it works and when it doesnt.
We wrote a blog post on how to work with Ajax on Rails. If you are beginning to build Rails apps you may be surprised how easy it is to get this going.

The Detailed Guide on How Ajax Works with Ruby on Rails
July 25, 2014
I wrote a small tutorial about how to create and calculate trial periods in Ruby.
Rails tips: #with_options  cookieshq.co.uk
One of ActiveSupport's useful methods, #with_options allows you to DRY out hashes passed to a collection of similar method calls - ideal for complicated has_many declarations. Read more on the Cookies HQ blog
The new HTML sanitizer in Rails 4.2  blog.plataformatec.com.br
Learn how the Rails HTML sanitizer was revamped using Loofah and how t will look like in Rails 4.2.

Read the full blog post here.