Removed the copy/paste code, moved it into a reusable function that can
be called from the `local_setup` function as needed. Also simplified the
handling of the $HOME variable since @rico-chet provided a better way of
doing this.
Configuration files of `git` are managed by the tool and thus are
tab-indented. If a developer happens to edit such a file manually, the
indentation would become inconsistent.
Add an explicit section for such files and set the indentation to tabs.
Since the existing jobs are similar (currently, the `script` keys are
same), move the equal parts to a new shared key to have them in one
place. The new map will receive more content in upcoming commits.
There are a couple ways to declare a build matrix in Travis CI, refer to
https://docs.travis-ci.com/user/build-matrix.
Since upcoming commits will add more ways to run tests, switch the build
matrix from simple OS variation to a more powerful list of jobs.
In case `go` is not installed, tests of the according plugin fail. It's
better to just skip them since `golang` isn't commonly installed on
`bash-it` developers' machines.
In CI environment, no tests should be skipped, so run them anyway.
Git uses system-wide and user-wide configurations per default and these
can interfere with our tests. Keep `git` from using them by setting the
according environment variables.
This might also help with other tools which access user's home
directory.
Out of the box, `curl` reports success (via exit code) even if the
server returns an error, e.g. _429 Too Many Requests_ which was
sometimes the case with `http://myip.dnsomatic.com`. So, errors went
undetected.
There is the `--fail` switch which enables us to use the exit code the
way we need:
> -f, --fail
> (HTTP) Fail silently (no output at all) on server
> errors. This is mostly done to better enable scripts etc
> to better deal with failed attempts. In normal cases
> when an HTTP server fails to deliver a document, it
> returns an HTML document stating so (which often also
> describes why and more). This flag will prevent curl
> from outputting that and return error 22.
Use it to make the `myip()` deliver results reliably.