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 support for suse 11 to service resource #638

Merged
merged 3 commits into from
Apr 15, 2016

Conversation

spuranam
Copy link
Contributor

This PR address issue 627.

Systemd.new(inspec, service_ctl)
elsif %w{suse opensuse}.include?(family)
version = inspec.os[:release].to_i
if (%w{ suse opensuse }.include?(family) && version >= 12)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can focus on version checking here. No need to test the family again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chris-rock giving it another try, let me know.

Systemd.new(inspec, service_ctl)
elsif %w{suse opensuse}.include?(family)
if (inspec.os[:release].to_i >= 12)
Copy link
Contributor

Choose a reason for hiding this comment

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

please use if inspec.os[:release].to_i >= 12 to meet our lint guidelines

@chris-rock
Copy link
Contributor

That addition looks really good now.

Also please add , Metrics/MethodLength to https://github.com/chef/inspec/pull/638/files#diff-100aafe8eee954060cc58510cf55ba01R97 This ensures that the tests get green again.

@spuranam
Copy link
Contributor Author

@chris-rock just checked the changes suggested above

@chris-rock
Copy link
Contributor

Thanks @spuranam for this addition

@chris-rock chris-rock merged commit aede111 into inspec:master Apr 15, 2016
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

3 participants