-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Refactor/rubocop line tidy #693
Conversation
.rubocop_todo.yml
Outdated
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: AllowForAlignment. | ||
Layout/SpaceAroundOperators: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These additions to the todo file don't make sense anymore. Can you rebase this branch and remove the old commit that regenerates the todo file?
else | ||
Aruba.platform.which(command, environment['PATH']) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
expect(api.fixtures_directory.to_s).to eq expand_path('test/fixtures') | ||
} | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Hopefully we can tackle these soon.
end | ||
|
||
context 'when subscriber to event, the block is called and get\'s an instance of the event passed as payload' do | ||
context 'when subscriber to event, the block is called and gets an instance of the event passed as payload' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
it { expect { bus.register(event_klass) }.to raise_error ArgumentError } | ||
it 'raises an ArgumentError' do | ||
expect { bus.register(event_klass) }.to raise_error ArgumentError | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvements to this file!
I'll take a look at this again next weekend. |
@mvz I'm aware I need to fix conflicts, but could you re-review this first to work out if I only need to do small things or not? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two more nits and then it's good to go.
lib/aruba/api/core.rb
Outdated
fail ArgumentError, 'Expanding "~/" to "/" is not allowed' if path.to_s == '/' | ||
fail ArgumentError, %(Expanding "~/" to a relative path "#{path}" is not allowed) unless path.absolute? | ||
raise ArgumentError, 'Expanding "~/" to "/" is not allowed' if path.to_s == '/' | ||
raise ArgumentError, "Expanding '~/' to a relative path #{path} is not allowed" unless path.absolute? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please restore the original quotes inside this string for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't as there's an interpolation
# rubocop:enable Layout/LineLength | ||
unless Aruba.platform.exist? path | ||
raise ArgumentError, "Fixture #{rest} does not exist in fixtures directory #{aruba.fixtures_directory}. "\ | ||
"This was the one we found first on your system from all possible candidates: #{aruba_fixture_candidates}." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's only used here, and only for formatting, I think aruba_fixture_andidates
should be a local variable instead of a method.
@luke-hill done! |
@luke-hill are you planning to work on this soon? If not I can fix this up, fix the spec failures, and merge. |
I'll get on this this week |
Co-Authored-By: Matijs van Zuijlen <[email protected]>
I'm going to rebase and merge this. |
1a9c980
to
88d6f24
Compare
Summary
Improve Rubocop LineLength (And a few other minor styles)
Details
Rebase and fix up an old PR fixing up some LineLength issues
How Has This Been Tested?
CI
Screenshots (if appropriate):
Types of changes
Checklist:
NB: I've not updated the TODO as I want to standardise the TODO first by doing some additional cleanups and removing some patches around certain methods so we have a single source of truth