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

Add Rubocop and cleanup #96

Merged
merged 66 commits into from May 20, 2017
Merged

Add Rubocop and cleanup #96

merged 66 commits into from May 20, 2017

Conversation

avellable
Copy link
Contributor

@avellable avellable commented May 6, 2017

First of all, thank you so much for this gem. It saved a lot of time and effort for me. I was going through the code and thought, it can use some code cleanup. These changes simply apply the widely used ruby style guide using Rubocop. In my opinion, this will be helpful in maintaining and refactoring (if needed/planned).

I have broken up the commits very granular based on each type of offense fix, for ease of review. Please go through the commit one by one and let me know your feedback. Once changes are approved, I'll squash them in 3-4 commits.

@avellable
Copy link
Contributor Author

avellable commented May 6, 2017

Seems like the build is failing for older ruby versions. But since, the official support has been dropped for >= 1.9.3 rubies since Feb 2015, can we bump up the gem version please?

@njh
Copy link
Owner

njh commented May 7, 2017

Hello,

Thanks for doing this - it would be good to standardise the mqtt code.

Is it possible to only run rubocop for specific versions?

I am aware of people running ruby-mqtt on RedHat Enterprise Linux / CentOS.

RHEL 6 is still in its support period and amazingly is Ruby 1.8. Although Ruby 1.9 is available via Software Collections.

  • RHEL 6: ruby 1.8.7.374-5.el6
  • RHEL 7: ruby 2.0.0.648-29.el7

nick.

@avellable
Copy link
Contributor Author

Hi @njh ,
Thank you for your feedback. I've made rubocop to be run only on versions > 2.0.0. Also, I've reverted few changes to support older ruby versions. All builds have passed now. Please take a look. Thanks.

@njh njh merged commit 3895873 into njh:master May 20, 2017
@njh
Copy link
Owner

njh commented May 20, 2017

Thanks for doing this!

@avellable avellable deleted the add-rubocop branch May 20, 2017 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants