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

Placing all resources in the Inspec::Resources namespace #526

Merged
merged 1 commit into from Mar 9, 2016

Conversation

adamleff
Copy link
Contributor

@adamleff adamleff commented Mar 8, 2016

Many of the resources are named as a top-level class with a fairly generic class name, such as "OS". This causes an issue specifically with kitchen-google which depends on a gem which depends on the "os" gem which itself defines an OS class with a different superclass. This prevents users from using TK, Google Compute, and Inspec without this fix.

Since our resource class names aren't unique to just Inspec, I'm moving all resource classes in the Inspec::Resources module to hopefully avoid this issue in the future. Since the class name is not used in finding a resource (because of the resource registry), this change should be a no-op to our users.

Some mocked commands had their digest changed as well due to the new indentation, specifically in the User and RegistryKey classes.

I strongly recommend viewing this diff with git diff --ignore-space-change
to see the real changes. :)

Many of the resources are named as a top-level class with a fairly generic class name, such as "OS". This causes an issue specifically with kitchen-google which depends on a gem which depends on the "os" gem which itself defines an OS class with a different superclass. This prevents users from using TK, Google Compute, and Inspec without this fix.

Some mocked commands had their digest changed as well due to the new indentation, specifically in the User and RegistryKey classes.

I strongly recommend viewing this diff with `git diff --ignore-space-change`
to see the *real* changes. :)
@arlimus
Copy link
Contributor

arlimus commented Mar 9, 2016

Thank you so much @adamleff !! This is a stern reminder how much code there's in resources already :D (the diff says it all). Great improvement, kudos 👍

arlimus added a commit that referenced this pull request Mar 9, 2016
Placing all resources in the Inspec::Resources namespace
@arlimus arlimus merged commit 9cb2bc5 into master Mar 9, 2016
@arlimus arlimus deleted the adamleff/resource-namespace branch March 9, 2016 09:32
@arlimus arlimus added the Type: Bug Feature not working as expected label Mar 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants