From my pull request:
We have several scripts we use during application development that monitor long running processes with ruby-progressbar. We also have these scripts running in automated environments (such as CI), and the output in these situations is very noisy. We could alter the scripts, but I think it would be nicer if this library could gracefully handle these situations.
This patch adds a baseline behavior in non-tty environments so that things like log files aren't filled with every frame of the progress bar animation.
This was merged into the master branch, so one can pick up the change by using a git source in her Gemfile.
A nice post by John Nunemaker on designing the public APIs for Gauges. I like his approach to serializing data using serialization objects.
I like all of the advice in this article, except for the part about Jeweler (the emphasis is mine):
With the exception of experienced cutters, or those who want or need to have complete control over every line of code, there are gem authoring tools that can automate the majority of the manual work required, and avoid amateur mistakes, when publishing gems for the first time.
The biggest of the gem authoring tools at the moment is Jeweler (RubyGems, GitHub), which aims to provide a set of wizard based gem automation tools. It has tasks to manage releasing, versioning, dependencies, executables and Rake tasks all out of the box; it can be a real time saver in the long run for frequent or beginner gem publishers.
In my experience, Jeweler makes developing a gem more complicated and error-prone than it would be without it. I think that developing a Rubygem with Bundler is a better way to go for new libraries. Bundler has some helpful info, too.
I haven't used it, but gem-release may also be useful.
In the course of developing Forkchop, I've tried out a few of the Mongoid-compatible search plugins.
The goal of these libraries is to provide lightweight search functionality that precludes the need for a full search engine. And while most projects will graduate to something like Sphinx (or IndexTank or Lucene/Solr), it's nice to be able to start out with something simpler when a project's search needs are still basic.
This library is a better choice for searching the text of articles. It doesn't offer nearly as many options as Mongoid Fulltext Search, but its code is much shorter and extensible. I am currently using this library and paginating result sets with Kaminari.
This project is best suited for providing autocomplete-type functionality. I tried to use it first, but ran into some problems trying to modify it's behavior (for example, there isn't an easy way to use an $any query instead of $all without overriding a large internal method).
I'm also a user of oh-my-zsh, but I too have had the problem of zsh's auto-correct functionality identifying many of my intentional commands as incorrect.
It's surprising how many useful tips I find posted as Gists.
Although I try to avoid alert boxes in general, sometimes using them makes sense, especially when initially building out a feature.
This morning I was using Cucumber (and Capybara) to test deleting an object on a small project, and I needed to figure out how to click OK to dismiss in an alert and have the scenario continue. Here's the Cucumber step I ended up using:
When /^I click OK in the alert box$/ do
page.driver.browser.switch_to.alert.accept
endalert is returning an instance of Selenium::WebDriver::Alert, which also responds to dismiss and send_keys should you need to do something other than just click OK.
Includes how to fix the asset pipeline when upgrading from Rails 3.1.0rc4 to 3.1.0rc5, both locally and on Heroku.
Developers no longer have to download all of XCode just to install the Apple version of GCC. This installer should work with Homebrew, although I believe you will see warnings when you brew install packages for now.
I already installed XCode 4.1 on one of my machines, but when I upgrade the other to 10.7, I plan on trying this out.
A great collection of public domain symbols of nearly everything, from food truck to sloth.
Nick Farina (of Meridian and Spotlight Mobile) compares the developer experience of working with the iOS and Android toolchains.
Major changes mentioned in the announcement post:
License:
* Ruby has been released under GPLv2 and "Ruby's" license. Ruby 1.9.3 is released under 2-clause BSDL and "Ruby's" license.Encodings:
* SJIS used to be an alias of Shift_JIS in Ruby 1.9.[0-2]. Now it is an alias of Windows-31J.Libraries:
* io/console: new library
* openssl: Got active maintainers. It is getting much better.
* test/unit: Supports parallel running.Implementation:
* pathname library and date library were reimplemented in C. It improves performance.
* The locking strategy in VM changed.
Offers a good overview of core features, plus links to documentation and the Pro Git book to learn more about each topic.
ClojureScript is a dialect of Clojure that targets JavaScript as a deployment platform Permalink for this post
It really is starting to look like the future of web scripting will be full language implementations running on top of JavaScript in the browser.
I've been waiting for a library like this for a while. I've often used Compass on small projects only to avoid having to write multiple lines of vendor-specific rules, and that is exactly what Bourbon is for.
I posted a brief how-to on my company's blog about using partials inside TemplateView templates.
I have verified using an iOS user-agent when using Cloud Player does load a version that works without Flash. But I don't know why such gymnastics are necessary– why not use an HTML5 audio element on any client that supports it?
A good overview of the law of demeter and its application to modern programming.
script/railsis the way to go.