github/hub — pull request #488 by mislav (2014-02-16 03:10:25+00:00)
Title: Allow Enterprise configured for regular HTTP

This allows the `protocol` option in hub config file to specify whether an Enterprise instance is using regular (non-secure) HTTP. The only way to set the option is by manually editing the config file. This is a temporary hack to allow people to use hub with non-secure Enterprise installs.

This affects: API requests, `browse` & `compare` commands. This doesn't affect: git protocol, i.e. git clone/fetch operations.

Example `~/.config/hub`:

my.example.org:
- user: myuser
oauth_token: mytoken
protocol: http

Alternative to #247 #485. Advantages of the approach taken here:

- Minimal diff. As few changes to GitHubAPI as possible
- `protocol` instead of `uri_scheme` as a more intention-revealing name
- More solid tests

/cc @msabramo @mmrobins