AgileVentures/WebsiteOne — pull request #438 by sampritipanda (2014-06-15 16:55:22+00:00)
Title: Model Refactoring + Model Tests

* Refactored a lot of code in the models and related files
* Improved test coverage in models to 100%.

1. `app/models/article.rb`, `app/models/document.rb` and `app/models/static_page.rb` - Making use of the new model concern.
1. `app/models/event.rb` - Capitalized the constants to make sure Ruby interprets them as class constants.
1. `app/models/project.rb` - Renaming the Pivotal Tracker Url Validator since there was another validator with almost the same name.
1. `config/environment.rb` - Removing the non - app related code from the config/ directory to the lib/ directory.
1 `config/initializers/geocoder.rb` - Set the timeout to 10, because currently it will fail regardless of it working or not.
1. `config/initializers/website_one.rb` - Automatically requiring the lib/validators directory.
1. `db/`: Add index on articles and documents and adding in migrations from acts as taggable on.
1. `lib/core_ext/datetime.rb` - Move the datetime extension in the config/ directory to a core extension in the lib/ directory.
1. `lib/validators/pivotal_tracker_url_validator.rb` - Move it inside the lib/validators and use a more specific name since it was conflicting with another validator.
1. `lib/validators/uri_validator.rb` - Move the UriValidator to the lib/validators from the config directory so as to group all the custom validators in the lib/validators directory.
1. Many tests have been changed to match with the above changes.
1. Lots of new tests have been written to upgrade the test coverage to 100%.