Make `--out` to create parent directories

Fix #1389.

I don't sure this should be treated as a new feature.
Yeah. You can change this in a separate PR.

On Saturday, October 18, 2014, ChaYoung You <notifications@github.com>
wrote:

> In lib/rubocop/formatter/formatter_set.rb:
>
> > @@ -37,7 +39,13 @@ def add_formatter(formatter_type, output_path = nil)
> >                              builtin_formatter_class(formatter_type)
> >                            end
> >
> > -        output = output_path ? File.open(output_path, 'w') : $stdout
> > +        if output_path
> > +          dir_path = File.dirname(output_path)
> > +          FileUtils.makedirs dir_path unless File.exist?(dir_path)
>
> Then do you want same changes for spec/support/file_helper?
>
> https://github.com/bbatsov/rubocop/blob/b2a1d461b8a073c2263f7ba0719c904759e27231/spec/support/file_helper.rb#L10
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/bbatsov/rubocop/pull/1391/files#r19051186>.
>


-- 
Best Regards,
Bozhidar Batsov

http://www.batsov.com