Skip to content

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Mar 30, 2014

Hey @Fryguy

I understand we used to use the system PATH, but it had too many special cases and code around such a simple lookup. Using an internal PATH (much the way system daemons like cron and ssh do) seemed like a simpler and more resilient approach.

In order to do this, I needed to do some cleanup, so this PR took on a life of its own.

@jrafanie: let me know where you want me to split up the code into multiple PRs. As always, the commits represent the different blocks of work I performed.

Oh, and @jrafanie, it would have been delta -111 lines, but I added 45 lines in new specs. Let them eat 🍰!

UPDATE:
Notes on implementation:

  • merged Distros::Distro.local and Distors.local, with more consistent rspec stubs.
  • removed Package case statement in favor of inheritence in Distro
  • remove Distros.redhat in favor of rhel, fedora and leveraged Distros.all instead of meta class fu
  • removed Distro subclasses (e.g.: RedHat, Fedora), just use Distro instead.
  • removed all the Distro constants like COMMANDS and just used instance variables instead. (aside: Something odd was happening with RELEASE_FILE)

@cfme-bot
Copy link
Member

Checked commits kbrock@6c55914 .. kbrock@1a461b2 with rubocop
9 files checked, 2 offenses detected

kbrock added 2 commits March 30, 2014 02:00
- only 1 'local' method Distros.local
- don't 'exist' on a release_file that doesn't exist
- consistent stubbing of distro.
- move package distro case statement into distro itself
- remove redhat distro constant (it is rhel or fedora)
- leverage Distros.all instead of meta class fu
@cfme-bot
Copy link
Member

Checked commits kbrock@ae44751 .. kbrock@3589bdf with rubocop
9 files checked, 0 offenses detected

Copy link
Member

Choose a reason for hiding this comment

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

Would flip this to be expect(subject).to include("phrase")

kbrock added 3 commits March 31, 2014 20:25
- remove knowledge of internals from specs
- lazy load file
- add include? method
@cfme-bot
Copy link
Member

cfme-bot commented Apr 1, 2014

Checked commits kbrock@ae44751 .. kbrock@3b0f239 with rubocop
9 files checked, 0 offenses detected

Everything looks good. 👍

Fryguy added a commit that referenced this pull request Apr 1, 2014
Use path instead of individually hard coded commands
@Fryguy Fryguy merged commit 4a31d40 into ManageIQ:master Apr 1, 2014
@kbrock kbrock deleted the use_path branch April 1, 2014 19:46
Fryguy added a commit to Fryguy/linux_admin that referenced this pull request Jul 10, 2014
Specifically commit c99c63b

Previously Rpm < Package < LinuxAdmin, and LinuxAdmin is where
the .run method comes from.  By removing Package, Rpm broke
by not having access to .run.  This readds the class to fix
that issue.
Fryguy added a commit to Fryguy/linux_admin that referenced this pull request Jul 10, 2014
Specifically commit c99c63b

Previously Rpm < Package < LinuxAdmin, and LinuxAdmin is where
the .run method comes from.  By removing Package, Rpm broke
by not having access to .run.  This readds the class to fix
that issue.
Fryguy added a commit to Fryguy/linux_admin that referenced this pull request Jul 10, 2014
Specifically commit c99c63b

Previously Rpm < Package < LinuxAdmin, and LinuxAdmin is where
the .run method comes from.  By removing Package, Rpm broke
by not having access to .run.  This readds the class to fix
that issue.
jrafanie added a commit that referenced this pull request Jul 10, 2014
Readd Package abstract class that was removed in #96
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.

3 participants