Break generator commands into seperate files

This commit breaks the generator commands from one big file into several smaller ones, and requires them. As we expand the number of generators, we're naturally going to wind up having more than
a handful - which makes the giant file, and its equally large rspec test, unwieldly.

In addition, it adds Guard support (for faster test results) and fixes a bug where the error handling in CookbookCodeFile descendents triggered hard failure in getopt due to lack of passing the params
in. This caused tests that were run with an rspec option to fail, as the repeat call to parse_options would pick up the default argv, rather than the mocked argv supplied in the specs.

No changes to the code happen at all, other than location and the small bug fix.
Yep - my plan was to grab you today.
On Jul 28, 2014 8:36 AM, "Dan DeLeo" <notifications@github.com> wrote:

> In lib/chef-dk/command/generator_commands/app.rb:
>
> > +# License:: Apache License, Version 2.0
> > +#
> > +# Licensed under the Apache License, Version 2.0 (the "License");
> > +# you may not use this file except in compliance with the License.
> > +# You may obtain a copy of the License at
> > +#
> > +#     http://www.apache.org/licenses/LICENSE-2.0
> > +#
> > +# Unless required by applicable law or agreed to in writing, software
> > +# distributed under the License is distributed on an "AS IS" BASIS,
> > +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > +# See the License for the specific language governing permissions and
> > +# limitations under the License.
> > +#
> > +
> > +require 'chef-dk/command/generator_commands/base'
>
> Yep, this patch looks good. I think if we do want to optimize the
> performance of chef generate beyond the current situation, I'd favor
> creating a new commands map for the generators, since it includes the
> description which allows us to make the -h case really fast. @adamhjk
> <https://github.com/adamhjk> I'm interested in what you have in mind for
> "some refactoring that makes creating generators easier," maybe create an
> issue that describes what sucked about your experience so far?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/opscode/chef-dk/pull/114/files#r15469364>.
>