This Week’s Ruby News: Ruby 1.9.3p0, OmniAuth 1.0, MagLev 1.0 and More »

Created at: 06.11.2011 00:54, source: Ruby Inside, tagged: Compilation Posts News

The rapid descent of the weather towards winter is getting people to stay in and code and long may it continue given the quality of this week's releases: OmniAuth 1.0, MagLev 1.0, and Ruby 1.9.3, for starters!

Headlines

Ruby 1.9.3-p0 Released
The first production-ready release of Ruby 1.9.3 is finally here with patchlevel 0's release this week. I've already covered what's new on Ruby Inside (see the link below) but this is a nice step forward for MRI and worth checking out, especially if you want faster Rails loading times.

MagLev 1.0.0 Released
It's been a couple of years in the making but MagLev 1.0.0 has released. MagLev is an interesting Ruby implementation and virtual machine built by VMware's GemStone Systems division that orients itself around a novel object persistence layer. The best part? It's open source and MIT licensed. Expect to see more about this soon.

Ruby 1.9.1 is Dying (Support Ends Jan 31, 2012)
In a post to the ruby-core mailing list, Ruby 1.9 release manager Yuki Sonoda explains that Ruby 1.9.1 will get no official security fixes or releases after January 31, 2012.

Articles and Tutorials

A Guide to HTML5 Boilerplate for Rails Developers
The 'HTML5 Boilerplate' serves as a useful reference for Rails developers who want to provide structure and convention for the HTML, CSS, and Javascript of an app's front-end. But not all of HTML5 Boilerplate is useful for Rails developers, so with this guide, by Daniel Kehoe, you can pick and choose the components that are useful for your Rails apps.

Programming With Nothing: Computation with Nothing but Procs
The striking slidedeck from 'Programming With Nothing', a talk given by Tom Stuart at last week's Ruby Manor unconference. It demonstrates how to implement FizzBuzz solely by creating and calling Proc objects, all thanks to the lambda calculus.

Screencasts

Playing with PJAX (from RailsCasts)
PJAX allows you to quickly update a section of a page using AJAX with automatic pushState support (for URL changes). In the latest episode of RailsCasts, Ryan Bates demonstrates how to use the pjax_rails and rack-pjax gems.

14 Talks from the ArrrrCamp 2011 Conference
ArrrrCamp was held in Ghent, Belgium a month ago and now videos of the talks are available. Enjoy Corey Haines demonstrating fast Rails tests, Andrew Nesbitt on A/B split testing, Elise Huard on 'data driven development' and more.

The Ruby 1.9 Walkthrough: Go Deep on Ruby 1.9
The most comprehensive and up to date walkthrough of Ruby 1.9 for existing Rubyists. It's a commercial screencast by me, Peter Cooper. Ruby 1.9 guru James Edward Gray II even said he picked up plenty of stuff from it. There's a 5 minute sample available if you want to see how it works.

Pik Screencast: A Ruby Version Manager for Windows
Glenn Goodrich presents a 15 minute screencast taking a look at the Pik Ruby version manager for Microsoft Windows.

Libraries and code

OmniAuth 1.0: Authentication APIs Reach A New Level
OmniAuth is a popular library for performing authentication against numerous external authentication systems (like OAuth, OpenID, Facebook, and Twitter). Version 1.0 brings massive structural changes (for the better) and even includes capabilities to do your local/internal authentication with OmniAuth too. This is a big deal.

hash_syntax: Converts Ruby Files to and From Ruby 1.9 Hash Syntax
hash_syntax is an interesting little tool that can go through a Ruby project and convert the source either to or from using the new Ruby 1.9 hash literal syntax. It requires Ruby 1.9 to run.

Appraisal: Test Your Libraries Against Dependencies Far and Wide
Appraisal is a testing tool that integrates with Bundler to test your library against different versions of dependencies in repeatable scenarios called 'appraisals.'

Ruby Jobs of the Week

Senior Rails Engineers [San Francisco, California]
Sharethrough is looking for senior application engineers to help build out their reporting and trafficking platform. You will play a significant role in designing and architecting the core pieces underlying the entirety of Sharethrough's platform. They're located in SF's Financial District.

Last but not least..

Spree Conference 2012 (Feb 15-16, New York City)
Spree is probably the most popular open source e-commerce solution built on Rails and there's a conference covering both it and Rails generally in NYC next year. There's already an impressive speaker line up, a GitHub sponsored after party, and an evening hackathon.

[ad]Gauges is a real time traffic analytics system so you can analyze all your traffic in seconds. Collect and analyze your web traffic for all your sites in real-time using their fast, reliable, hosted system and see overview data for all your sites on a single page. Click here to learn more.


more »

This Week’s Top Ruby News: JRuby 1.6.5, A New Prag Prog Book, Fast Specs, Rails Style Guide and More »

Created at: 27.10.2011 19:28, source: Ruby Inside, tagged: Compilation Posts News

This week brings us a new JRuby release, some Ruby 2.0 news (but you knew that already, right? ;-)) and a new BDD library that seems to have struck a chord with the people I'm following on Twitter. Also, my Ruby Reloaded course is now also over half booked out so if you're curious, definitely check it out now.

Without further ado, here's a round up of the top Ruby news and releases from the last week, courtesy of Ruby Weekly:

Headlines and Releases

JRuby 1.6.5 Released: Rounding out Ruby 1.9 Support
The primary goal of JRuby's 1.6.x series is to round out the Ruby 1.9 support by fixing any reported incompatibilities. This continues with JRuby 1.6.5 and all JRuby users are encouraged to upgrade. 1.6.5 brings updates to RubyGems, fixes to 1.9 encoding and improved fiber performance.

Prag Prog Book 'Build Awesome Command-Line Applications in Ruby' in Beta
I haven't checked it out yet but the Pragmatic Programmers have announced the first beta release of a book by David Copeland about building well-formed command line applications in Ruby.

@CodeWisdom: Inspirational Programming Quotes via Twitter
I've started a new account on Twitter called @CodeWisdom, that's dedicated to sage programming related wisdom and quotes, as well as links to discussions on best practices and techniques. If you're on Twitter, follow along.

Ruby 2.0 Implementation Work Begins: What is Ruby 2.0 and What's New?
Ruby 2.0 is the next major version release of MRI Ruby, the de facto official Ruby implementation. What's it about and what might it include? Ruby Inside takes a look.

Articles and Tutorials

Connection Management in ActiveRecord (and How To Improve It)
Aaron 'tenderlove' Patterson talks about database connection management in ActiveRecord, how he's not pleased with it, and how he wants to step towards fixing it to be more like File's API.

Fast Specs!
Continuing the popular and recent string of posts about making your test or spec runs faster, Les Hill brings us more fast speccing goodness (RSpec specific, in this case) and shares a Rails app that implements his techniques.

Rails is Not Your Application
Speaking from the Uncle Bob bible, Nicholas Henry argues that Rails applications are better structured with a 'service layer' to better separate key application functionality from the restrictions of a framework. He presents a good case.

A Modern Guide to Threads (in Ruby)
Mike Perham recently spoke at RubyConf 2011 on some advanced threading-related topics. In this article, he explains, from a Ruby perspective, some gotchas with threads and why he thinks you should simply try and avoid them.

The Rails Style Guide: Rails 3 Advice in a Single README
The Rails Style Guide is a Rails 3-focused style guide presented in a single README file on GitHub. It covers a lot and is rather opinionated technology wise but is an easy read and you should pick up a few tips nonetheless.

A Quick Introduction to Rack
Satish Talim of RubyLearning presents a thorough introduction to Rack, the popular library that abstracts HTTP servers and requests in most common Ruby frameworks and webapp libraries.

Screencasts

Generating Spine Scaffolding with Rails
A super quick introduction to integrating Rails and Spine. Want to build a Rich Internet App in less than 8 minutes? Alex MacCaw shows you how to do it with Rails and the Spine JavaScript library.

Rails 3: Beginner to Builder - An 8 Part Rails Course Shared Online
Rails 3: Beginner to Builder was a course given by Richard Schneeman at the University of Texas over eight weeks and he's now shared the videos, slides, and other materials on his blog.

Libraries and code

Spinach: A New BDD Framework (Alternative to Cucumber)
Spinach is a new BDD framework that aims to resolve a number of perceived pain points with the popular Cucumber system. This blog post sums up the differences, pros and cons. Maybe it's the ideal way forward for you too?

