protocol = 'http' if ((hostname and hostname.startswith('localhost')) or util.is_running_on_devserver()) else 'https'
is_running_on_devserver() is always true when running locally to generate the spec. This is not desired behavior.
I think this is an error in #14.