module Thor::Actions

def uncomment_lines(path, flag, *args)


uncomment_lines 'config/initializers/session_store.rb', /active_record/

==== Example

config:: give :verbose => false to not log the status.
flag:: the regexp or string used to decide which lines to uncomment
path:: path of the file to be changed
==== Parameters

the comment hash and removes the hash and any immediate following space.
Uncomment all lines matching a given regex. Preserves indentation before
def uncomment_lines(path, flag, *args)
  flag = flag.respond_to?(:source) ? flag.source : flag
  gsub_file(path, /^(\s*)#[[:blank:]]?(.*#{flag})/, '\1\2', *args)
end