Sunday, 14 July 2013

Formic 0.9beta8 is out

This release introduces a new feature and fixes a couple of annoying bugs. Note that the semantics for ** were incorrect in previous versions. Get it at http://www.aviser.asia/formic.

New feature:


Added the ability to pass in the function that walks the directory path, which allows for alternate implementations or supplying a mock function that provides values completely unrelated to the OS. This is available only from the API and not from the command line::

      files = ["CVS/error.py", 
               "silly/silly1.txt", 
               "1/2/3.py", 
               "silly/silly3.txt", 
               "1/2/4.py", 
               "silly/silly3.txt"]
      for dir, file in FileSet(include="*.py", walk=walk_from_list(files)):
          print dir, file

Bug fixes:


Fixed #10: Paths like //network/dir caused an infinite loop
Fixed #11: Incorrect handling of globs ending /** and /. Ant Glob semantics for::

      **/test/**

are that they should match "all files that have a test element in their path, including test as a filename."