fix warning in stub specifications

if the name and version methods haven't been called, the instance
variables will not be initialized, and calling to_spec will warn. This
ensures that the data has actually been loaded before looping through
the loaded specs.