RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
June 17, 2014
Tonight at SydInMotion I got in a discussion that lead to me explain Dispatch.once and why it’s so handy. I’ve decided to write this up as a quick tip as it’s useful in almost any application.

http://blog.motioninmotion.tv/grand-central-dispatch-isn-t-just-for-background-queues
another way to do metaprogramming that has some advantages over the traditional approach
June 16, 2014
Hello, The latest sportdb gem includes new tables (and models) for group, league and all-time standings. For example, to calculate the all-time standings table for the World Cup (including all nineteen tournaments from 1930 to 2010) use the football.db build script and issue $ rake build DATA=history This will import all teams, tournaments, results, and so on and dump
the all-time standing e.g.
1 Brazil (BRA) 97 67 15 15 210:88 216 19
2 Germany (GER) 99 60 19 20 206:117 199 17
3 Italy (ITA) 80 44 21 15 126:74 153 17 ...
The full results all serve as a great checksum that all football.db match data is up-to-date and complete. Cheers.
I just published The definitive guide to Arel, the SQL manager for Ruby. Enjoy!
I am a very beginner with ruby but not in programming. Want to learn this language very well. I heard ruby community is awesome! So, can I work with any experts group, from whom I can learn this amazing language? Is there any mentor at rubyflow?
I just released rack-dev-mark 0.3.0. The github-like dev ribbon will be shown on all the pages in development environments!
Practical Microservices with Ruby book  practicalmicroservices.com
I'm writing a book on practical microservices with Ruby. If you want to stay posted on my progress, receive book excerpts and get a special launch discount, subscribe here!
My step by step guide to creating post-it notes app in Ruby Shoes with YAML::Store for storage of notes.
After popular request, here is a basics episode for using MotionKit with your table cells, including how to use autoresizing masks and the MotionKit DSL for Auto Layout in your table cells. A short episode filled with good tips.

https://motioninmotion.tv/screencasts/31
June 15, 2014
We introduce you to the Message Verifier feature in Rails 4.1 ~ 11 Minutes video
June 14, 2014
Swift Still Won't Replace RubyMotion  blog.motioninmotion.tv
The day Swift came out, I wrote up a piece about “Why Swift Will Never Replace RubyMotion” which ended up getting a good amount of attention, both good and bad (luckily mostly good). Since then though, a lot has happened, I’ve talked to a lot of people about my post, I’ve read other peoples thoughts, and most importantly I’ve read and watched as much as I’ve been able to about Swift and how to use it.

http://blog.motioninmotion.tv/swift-still-won-t-replace-rubymotion
InfraRuby 3.1 compiler for Ruby released!
We show you some basic data types in ruby ~10 minutes Video
June 13, 2014
Tired of having ugly forms, or different pages for editing and viewing? Try out my gem abracadabra, where clicking some text turns into a fully Rails-compliant form-for-esque form. Clean, modern, easy-to-use, Railsy. Similar to x-editable, but built from the ground up. The new version, 1.2.0, allows you to manually rebind using the new $.abracadabra() jQuery function. Follow @trevorhinesley
Short introduction to Solr, Sunspot and typeahead.js. Part1.
Have you ever needed to test something like this?

- Hit URL A
- Wait (how long?)
- Find results at URL B

The ideal is to wait "just long enough" before getting the results. This short post shows a simple way to do that.
The internals of Phusion Passenger are thoroughly documented in the new Design and Architecture document and the Code Walkthrough video. Take a look inside one of the fastest and most advanced Ruby application servers. With these new documents, we hope to make Phusion Passenger more transparent and we hope to encourage contributions.
An overview how to easily start using C/C++ libraries in Ruby code. Case studies of most common gems with their basic set-up.

http://www.amberbit.com/blog/2014/6/12/calling-c-cpp-from-ruby/
I just published an article about Rails' Fixtures Fixtures in Rails.
Flexkey is a Ruby gem for generating unique, random strings for use as product keys, redemption codes, invoice numbers, etc. Check out Flexkey on Github or read the blog post for more info.
I've used a lot of Todo applications, but I never really liked any of them. Really, what I like to use is a text editor and just create a simple list manually. However, I like having notifications. Thus, TODO Notifier

The code is kinda buggy and unorganized, but the daemon basically works.
We recently open sourced SeedMigration, one of our internal gem at Harrys. Here is a blog post explaining why we love it, and why you might enjoy it too.
June 12, 2014
The Ruby gem Rattler is designed to make language design and recognition as simple and fun as possible. It's nearly ready for a 1.0 release, but unfortunately I have so little time to work on it that progress is slow.

I'm looking for a few good Rubyists to join the team and help take this over the finish line, and beyond!

If you've ever wanted to design your own programming language, or even just implement a parser for an existing language in Ruby, and found other tools to be difficult to understand and use, Rattler is for you!

If you'd like to be part of making Rattler the language design tool of choice, message me on twitter: @jarhart

Thanks!
Which Ruby implementation is right for your project? While the reference implementation (Ruby MRI) remains the interpreter of choice, an alternate Ruby implementation may be right for your project, depending on your operational goals and constraints. This article showcases the Ruby interpreter implementations and runtimes available today, discussing the advantages and disadvantages of each.
Developers who are well versed in Ruby on Rails (or other MVC implementations) and start learning Ember.js may find it surprising that, even though there’s shared vocabulary, denoted concepts are sometimes very different.

The first and obvious difference comes from the fact both are web frameworks. Rails facilitates the creation of web apps that offer mainly an HTTP interface to interact with. On the other hand, Ember helps creating web apps that interface directly with humans (through clicks, taps, key presses, etc). They are both web application frameworks, but the former is server side and the latter client side.

