RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
July 15, 2014
The first ever Ruby on Rails Conference in Asia - RailsPacific. ( one day conference, one day workshop )

September 26,27 2014, Taipei, Taiwan. ( 1 week after RubyKaigi )
In this episode we talk about arguments, methods and method arguments
July 14, 2014
I've created ruby tribe on Snapzu. You can post here some blog articles, projects, tools related to Ruby. Snapzu is site similar to Reddit, where users can send stories and votes on them.
July 13, 2014
In August Drystorm.co will be launching with the aim of speeding up Rails app creation.

Drystorm will allow you to create a great looking, fully tested app with basic features in just a matter of minutes.
July 12, 2014
Hello, I've put together a factbook gem that lets you read in World Factbook country profile pages (in HTML) and returns a structured Ruby hash that you can save, for example, as a pretty printed JSON file e.g. For Brazil use: Factbook::Page.new( 'br' ).to_json Find ready-to-use country profile in JSON in the openmundi/factbook.json repo. Thanks to the CIA for the great service (and public domain data - no rights reserved, no copyright). Cheers.
July 11, 2014
The integration of Sunspot and typeahead.js comes in Part 2
If you know much about computer science, you know that the best we've been able to do is pseudorandom number generation... until now! Check out the new fair_dice_roll gem for when true randomness matters.
cucumber_rake_runner is a simple gem allowing you to run rake tasks inline to the current cucumber process for testing behavior and output.
For Jruby users this also eliminates the need to spin up a new JVM per rake task significantly reducing test run time.
The gem captures both stdout, stderr along with the time taken to execute a rake task so that assertions can be made easily against them in your cucumber test suite.
This week I have mostly been thinking about Go. I won’t bore you with the details. Unless you ask me. Continue your dosage of the vibe
Gitlab Backup Made Easy  icicletech.com
Gitlab is a self hosted open source repository management tool built on Ruby on Rails. It offers a variety of features like code reviews, merge requests and activity hooks. It's the perfect tool for companies that do not want to rely on third parties to manage their code. But, with self hosting comes the added risk of server failure and data loss.

Here is a way to automate the entire backup process of Gitlab with daily, weekly and monthly snapshots and a single command restore process.

GitLab Backup Made Easy
July 10, 2014
In little example I want to show you how to convert part of Sinatra source code to pdf using Linux operating system.
Unmet data or configuration dependencies are a frequent cause of unexpected test failures, followed by long debugging. This post discusses a few examples.
This article describes how to share Rails configuration to Javascript.
Eager loading is a way to find objects of a certain class and a number of named associations.
Here I share a post on using it with Rails.
Check out: Eager loading in Rails
July 09, 2014
Battling Complexity in Ruby  growingdevs.com
New article by Coraline Ada Ehmke (@Bantik) on the challenge of battling complexity in Ruby and a new solution: Fukuzatsu.
I created a simple web app using Rails 4 and Django 1.7. Rails took less lines of code and commands than Django.
As you probably already noticed we have one user that is constantly posting something about RubyMotion. Usually I have nothing against promotion of products on RubyFlow from time to time, but in this case we're talking about posting 10 posts within just 30 days, which is on average post every second work-day. I would call it SPAM.

Before writing this note I decided to do some research regarding those posts and product that is marketed, so I wouldn't be accused of being biased. I described everything on separate blog post (due to character limit on RubyFlow).

As a final note I would like to ask for two things. First is for FluffyJack to post less often. I would gladly hear about RubyMotion once or twice per year, but not per week. On the other side it would be nice to see RubyFlow users a little more vocal about spam - please don't use silent treatment when somebody else is buying Google position and free traffic using our community.
We show you how to work with YAML files in Ruby ~ 13 minute video for beginners
Should You Learn RubyMotion or Swift?  blog.motioninmotion.tv
A look at Swift's future, whether it's worth learning, and comparing and predicting it's potential future, with RubyMotion's past. A great read if you're not sure where to focus your attention.

http://blog.motioninmotion.tv/is-swift-production-ready
July 08, 2014
I’m puzzling over the design for a worker and would appreciate your comments on it. I started with the pain of an ugly test, made an interesting refactoring, and decided to drop the test entirely, but I’m not at all sure this is the right decision.
Recently I added the first high-level test to a Sinatra app with no tests. This required a lot of initial setup, involving, among other things, RSpec, Rake::Test, Capybara, EmailSpec and Pony, mocking OmniAuth callbacks, and using DatabaseCleaner with Sequel. For the benefit of my future self and anyone else who needs to set up Sinatra for acceptance-level tests, I documented the whole process.
MetaCasts.tv will no longer be generating any more Ruby videos. Instead videos will be focused on Go instead.