GCC Installer for OS X (Without Xcode)
Gotten sick of needing to install Xcode when setting up RVM or just compiling Ruby on a new Mac? The osx-gcc-installer project can help you skip the pain by just giving you gcc in one hit.

High Voltage! Using Rails 3.1 for Static Sites
Nick Quaranto of Thoughtbot wanted to use Rails 3.1 in deploying a static site to take advantage of Rails' features and asset packaging. In this post, he demonstrates using the 'High Voltage' Rails engine to do just that.

Watch Tower: Track How Much Time You Spent at the Directory and File Level
WatchTower helps you track how much time you spend on all of your projects, at the project, directory, and file level. It's built in Ruby and supports TextMate and Xcode on Mac OS X.

Jobs of the Week

Last but not least..

Turbocharge Your Ruby Skillset With My Online Ruby Reloaded Course
Are you an intermediate Rubyist looking to boost your Ruby skillset with things like test driven development, OO design, building libraries and learning some of the lesser known nooks and crannies of Ruby? My Ruby Reloaded course runs in November and December and is now just over half sold out. If you want to join, check out this page for more info soon and use the code "SHOW" for $80 off the usual rate.


more »

3 New Date and Time Libraries for Rubyists »

Created at: 05.05.2010 17:30, source: Ruby Inside, tagged: Compilation Posts Cool Ruby Tricks Tools

In the UK there's a cliché that goes: "You wait hours for a bus, and then three come along at once!" So it went with these three Ruby date and time libraries. They all made an appearance on RubyFlow last week and are all useful in their own ways, depending on how you're working with dates and times.

ice_cube - Fast querying and expansion of event recurrence rules

ice_cube is a library by John Crepezzi that provides "fast querying and expansion of recurrence rules in Ruby." What this means is that you can create schedules powered by date recurrence rules that can be quite complex (e.g. every 4 years on a Tuesday in the first week of November). Rules like these are defined by chaining methods together, rather than using natural language.

To install:

gem install ice_cube

To use:

require 'ice_cube'
rule = IceCube::Rule.yearly(4).month_of_year(:november).day(:tuesday).day_of_month(2, 3, 4, 5, 6, 7, 8)
schedule = IceCube::Schedule.new(Time.now)
schedule.add_recurrence_rule rule
schedule.first(3)
# => [Tue Nov 02 05:04:38 +0000 2010, Tue Nov 04 05:04:38 +0000 2014, Tue Nov 06 05:04:38 +0000 2018]

ice_cube also supports exporting rules into iCal and YAML formats as well as a natural language equivalent.

John has put together a PDF presentation that shows off more usage, and there are some simple examples on the official site too.

tickle - A natural language parser for recurring events

tickle is a natural language parser for recurring events by Joshua Lippiner that stands in contrast to ice_cube's method driven approach. It depends on the popular chronic natural language date parser and appears (through my experience) to be for Ruby 1.9+ only.

tickle lets you throw it things like every 4 days starting next saturday, every other week, the tenth of the month and similar (there are a lot of examples on tickle's GitHub page). You pass these to the Tickle.parse method and you get the next occurrence of the rule.

To install:

gem install tickle

To use:

require 'tickle'
Tickle.parse('every 4 days starting next saturday')
# => 2010-05-01 12:00:00 +0000

tickle isn't particularly mature yet and it only makes it easy to get the next occurrence of your rule, but the developer suggests that once an event has occurred, you automatically run Tickle again to get the next date. In this way, it seems tickle is well suited for situations where only the next occurrence needs to be stored and the rule can be kept in a separate database column or similar.

business_time - Time and date offsets based on "business time/hours"

business_time is a new library that works with the concept of "business time" or "business hours." Rather than just letting you perform operations on dates by absolute numbers of days or hours, you can now work with business days and hours of your own definition. business_time depends heavily on Active Support.

To install:

gem install business_time

Note: business_time depends on Active Support (gem: activesupport)

To use:

require 'active_support'
require 'business_time'
# Examples "from now"
4.business_hours.from_now
5.business_days.from_now
# Using user supplied dates
my_birthday = Date.parse("August 4th, 2010")
10.business_days.before(my_birthday)
# Add a day to not count as a business day
BusinessTime::Config.holidays << my_birthday
# Overlapping days are OK
6.business_hours.after(Time.parse("August 3rd, 3:00pm"))


more »

Interesting Ruby Tidbits That Don’t Need Separate Posts #30 »

Created at: 19.04.2010 21:47, source: Ruby Inside, tagged: Compilation Posts Elsewhere

The latest installment of our series of roundup posts, covering some of our latest findings in the world of all things Ruby. These items wouldn't make it in as separate posts, but they should be of enough interest to Rubyists generally to make it a worthwhile browse for most readers.

Camping 2.0 Released

Back "in the day", a gentleman and scholar called Why The Lucky Stiff built a teeny, tiny webapp framework called Camping. It was like an extremely light mix of Rails and Sinatra, except that Sinatra didn't even exist at the time. In late 2009, Why went missing and still hasn't reappeared, but Magnus Holm picked up the torch and has released Camping 2.0. It retains Camping's original flavor and hardcore spirit (it's only 3072 bytes in size!) but adds Rack support and simpler routes, amongst other things.

