leereilly/swot — pull request #32 by simeonwillbanks (2013-10-08 04:03:25+00:00)
Title: Refactor #get_institution_name

Hi Lee,

This Pull Request suggests a few refactors to DRY the codebase. Basically, `#get_institution_name` now uses `#get_domain`.

I hope you like it, and thanks for swot!
Simeon

* Refactor `#get_institution_name` to use `#get_domain`
* Define `#get_path` to get file path from domain
* `#match_academic_domain?` and `#name_from_academic_domain` use `#get_path`
* Strip input `text` within `#get_domain`
* Replace `File.open` with `File.read` in `#name_from_academic_domain`
* Be more concise
* Ensure file is closed
* Add Travis CI
* Requires [activating a service hook](http://about.travis-ci.org/docs/user/getting-started/#Step-two%3A-Activate-GitHub-Service-Hook)