bbatsov/rubocop — pull request #1073 by molawson (2014-05-09 01:02:37+00:00)
Title: Fix AlignParameters for multi-line method calls

### Problem

In an app I'm working on, we have the following in our `.rubocop.yml` file.
```yaml
AlignParameters:
EnforcedStyle: with_fixed_indentation
```

When we get in a spot where we need to use both multi-line method calls and multi-line method arguments, we tend to end up with code that looks something like this.

```ruby
some_object
.method_without_args
.method_with_args(
'this',
'that',
'the other'
)
```

Currently that triggers two offenses in Rubocop for the `'that',` and `'the other'` lines because they are indented 4 spaces from the beginning of the node, `some_object`. Rubocop autocorrects the code above to this.

```ruby
some_object
.method_without_args
.method_with_args(
'this',
'that',
'the other'
)
```

### Solution

Assuming that we agree on the first example being the acceptable style, I've updated the `AlignParameters` cop to indent multi-line arguments based on the indentation of the method call that they belong to.

I've written a few tests to demonstrate the desired behavior, and everything seems to be working as intended.

Thanks!