ManageIQ / polisher

Polisher is a Ruby module and set of utilities aimed to assisting the post-publishing packaging process for Ruby gems and applications.
MIT License
14 stars 14 forks source link

Use Component#verify only for classes #106

Closed strzibny closed 10 years ago

strzibny commented 10 years ago

This fixes TypeError: RPM is not a module when some of the dependencies are not met:

> require 'polisher'
TypeError: RPM is not a module
    from /home/strzibny/.gem/ruby/gems/polisher-0.10.2/lib/polisher/rpm/has_requirements.rb:10:in `<module:Polisher>'
    from /home/strzibny/.gem/ruby/gems/polisher-0.10.2/lib/polisher/rpm/has_requirements.rb:9:in `<top (required)>'
    from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /home/strzibny/.gem/ruby/gems/polisher-0.10.2/lib/polisher/rpm/spec.rb:9:in `<top (required)>'
    from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /home/strzibny/.gem/ruby/gems/polisher-0.10.2/lib/polisher.rb:9:in `<top (required)>'
    from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:73:in `require'
    from (irb):3
    from /usr/bin/irb:12:in `<main>'

After the fix:

> require 'polisher'
Failed to require versionomy.  Added runtime exception in Polisher::RPM::Requirement
Failed to require versionomy.  Added runtime exception in Polisher::RPM::Spec
Failed to require pkgwat.  Added runtime exception in Polisher::Bodhi
Failed to require pkgwat.  Added runtime exception in Polisher::RHN
Failed to require pkgwat.  Added runtime exception in Polisher::Fedora
=> true
coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 97b3103bb5af262e86950992d9b9bf6040662c89 on strzibny:fix-component-verify into 3bd13a6c5939faa2199270f7c09a60f39c8d16b9 on ManageIQ:master.

miq-bot commented 10 years ago

Checked commit https://github.com/strzibny/polisher/commit/97b3103bb5af262e86950992d9b9bf6040662c89 with rubocop 0.21.0 2 files checked, 0 offenses detected Everything looks good. :cake:

jrafanie commented 10 years ago

:+1: @strzibny Awesome.