WebBlocks/WebBlocks — pull request #2 by ebollens (2014-03-02 05:38:33+00:00)
Title: Command-Line Behaviors

This pull request makes a number of improvements for command-line behavior:

1. Changes `Blocksfile.rb` to `Blockfile.rb` so that a "block" is not differentiable from a "distribution". From a conceptual level, the goal is to allow you to use WebBlocks to compile an individual block with a `Blockfile.rb` defined or what was formerly a distribution with a `Blocksfile.rb` defined.
1. Allow for invocation of WebBlocks with a `--blockfile` flag providing a path to a Blockfile besides the standard resolution chain.
1. Add `name` to Bower registry and expose it through the `WebBlocks::Manager::Bower` object.
1. Call `include` for the block by the `name` in the Bower registry, meaning that Bower will automatically include the block by the name defined in `bower.json`. For the `WebBlocks` name, for instance, the line `include 'WebBlocks'` will be called. This provides the expected behavior in the case that this is called from a block rather than a distribution.
1. Run `Blockfile.rb` in the instance context of the framework root, even in the case of where it's compiled from (what was formerly `Blocksfile.rb`). This means that the `framework { .. }` syntax is no longer needed within any `Blockfile.rb`.
1. Allow for invocation of WebBlocks with a `--include` flag to specify a set of blocks that should be included. This allows, for instance, building https://github.com/ebollens/efx with particular drivers by calling: `blocks build --include efx drivers tabs, efx drivers toggle`. Supports escaping characters or enclosing them in quotes. If a block route segment is more than one word, it must be escaped or string enclosed, as the format of this assumes that each unescaped space delimits a route segment and each comma delimits two separate routes.