JRuby 1.5.0 RC1 Released

The JRuby team has announced the release of JRuby 1.5.0 release candidate 1. It comes 5 months after JRuby 1.4.0's release and features the most fixes of any of JRuby's development cycles. There are also a handful of new features and improvements, including better Windows and UNIX-specific support, standard library and RubyGems updates, Rails 3 focused fixes, performance improvements for Ruby-to-Java calls, and JIT compilation caching.

Ruby There: Ruby Events Listings

Ruby There is a new Ruby and Rails events listing site from Scottish Rubyist, Keavy McMinn. You can already submit events of your own or just check out what's coming up. We'll do a full post about it soon once Ruby There's listings have been integrated with Ruby Inside, as we plan to show Ruby event listings on all our pages. As an aside, Keavy is a great Rails developer and is currently taking on new work.

Isy: Yet Another Ruby Webapp Framework

Whenever I post about a new Ruby webapp framework on Ruby Inside, I typically get a response or two along the lines of: "Who cares? Yet another Ruby webapp framework? What's wrong with Sinatra and Rails?" Well, if that isn't you, you might be interested in Isy, a new webapp framework that's component-based and stateful.

Psych: Event-Based JSON and YAML Parsing

Aaron Patterson (a.k.a. tenderlove) of Nokogiri fame has written a blog post about building an event-bsased Twitter stream parser with Ruby 1.9.2 and Psych. Typically in Ruby, JSON and YAML parsing are done in an "immediate" fashion where you pass in the data and you get a Ruby representation back out. Event-based parsing instead uses callbacks to process JSON and YAML asynchronously.

PDF::Writer Deprecated - Prawn 1.0 Under Development

Prawn is a pure Ruby PDF generation library that abstracts away a lot of the PDF-specific nonsense into a form that makes it easy to produce PDFs from Ruby code. Its creator, Gregory Brown, has retired the older PDF::Writer library in order to focus on the development of Prawn 1.0. Gregory is keen to lay down a spec for Prawn 1.0's API and he's put a draft spec out there for everyone to comment on. If generating PDFs from Ruby is important to you or your app, you might want to get involved in this effort, as Prawn is sure to remain the #1 PDF generation library available to us for some time.

For Sale: RubyPlus.org

Bala Paranj is selling his much-celebrated rubyplus.org Ruby screencasting site. He claims it has 12,000 members and he's selling the site to fund the growth of his Zepho Inc company (which is focusing on a British accent training iPad app). Questions and offers can be directed to Bala at bala.paranj at zepho.com.

While we're in a mercantile mood, perhaps I should also mention I own rubyonrailswebhosting.com, railswebhosting.com, rorhosting.com, railstraining.co.uk, rails-training.co.uk, and ruby-training.co.uk.. and if anyone has any serious or semi-serious offer for any of them (I'm more than happy to sit on them, so it'd have to be worth it), contact me (see the Anything else section for my e-mail address).


more »

Best of RubyFlow: 12 Ruby Links From March 2010 »

Created at: 19.03.2010 17:45, source: Ruby Inside, tagged: Compilation Posts Miscellaneous

RubyFlow is Ruby Inside's community driven sister site where you can post cool Ruby links you want to share (even of your own stuff). With 20–80 posts each week, there's too much to cover on Ruby Inside, but I want to provide a regular roundup of the "best of" RubyFlow. This instalment covers early March — enjoy!

And for comic relief (don't visit if you're easily offended):


more »