Read more about the decision at http://metabates.com/2014/07/08/metacasts-golang-future/.
There's a lot of good, free Rails information around. But as you improve your development skills, it can be hard to find knowledge that's useful to you. If it's too basic, you'll just read about things you already know. Too advanced, and your eyes glaze over and your brain shuts off. You can't just type "intermediate-level Rails blogs" into Google and hope some good sites pop out. To get the information you're looking for, you're going to have to do some digging.
We've added support for GitLab repos in Teatro.io. So now GitHub and GitLab repositories are supported.
Recently I've created a neat little gem rails-env-favicon to use different favicon in development rails environment. It uses Tinycon - A small js library for manipulating the favicon. And maybe somebody will want to help in the implementation of middleware.
I just wrote a simple introduction to ruby continuations, specifically using them in loops.
I just wrote a simple introduction to ruby continuations, specifically using them in loops.
July 07, 2014
I just released a screencast called Keeping with Annotate that talks about how to use the Annotate gem to automatically comment attributes in your Rails models.
How to use SQL dumps for stages on Teatro http://blog.teatro.io/approaches-to-seeding-database-for-teatro-staging/
How to Ruby queue pop with timeout without using ruby Timeout, or running it in a separate thread and tossing in an exception when you want to stop.
Blocks can sometimes lead to a mix of concerns when you've got a block bigger than a few lines. There is a way around this though, which I'm going to show you through in this episode.

https://motioninmotion.tv/screencasts/34
I recently launched a web service based on Inch and now I wrote about the first month of Inch CI.

Inch CI is a service to lint your Ruby docs. Think of it as Code Climate for your inline code documentation.
July 06, 2014
I just released rack-dev-mark 0.6.0. Now you can see the deployment revision and time on the tooltip of the dev-mark as well as the environment name!
July 05, 2014
Delayed::Cron::Job is an extension to Delayed::Job that allows you to set cron expressions for your jobs to run repeatedly.
A collection of awesome Ruby libraries, tools, frameworks and software. Do you miss any interesting link or section? Check it here. The goal is to build a well-structured collection, up to date and community-driven.
July 04, 2014
Blog post about Sidekiq. How to use it with multiple apps on the same server: Multiple Sidekiq processes for multiple Rails/Sinatra applications – namespacing
Kata 1.6.1 Released  nodejs.org
Do you practice your ruby coding skills? Have you heard about code katas before? This popular gem has helped many improve their coding skills by solving the pain points around making code katas a regular habit. The new addition is that it now also supports Node and PHP. Have a look at the wiki for complete information on what the gem provides and how to use it to improve your ruby programming skills. Also check out the companion code katas project if you want to contribute.
July 03, 2014
Lita::Ext is an opinionated collection of Lita extensions to make organizing and developing your chat bot easier. Check out the full announcement for details!
In a Ruby on Rails project, all migration files generate into the same directory db/migrate. It's enough for simple projects, but not that good for large modulized projects. It is inconvenient to review thousands of files in the same directory for one project.

Since MVC directories are modular, the migration directory should the same. It's expected to be structured and clear. That's the reason I release the gem modular_migration. Just include it in your Gemfile and using Rails generator as usual.

Source code and issue tracking: https://github.com/swordray/modular_migration. Welcome to star, fork and pull request at GitHub.
To most Rails developers, just starting or otherwise, the Asset Pipeline is like the magical warp pipe in a certain 8-bit – and its many incarnations – video game most of us grew up with.



And maybe it IS that magical warp pipe that takes us to a whole new world. That’s pretty much what the asset pipeline does. It takes us to a different, and more efficient, world.

If you’re anything like me, you’ll want the TL,DR first. Think of it as finding that one awesome pipe and warping to the last level. Continue Reading...
July 02, 2014
We show you how you can build a custom query using AREL in this video tutorial.
Fun fact: rails just swallows exceptions in after_commit hooks, never to be seen again ...
fix it via gem or monkeypatch
Method visibility in ruby  dev.mikamai.com
Want to know about method visibility works in ruby (private public protected), some interesting corner cases and ruby 2.1 related updates? Then read this blog post :)
In case you want to add fulltext (mysql/postgres) query support to your models and you don't want to install additional search engine servers, check out attr_searchable: https://github.com/mrkamel/attr_searchable

Please find a few examples of query string queries:

Book.search("Joanne Rowling Harry Potter")
Book.search("author: Rowling title:'Harry Potter'")
Book.search("price > 10 AND price
I wrote a blog post about how to bring in Ruby gems or Rails source code together with your app to do some debugging. Digging into source code really shouldn't be difficult.. Check it out here!

How to Debug Rails with Your App
A simple strategy to detect spikes in Tweets and how to create a bell that rings at each goal using Raspberry Pi.
Check it out
July 01, 2014
Last week, I wrote about methods with consistent return values, and how they'll make your code simpler. But how does that happen? Why does the right refactoring make your code easier to work with? What makes good abstraction good, and bad abstraction bad? I mean, you can’t just blindly rearrange your code and end up with quality software. If you can learn why these techniques work, you’ll be better able to understand where your code needs help. And you’ll be able to use the right tools where they matter the most.
I've created step by step guide to creating digital clock in Ruby Shoes.
Ruby blocks precedence  blog.plataformatec.com.br
Carlos Antonio talks about the precedence difference between the curly braces {...} and the do...end Ruby's blocks notations, and how that subject even generated an issue in Rails issues tracker.

Read the full blog post here.
Everyone has their goto list of gems when they start a new project. Here's a look at my standard Gemfile for new projects