sstephenson/hike — pull request #20 by e2 (2011-10-24 19:06:55+00:00)
Title: ignore patterns definable in ~/.hikerc

I use Vim with 'patchmode' which creates backup files on write (e.g. application.css.orig), which sprockets happily loads, failing with "already required" messages when loading the intended file.

So I added ~/.hikerc config support using YAML, which currently allows defining custom ignore patterns, that are merged with defaults.

A few assumptions:
- I didn't want to add too much overhead (currently: YAML dependency and YAML::load_file)
- I didn't want to be too invasive with the code
- I tried to be both reasonable and minimal with error handling/etc
- It might be good to document in the README and add information in related GH issues, so search engines can send people there.
- I prevented the tests from failing due to using my own ~/.hikerc ;)
- tests work with Ruby 1.9.2 and 1.8.7
- works fine with the following config (~/.hikerc):

---
ignore_regexp: !ruby/regexp /\.orig$|\.bak$/

Anyway, thanks for hike. It is a cool idea, a lot of tools would benefit from using this functionality and I wish I had it years sooner, especially with Rails ;)