Skip to content

Conversation

carbonin
Copy link
Member

Previously nearly all classes were mixing in LinuxAdmin::Common
to get access to what really are just utility methods.

Not sure when a good time to make this sort of change is, but I'm giving it a shot.
@bdunne @Fryguy @jrafanie

Fixes #19

@carbonin carbonin force-pushed the stop_using_common_as_a_mixin branch 2 times, most recently from 705d5a1 to 97f4aba Compare December 14, 2015 13:58
@jrafanie
Copy link
Member

This makes sense to me. 👍

allow(LinuxAdmin::VolumeGroup).to receive_messages(:run! => double(:output => ""))
allow(described_class).to receive_messages(:run! => double(:output => ""))
allow(LinuxAdmin::Common).to receive_messages(:run! => double(:output => ""))
allow(LinuxAdmin::Common).to receive_messages(:run! => double(:output => ""))
Copy link
Member

Choose a reason for hiding this comment

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

Do you need this twice? allow should handle any number of calls, right?

@carbonin carbonin force-pushed the stop_using_common_as_a_mixin branch from 97f4aba to 907c20b Compare February 11, 2016 18:49
Previously nearly all classes were mixing in LinuxAdmin::Common
to get access to what really are just utility methods.

Fixes ManageIQ#19
@carbonin carbonin force-pushed the stop_using_common_as_a_mixin branch from 907c20b to 9e7d113 Compare February 11, 2016 18:52
@miq-bot
Copy link
Member

miq-bot commented Feb 11, 2016

Checked commit carbonin@9e7d113 with ruby 2.2.3, rubocop 0.34.2, and haml-lint 0.13.0
41 files checked, 2 offenses detected

spec/physical_volume_spec.rb

bdunne added a commit that referenced this pull request Feb 11, 2016
Made Common its own class rather than a module
@bdunne bdunne merged commit 9bbd208 into ManageIQ:master Feb 11, 2016
carbonin added a commit to carbonin/manageiq that referenced this pull request Feb 12, 2016
Required to use a linux_admin gem version containing the PR
here ManageIQ/linux_admin#148 which
removes access to the LinuxAdmin::Common module's methods through
any class in LinuxAdmin.
@carbonin carbonin deleted the stop_using_common_as_a_mixin branch February 12, 2016 18:12
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.

4 participants