Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid line continuations without parentheses. #138

Merged
merged 1 commit into from
Mar 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 13 additions & 8 deletions spec/acceptance/cli/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@

run 'appraisal install'

expect(content_of 'gemfiles/1.0.0.gemfile.lock').not_to include
current_directory
expect(content_of("gemfiles/1.0.0.gemfile.lock")).
not_to include(current_directory)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve 👍 This code is 43.7% better without this ambiguity.

end

context 'with job size', :parallel => true do
Expand All @@ -52,19 +52,24 @@
it 'accepts --jobs option to set job size' do
output = run 'appraisal install --jobs=2'

expect(output).to include
'bundle install --gemfile=gemfiles/1.0.0.gemfile --jobs=2'
expect(output).to include(
"bundle install --gemfile='#{file('gemfiles/1.0.0.gemfile')}' --jobs=2"
)
end

it 'ignores --jobs option if the job size is less than or equal to 1' do
output = run 'appraisal install --jobs=0'

expect(output).
to include(
"bundle install --gemfile='#{file('gemfiles/1.0.0.gemfile')}'"
)
expect(output).not_to include(
'bundle install --gemfile=gemfiles/1.0.0.gemfile')
"bundle install --gemfile='#{file('gemfiles/1.0.0.gemfile')}' --jobs=0"
)
expect(output).not_to include(
'bundle install --gemfile=gemfiles/1.0.0.gemfile --jobs=0')
expect(output).not_to include(
'bundle install --gemfile=gemfiles/1.0.0.gemfile --jobs=1')
"bundle install --gemfile='#{file('gemfiles/1.0.0.gemfile')}' --jobs=1"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see Hound is not enabled, so this line (and similar ones above) is not being barked at for not ending on a comma. Is that ok by you?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, that's an error under Ruby 1.8.7, which is still being run in CI. Removing the trailing comma fixes this.

One option here would be to first go about dropping support for 1.8.7. What do you think?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. One one hand, I'm for dropping 1.8.7, but on the other hand I don't find coding style a good enough reason for it.

I'm happy to leave it as is for now.

)
end
end
end