A look into their workflows will shed light over the main differences.
I just wrote a new article on 5 Reasons Why Rubyist Will Love Swift. I hope you like it.
June 11, 2014
We show you how to turn your rails console into a powerful tool! ~ 5 minutes youtube video
Link to Article

I recently found that despite appearances, all your controller-specific asset files (i.e. assets generated with "rails g controller blah") are actually loaded into every page.

This post explains how to change this behaviour and get the assets loading where you expect.
I gave a talk recently about working with an old codebase (particularly an old rails codebase, though the ideas are applicable more broadly). Here is a video! This is the abstract:

Sometimes you get to start fresh, with the latest version of ruby, the latest web server, the latest database, and your choice of dependencies. But sometimes, you have to work with an old codebase. This codebase might have been started years ago, by tens or hundreds of people, many of whom no longer work for the organization. This talk is the story of one such codebase, and how to work with it every day.
The initial beta of Rails 4 Test Prescriptions by Noel Rappin from Pragmatic is now on sale.

Rails 4 Test Prescriptions is a comprehensive guide to how tests can help you design and write better Rails applications. In this completely revised edition, you’ll learn why testing works and how to test effectively using Rails 4, Minitest 5, and RSpec 3, as well as popular testing libraries such as factory_girl, Capybara and Cucumber.
I wrote a new post on Using Rails 4.1 Secrets for Configuration. Hope you enjoy!
We aim to make microservices more easily available for our Rails and virtual server customers by allowing them to utilize Docker containers running on the same network. We have made the process of getting a machine up and running with Docker super simple. You can get started in a matter of minutes.
Learn more here: https://ninefold.com/news/docker-100/.
June 10, 2014
New service Teatro.io for automatic rails stage.
I just published an article that covers open source security libraries, web services, and reads that any developer should consider before implementing their next Ruby app.
Angular vs Ember. RSpec vs Minitest. Haml vs Slim vs ERB. You have so many choices to make when you start a new project. There are vocal defenders on each side. And soon you realize that you could have started your project in the time you’ve wasted reading that fourth tutorial or 30-comment thread about whether Sass is better than Less. How can you choose the right library, so you can start writing actual code?
We just released Invoker version 1.2.0, which adds support for Linux, https and many other bug fixes. Find more on Invoker website
modular_migration
gem 'modular_migration'
$ rails g model core/user name:string
invoke active_record
create app/models/core/user.rb
create app/models/core.rb
create db/migrate/core/user/20140324105328_create_core_users.rb

modular_migration



modular_migration
Include the gem in your Gemfile:
gem 'modular_migration'

This release fixes a pesky bug where inheritance was broken for column colors. Check out the wiki to see examples of nicely formatted tables. As always the gem is available on rubygems.org with source on github. For those not familiar with "the reporter", it provides a ruby DSL for writing reports with built in features for progress reporting and table formatting. It is very handy for system level and data reporting scripts.
Container controllers, such as UINavigationController or UITabBarController are the core navigation mechanism for many of our applications. The UIKit framework provides us with mechanisms and direction to create our own custom container controllers, which we'll be covering in this episode.

https://motioninmotion.tv/screencasts/30
June 09, 2014
Reorganizating a Rails data model  thomasleecopeland.com
Here are a few things I learned while reorganizing a data model for a web app that had been running for over five years.
A few days ago Aaron Patterson wrote a interesting article about composition vs inheritance with Ruby.
Composition should be preferred, but beware of the unexpected behaviors. This is my personal experience: Three Things To Know About Composition.
Hello, I've created a new GitHub org, that is, wikiscript, that collects (Ruby) scripts that let you turn free-style or semi-structured wiki text into open structured data. A first example is the new football squads reader that reads in a wikitext page and outputs all squads files in the football.db format - so you get an up-to-date World Cup 2014 squads list including all 736 player (32 teams x 23 players). (By the way, three days to kick-off and counting!) Cheers.
June 08, 2014
Just released rufus-scheduler 3.0.8. The scheduler will now fall on its paws during ambiguous DST transitions. Thanks to @junhanamaki for spotting the problem and helping resolve it.
We show you how to get up and running with the writefully gem ~ 13 Minute Video
I compiled a guide to debugging Rails. Included are techniques such as referring to the C debugger, using Gmail's search features to find information in archived exception reports, analysing Memcached usage stats, and setting up log based alerts.

The entire document is broken into sections and contains approximately 30 pages of original content. Hope you find it useful.
I just published DuckPond - a gem for getting around some of the shortcomings of duck typing in a weakly typed language such as ruby.
"swift-ruby" is designed to bring over some good features from Apple's new Swift language to Ruby:

https://github.com/galori/swift-ruby

I implemented only one thing, the ? Optional method operator..please jump in and submit some Pull Requests!

Background:

I just came from Apple's WWDC and watched their introduction of the new Apple Swift programming language.

From Chris Lattner, a Swift developer at Apple personal site: "Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list."

The ? Optional operator is equivalent to ActiveSupport's "try":

The active support version would look like this:

e = Employee.new
e.try(:transfer)


The Swift-Ruby version:

e = Employee.new
e.transfer?


So, clone the repo: https://github.com/galori/swift-ruby, see Apple's reference: https://developer.apple.com/swift/, and submit some PR's.
Claws is a command line based AWS (Amazon Web Services) console that provides a direct interface to ssh into your hosts. Check out a screenshot example of how it works along with other information on github. This release is a simple bug fix that was introduced with the latest version of the Command Line Reporter gem.
June 07, 2014
GemWorld: Knod  kavinder.com
A lighthearted story about how the gem Knod works. Check it Out.