{"action":"created","comment":{"url":"https://api.github.com/repos/triplea-game/triplea/pulls/comments/53891177","id":53891177,"diff_hunk":"@@ -0,0 +1,9 @@\n+package games.strategy.engine.config;\n+\n+public class PropertyNotFoundException extends IllegalStateException {\n+  private static final long serialVersionUID = -7834937010739816090L;\n+\n+  public PropertyNotFoundException(GameEngineProperty property) {\n+    super(\"Could not find property: \" + property.toString() + \", in game engine configuration file: \"+ GameEnginePropertyFileReader.getConfigFilePath());","path":"src/games/strategy/engine/config/PropertyNotFoundException.java","position":7,"original_position":7,"commit_id":"3cd5473576aa1e8ffaa2b6dff39e86908eb25aa9","original_commit_id":"3cd5473576aa1e8ffaa2b6dff39e86908eb25aa9","user":{"login":"ron-murhammer","id":1427689,"avatar_url":"https://avatars.githubusercontent.com/u/1427689?v=3","gravatar_id":"","url":"https://api.github.com/users/ron-murhammer","html_url":"https://github.com/ron-murhammer","followers_url":"https://api.github.com/users/ron-murhammer/followers","following_url":"https://api.github.com/users/ron-murhammer/following{/other_user}","gists_url":"https://api.github.com/users/ron-murhammer/gists{/gist_id}","starred_url":"https://api.github.com/users/ron-murhammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ron-murhammer/subscriptions","organizations_url":"https://api.github.com/users/ron-murhammer/orgs","repos_url":"https://api.github.com/users/ron-murhammer/repos","events_url":"https://api.github.com/users/ron-murhammer/events{/privacy}","received_events_url":"https://api.github.com/users/ron-murhammer/received_events","type":"User","site_admin":false},"body":"Is toString() needed here?","created_at":"2016-02-24T03:59:44Z","updated_at":"2016-02-24T03:59:44Z","html_url":"https://github.com/triplea-game/triplea/pull/426#discussion_r53891177","pull_request_url":"https://api.github.com/repos/triplea-game/triplea/pulls/426","_links":{"self":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/comments/53891177"},"html":{"href":"https://github.com/triplea-game/triplea/pull/426#discussion_r53891177"},"pull_request":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/426"}}},"pull_request":{"url":"https://api.github.com/repos/triplea-game/triplea/pulls/426","id":58105413,"html_url":"https://github.com/triplea-game/triplea/pull/426","diff_url":"https://github.com/triplea-game/triplea/pull/426.diff","patch_url":"https://github.com/triplea-game/triplea/pull/426.patch","issue_url":"https://api.github.com/repos/triplea-game/triplea/issues/426","number":426,"state":"open","locked":false,"title":"Show Engine Version on the UI + Consolidate Engine Version and Game Configuration","user":{"login":"DanVanAtta","id":12397753,"avatar_url":"https://avatars.githubusercontent.com/u/12397753?v=3","gravatar_id":"","url":"https://api.github.com/users/DanVanAtta","html_url":"https://github.com/DanVanAtta","followers_url":"https://api.github.com/users/DanVanAtta/followers","following_url":"https://api.github.com/users/DanVanAtta/following{/other_user}","gists_url":"https://api.github.com/users/DanVanAtta/gists{/gist_id}","starred_url":"https://api.github.com/users/DanVanAtta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanVanAtta/subscriptions","organizations_url":"https://api.github.com/users/DanVanAtta/orgs","repos_url":"https://api.github.com/users/DanVanAtta/repos","events_url":"https://api.github.com/users/DanVanAtta/events{/privacy}","received_events_url":"https://api.github.com/users/DanVanAtta/received_events","type":"User","site_admin":false},"body":"### Changes:\r\n- Parse the game engine version from a config file instead of hardcoded\r\n- Convert the mapDownload.properties file into a generic config file 'game_engine.properties'\r\n- Display the game engine version on the UI\r\n- Update Travis to read and update the game version in 'game_engine.properties'\r\n\r\n### Before / Context:\r\n-  `EngineVersion.java` stored the game engine version in statically initialized singleton instance\r\n- Travis also stored the game engine version redundantly as an environment variable (this can be removed after this PR)\r\n- MapDownloadController.java reads from the 'mapDownload.properties' to know where the triplea_maps.xml file is\r\n\r\n### General Approach\r\n- Have just one configuration file rather than many: 'game_engine.properties'\r\n- Have the EngineVersion parse the file and ignore the fifth digit, yet still store it so we can display it on the UI.\r\n- Push the game engine config parsing code 'up' so that it is not duplicated by anything that loads a value from config.\r\n- The code to parse the property file needs a home. It is consolidated into a `PropertyReader` implementation, which is then needed to use an `EngineVersion` or a `MapDownloadController`. The next key problem is that `EngineVersion` is used in 30+ places, so wiring that data through to use EngineVersion each time is not very practical. So to solve this we consolidate the initialization code to a `ClientContext` object. Then the old code that used to get an EngineVersion via singleton, it gets it through the ClientContext singleton now instead which can return an initialized EngineVersion.\r\n- ClientContext is modeled after Spring IOC containers. In this case it helps since we can conslidate initialization logic, and not pass around objects needed for initialization in 31+ places. (See bottom of this summary for an architecture diagram, showing these transformations/reorganization)\r\n\r\n\r\n### Comments on the  IOC container `ClientContext`:\r\n- `ClientContext` is reinventing the wheel..  But for now it helps a lot, and we don't have to go through the hurdle yet of picking and using a full blown IOC container.\r\n- The test infrastructure for the IOC is not complete. There for now is no way to prevent normal IOC container initialization when running tests. A hook has been left in so at least IOC container objects can be mocked, but to really go the distance we would want to stop the normal initialization completely.\r\n\r\n### Circular Dependency Note When reading Game engine version from Config file\r\n- The game engine version was moved to a config file, at the root folder\r\n- To find the root folder, we need the engine version\r\n- To read the config file, to get the engine versoin, we need the root folder..\r\n\r\nTo break this circular loop it wasn't too hard to drop the need for the engine version when finding the root folder. A regex could match any version number, and there is a specific prefix and suffix that we were looking for before, so the actual version number was not important. By removing that we no longer had the circular call loop.\r\n\r\n### Methods moved from GameRunner2 to ClientFileSystemHelper\r\n- While trying to resolve the circular call loop I moved stuff out of GameRunner2 to ClientContext. Then eventually this stuff moved to `ClientFileSystemHelper`. The goal there is to place a lot of the procedural utility code somewhere that is not GameRunner2 and not ClientContext. \r\n\r\n### UI  Screenshots\r\nBefore:\r\n![before](https://cloud.githubusercontent.com/assets/12397753/12775315/daa40136-ca01-11e5-9bae-e18ca8994970.png)\r\n\r\nAfter with game engine version:\r\n![after](https://cloud.githubusercontent.com/assets/12397753/12775316/daa4249a-ca01-11e5-847c-7e3661e276c0.png)\r\n\r\nFinal with renamed \"game name\" and \"game version\" labels:\r\n![after_after](https://cloud.githubusercontent.com/assets/12397753/12775380/3cf6e47a-ca02-11e5-8b3d-bb09885e2172.png)\r\n\r\n\r\n### High level Change Diagram\r\n\r\nGoal: share the data pulled from the config file between MapDownloadController and EngineVersion. To do this they will share the `congFileParser` , and a ClientContext object will create the common dependencies and then instantiate objects that need them. \r\n\r\n![arch_diagram_for_ioc](https://cloud.githubusercontent.com/assets/12397753/12776663/c828d828-ca0c-11e5-90f4-c94f3176b9db.png)\r\n\r\n<!-- Reviewable:start -->\r\n[<img src=\"https://reviewable.io/review_button.svg\" height=\"40\" alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/triplea-game/triplea/426)\r\n<!-- Reviewable:end -->\r\n","created_at":"2016-02-03T08:30:37Z","updated_at":"2016-02-24T03:59:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"875d25d784874de947df63e9b54c921eac8465c2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/triplea-game/triplea/pulls/426/commits","review_comments_url":"https://api.github.com/repos/triplea-game/triplea/pulls/426/comments","review_comment_url":"https://api.github.com/repos/triplea-game/triplea/pulls/comments{/number}","comments_url":"https://api.github.com/repos/triplea-game/triplea/issues/426/comments","statuses_url":"https://api.github.com/repos/triplea-game/triplea/statuses/3cd5473576aa1e8ffaa2b6dff39e86908eb25aa9","head":{"label":"DanVanAtta:engine_version","ref":"engine_version","sha":"3cd5473576aa1e8ffaa2b6dff39e86908eb25aa9","user":{"login":"DanVanAtta","id":12397753,"avatar_url":"https://avatars.githubusercontent.com/u/12397753?v=3","gravatar_id":"","url":"https://api.github.com/users/DanVanAtta","html_url":"https://github.com/DanVanAtta","followers_url":"https://api.github.com/users/DanVanAtta/followers","following_url":"https://api.github.com/users/DanVanAtta/following{/other_user}","gists_url":"https://api.github.com/users/DanVanAtta/gists{/gist_id}","starred_url":"https://api.github.com/users/DanVanAtta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanVanAtta/subscriptions","organizations_url":"https://api.github.com/users/DanVanAtta/orgs","repos_url":"https://api.github.com/users/DanVanAtta/repos","events_url":"https://api.github.com/users/DanVanAtta/events{/privacy}","received_events_url":"https://api.github.com/users/DanVanAtta/received_events","type":"User","site_admin":false},"repo":{"id":39811826,"name":"triplea","full_name":"DanVanAtta/triplea","owner":{"login":"DanVanAtta","id":12397753,"avatar_url":"https://avatars.githubusercontent.com/u/12397753?v=3","gravatar_id":"","url":"https://api.github.com/users/DanVanAtta","html_url":"https://github.com/DanVanAtta","followers_url":"https://api.github.com/users/DanVanAtta/followers","following_url":"https://api.github.com/users/DanVanAtta/following{/other_user}","gists_url":"https://api.github.com/users/DanVanAtta/gists{/gist_id}","starred_url":"https://api.github.com/users/DanVanAtta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanVanAtta/subscriptions","organizations_url":"https://api.github.com/users/DanVanAtta/orgs","repos_url":"https://api.github.com/users/DanVanAtta/repos","events_url":"https://api.github.com/users/DanVanAtta/events{/privacy}","received_events_url":"https://api.github.com/users/DanVanAtta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DanVanAtta/triplea","description":"TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.","fork":true,"url":"https://api.github.com/repos/DanVanAtta/triplea","forks_url":"https://api.github.com/repos/DanVanAtta/triplea/forks","keys_url":"https://api.github.com/repos/DanVanAtta/triplea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DanVanAtta/triplea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DanVanAtta/triplea/teams","hooks_url":"https://api.github.com/repos/DanVanAtta/triplea/hooks","issue_events_url":"https://api.github.com/repos/DanVanAtta/triplea/issues/events{/number}","events_url":"https://api.github.com/repos/DanVanAtta/triplea/events","assignees_url":"https://api.github.com/repos/DanVanAtta/triplea/assignees{/user}","branches_url":"https://api.github.com/repos/DanVanAtta/triplea/branches{/branch}","tags_url":"https://api.github.com/repos/DanVanAtta/triplea/tags","blobs_url":"https://api.github.com/repos/DanVanAtta/triplea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DanVanAtta/triplea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DanVanAtta/triplea/git/refs{/sha}","trees_url":"https://api.github.com/repos/DanVanAtta/triplea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DanVanAtta/triplea/statuses/{sha}","languages_url":"https://api.github.com/repos/DanVanAtta/triplea/languages","stargazers_url":"https://api.github.com/repos/DanVanAtta/triplea/stargazers","contributors_url":"https://api.github.com/repos/DanVanAtta/triplea/contributors","subscribers_url":"https://api.github.com/repos/DanVanAtta/triplea/subscribers","subscription_url":"https://api.github.com/repos/DanVanAtta/triplea/subscription","commits_url":"https://api.github.com/repos/DanVanAtta/triplea/commits{/sha}","git_commits_url":"https://api.github.com/repos/DanVanAtta/triplea/git/commits{/sha}","comments_url":"https://api.github.com/repos/DanVanAtta/triplea/comments{/number}","issue_comment_url":"https://api.github.com/repos/DanVanAtta/triplea/issues/comments{/number}","contents_url":"https://api.github.com/repos/DanVanAtta/triplea/contents/{+path}","compare_url":"https://api.github.com/repos/DanVanAtta/triplea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DanVanAtta/triplea/merges","archive_url":"https://api.github.com/repos/DanVanAtta/triplea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DanVanAtta/triplea/downloads","issues_url":"https://api.github.com/repos/DanVanAtta/triplea/issues{/number}","pulls_url":"https://api.github.com/repos/DanVanAtta/triplea/pulls{/number}","milestones_url":"https://api.github.com/repos/DanVanAtta/triplea/milestones{/number}","notifications_url":"https://api.github.com/repos/DanVanAtta/triplea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DanVanAtta/triplea/labels{/name}","releases_url":"https://api.github.com/repos/DanVanAtta/triplea/releases{/id}","deployments_url":"https://api.github.com/repos/DanVanAtta/triplea/deployments","created_at":"2015-07-28T03:48:44Z","updated_at":"2016-01-12T03:47:00Z","pushed_at":"2016-02-23T23:52:19Z","git_url":"git://github.com/DanVanAtta/triplea.git","ssh_url":"git@github.com:DanVanAtta/triplea.git","clone_url":"https://github.com/DanVanAtta/triplea.git","svn_url":"https://github.com/DanVanAtta/triplea","homepage":null,"size":686042,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"triplea-game:master","ref":"master","sha":"5fbb65d60c3739b3d373b5842306596b41e7588a","user":{"login":"triplea-game","id":13318615,"avatar_url":"https://avatars.githubusercontent.com/u/13318615?v=3","gravatar_id":"","url":"https://api.github.com/users/triplea-game","html_url":"https://github.com/triplea-game","followers_url":"https://api.github.com/users/triplea-game/followers","following_url":"https://api.github.com/users/triplea-game/following{/other_user}","gists_url":"https://api.github.com/users/triplea-game/gists{/gist_id}","starred_url":"https://api.github.com/users/triplea-game/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplea-game/subscriptions","organizations_url":"https://api.github.com/users/triplea-game/orgs","repos_url":"https://api.github.com/users/triplea-game/repos","events_url":"https://api.github.com/users/triplea-game/events{/privacy}","received_events_url":"https://api.github.com/users/triplea-game/received_events","type":"Organization","site_admin":false},"repo":{"id":39766308,"name":"triplea","full_name":"triplea-game/triplea","owner":{"login":"triplea-game","id":13318615,"avatar_url":"https://avatars.githubusercontent.com/u/13318615?v=3","gravatar_id":"","url":"https://api.github.com/users/triplea-game","html_url":"https://github.com/triplea-game","followers_url":"https://api.github.com/users/triplea-game/followers","following_url":"https://api.github.com/users/triplea-game/following{/other_user}","gists_url":"https://api.github.com/users/triplea-game/gists{/gist_id}","starred_url":"https://api.github.com/users/triplea-game/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplea-game/subscriptions","organizations_url":"https://api.github.com/users/triplea-game/orgs","repos_url":"https://api.github.com/users/triplea-game/repos","events_url":"https://api.github.com/users/triplea-game/events{/privacy}","received_events_url":"https://api.github.com/users/triplea-game/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/triplea-game/triplea","description":"TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.","fork":false,"url":"https://api.github.com/repos/triplea-game/triplea","forks_url":"https://api.github.com/repos/triplea-game/triplea/forks","keys_url":"https://api.github.com/repos/triplea-game/triplea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/triplea-game/triplea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/triplea-game/triplea/teams","hooks_url":"https://api.github.com/repos/triplea-game/triplea/hooks","issue_events_url":"https://api.github.com/repos/triplea-game/triplea/issues/events{/number}","events_url":"https://api.github.com/repos/triplea-game/triplea/events","assignees_url":"https://api.github.com/repos/triplea-game/triplea/assignees{/user}","branches_url":"https://api.github.com/repos/triplea-game/triplea/branches{/branch}","tags_url":"https://api.github.com/repos/triplea-game/triplea/tags","blobs_url":"https://api.github.com/repos/triplea-game/triplea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/triplea-game/triplea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/triplea-game/triplea/git/refs{/sha}","trees_url":"https://api.github.com/repos/triplea-game/triplea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/triplea-game/triplea/statuses/{sha}","languages_url":"https://api.github.com/repos/triplea-game/triplea/languages","stargazers_url":"https://api.github.com/repos/triplea-game/triplea/stargazers","contributors_url":"https://api.github.com/repos/triplea-game/triplea/contributors","subscribers_url":"https://api.github.com/repos/triplea-game/triplea/subscribers","subscription_url":"https://api.github.com/repos/triplea-game/triplea/subscription","commits_url":"https://api.github.com/repos/triplea-game/triplea/commits{/sha}","git_commits_url":"https://api.github.com/repos/triplea-game/triplea/git/commits{/sha}","comments_url":"https://api.github.com/repos/triplea-game/triplea/comments{/number}","issue_comment_url":"https://api.github.com/repos/triplea-game/triplea/issues/comments{/number}","contents_url":"https://api.github.com/repos/triplea-game/triplea/contents/{+path}","compare_url":"https://api.github.com/repos/triplea-game/triplea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/triplea-game/triplea/merges","archive_url":"https://api.github.com/repos/triplea-game/triplea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/triplea-game/triplea/downloads","issues_url":"https://api.github.com/repos/triplea-game/triplea/issues{/number}","pulls_url":"https://api.github.com/repos/triplea-game/triplea/pulls{/number}","milestones_url":"https://api.github.com/repos/triplea-game/triplea/milestones{/number}","notifications_url":"https://api.github.com/repos/triplea-game/triplea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/triplea-game/triplea/labels{/name}","releases_url":"https://api.github.com/repos/triplea-game/triplea/releases{/id}","deployments_url":"https://api.github.com/repos/triplea-game/triplea/deployments","created_at":"2015-07-27T09:32:58Z","updated_at":"2016-02-19T21:12:06Z","pushed_at":"2016-02-23T23:52:27Z","git_url":"git://github.com/triplea-game/triplea.git","ssh_url":"git@github.com:triplea-game/triplea.git","clone_url":"https://github.com/triplea-game/triplea.git","svn_url":"https://github.com/triplea-game/triplea","homepage":null,"size":687431,"stargazers_count":19,"watchers_count":19,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":67,"forks":8,"open_issues":67,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/426"},"html":{"href":"https://github.com/triplea-game/triplea/pull/426"},"issue":{"href":"https://api.github.com/repos/triplea-game/triplea/issues/426"},"comments":{"href":"https://api.github.com/repos/triplea-game/triplea/issues/426/comments"},"review_comments":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/426/comments"},"review_comment":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/426/commits"},"statuses":{"href":"https://api.github.com/repos/triplea-game/triplea/statuses/3cd5473576aa1e8ffaa2b6dff39e86908eb25aa9"}}}}