def wagon_class(spec)
      @wagon_classes ||= {}
      return @wagon_classes[spec] if @wagon_classes.key?(spec)

      clazz = nil
      file = File.join(spec.gem_dir, 'lib', spec.name, 'wagon.rb')
      if File.exist?(file)
        require file
        clazz = "#{spec.name.camelize}::Wagon".constantize
      else
        fail "#{spec.name} wagon class not found in #{file}"
      end
      @wagon_classes[spec] = clazz
    end
def wagon_class(spec)
      @wagon_classes ||= {}
      return @wagon_classes[spec] if @wagon_classes.key?(spec)

      clazz = nil
      file = File.join(spec.gem_dir, 'lib', spec.name, 'wagon.rb')
      if File.exist?(file)
        require file
        clazz = "#{spec.name.camelize}::Wagon".constantize
      else
        fail "#{spec.name} wagon class not found in #{file}"
      end
      @wagon_classes[spec] = clazz
    end
The wagon class of the given spec.