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

Cleanup ruby code via rubocop #85

Merged
merged 1 commit into from Oct 27, 2017

Conversation

willmeek
Copy link

This commit will add code cleanup as corrected
and alerted by rubocop. It also adds rules to
execute rubocop on Travis.

Copy link
Contributor

@eputnam eputnam left a comment

Choose a reason for hiding this comment

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

looks lovely for the most part! let me know what you think.

@@ -13,4 +13,5 @@
begin
require 'spec_helper_local'
rescue LoadError
puts 'LoadError rescue'
Copy link
Contributor

Choose a reason for hiding this comment

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

it'd be good to have something more informative here. maybe something like this?

begin
  require 'spec_helper_local'
rescue LoadError => loaderror
  puts "Could not require spec_helper_local: #{loaderror.message}"
end

Copy link
Author

Choose a reason for hiding this comment

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

Great suggestion Eric, thanks, have added this.

@@ -1,17 +1,31 @@
---
HOSTS:
windows2012-64-1:
Copy link
Contributor

Choose a reason for hiding this comment

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

modulesync is going to change this back to windows2012 because this module is now marked as cross-platform. getting around it might be hairy...

Copy link
Author

Choose a reason for hiding this comment

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

Thanks Eric, have reverted this.

Copy link
Contributor

@pmcmaw pmcmaw left a comment

Choose a reason for hiding this comment

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

Apart from that one minor change everything looks good to me.

.travis.yml:
extras:
- rvm: 2.1.9
script: bundle exec rake rubocop
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove this line break?

Copy link
Author

Choose a reason for hiding this comment

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

There wasn't a line break. I've added one as it seems that the github diff was highlighting this as an issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm strange, when I commented there was a small red arrow at the end of the line. Anyway looks good to me.

Copy link
Author

Choose a reason for hiding this comment

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

No no, you're right, there was, adding a line break got rid of it :)

This commit will add code cleanup as corrected
and alerted by rubocop. It also adds rules to
execute rubocop on Travis.
@eputnam eputnam merged commit 5306ea8 into puppetlabs:master Oct 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants