berkshelf/berkshelf — pull request #1285 by echohack (2014-08-14 19:41:17+00:00)
Title: Rubocop'd

Updated a couple of generator files with rubocop compliant changes.

The goal of this is to make the default generated files compliant to rubocop.

Vertical whitespacing (as demonstracted in metadata.rb.erb) is not rubocop compliant. While vertical whitespace might seem more readable for a generated file, it's almost never a good idea in code that will change (and as we all know, code changes!) Initially, vertical whitespace will look like this:

```
name 'my-face'
maintainer 'My Name'
maintainer_email 'myface@example.com'
license 'All rights reserved'
description 'Installs/Configures my-face'
long_description 'Installs/Configures my-face'
version '0.1.0'

depends 'windows','~> 1.30.0'
```
Inevitably, vertical whitespace files will look like this.

```
name 'my-face'
maintainer 'My Name'
maintainer_email 'myface@example.com'
license 'All rights reserved'
description 'Installs/Configures my-face'
long_description 'Installs/Configures my-face'

version '0.1.0'

depends 'windows','~> 1.30.0'
```

What you really want is something that's maintainable and enforceable. You want this:

```
name 'my-face'
maintainer 'My Name'
maintainer_email 'myface@example.com'
license 'All rights reserved'
description 'Installs/Configures my-face'
long_description 'Installs/Configures my-face'

version '0.1.0'

depends 'windows','~> 1.30.0'
```

The only way to really enforce this is to use a linter, ala Rubocop, to enforce a style standard through your build.

Can we please use rubocop as a standard? This is a generally accepted standard in the ruby community.