Closed jrafanie closed 10 years ago
@movitto @Fryguy @brandondunne Please review.
There's some strange autoloading errors that are occurring on ruby 2.0/2.1. I'll have to take a look. Any ideas?
Ah that err is caused by
https://github.com/ManageIQ/polisher/commit/c899d500502a57582a906dfa20cc6cf343c09265
Must've missed an instance :-)
@jrafanie Looks good, tried it out locally and works.
Mind merging #98 in & adding the activesupport requirement. Can merge after that.
Sorry, @movitto commented on #98 when I meant to comment here... I'm trying to get our builder app running off of polisher's master branch and ran into #101 and #102 right out of the gate. I'd rather stabilize master, get a version pushed to rubygems.org before adding another 1000+ net line changes from #98. Thoughts?
Checked commits https://github.com/jrafanie/polisher/commit/d4f4a5ef0ed58f74d07a1ff6867a2c45e05eb8d4 .. https://github.com/jrafanie/polisher/commit/938bacc9e7e28b561da72410c969b2749def8227 with rubocop 0.21.0 2 files checked, 1 offense detected
spec/component_spec.rb
@jrafanie Looks good. :+1:
Completely agree with your comment above.
@jrafanie Yeh thats fine, lets get these in, tag, push to rubygems, and then get #98 in
From the first commit:
Add support for missing components/gems in namespaced classes. … Relaxed dependencies via delayed exceptions was introduced in #72.
As introduced in #72, if Polisher::Fedora needed "curb", "pkgwat", and "nokogiri", it was supported via: Component.verify("Fedora", "curb", "pkgwat", "nokogiri") {}
If we specify required components for a namespaced class, such as Polisher::RPM::Requirement via: Component.verify("RPM::Requirement", 'gem2rpm', 'versionomy', 'active_support/core_ext') {}
it fails with 'uninitialized constant Polisher::RPM' because we're trying to inject a Requirement constant into a class that doesn't exist: Polisher::RPM. We have to create this RPM class in the Polisher namespace before trying to inject the Requirement == Missing component class.
This commit fixes this and also changes the output to warn the user about the exact missing dependencies on load but delays raising the RuntimeError until you try to instantiate the class.
For example: