File structure creator
Script to facilitate quick and easy creation of complex directory/file structures.
-
Create a YAML directory structure file
Structure should be similar to the examples in config-files
By default any leaf node results in a File being created.
To override this, postfix with DIR, fx
- my_dir DIR
If you want all nodes in a tree to be created as dirs, supply a meta: in the root of the tree
meta: ONLY_DIRS
This will ensure all nodes in the tree are treated as dirs
-
Run it!
require 'skeleton_creator'
runner = FileSystem::Runner.new file_name [, options]
runner.run root_dir [, options]
Fx to generate the skeleton structure inside ~/testing as per the apps.yml file
runner = FileSystem::Runner.new 'apps.yml'
runner.run "~/testing"
Note on Patches/Pull Requests
-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
Copyright
Copyright © 2010 Kristian Mandrup. See LICENSE for details.