{"action":"created","issue":{"url":"https://api.github.com/repos/triplea-game/triplea/issues/103","labels_url":"https://api.github.com/repos/triplea-game/triplea/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/triplea-game/triplea/issues/103/comments","events_url":"https://api.github.com/repos/triplea-game/triplea/issues/103/events","html_url":"https://github.com/triplea-game/triplea/pull/103","id":102261367,"number":103,"title":"Build fix - Backwards compatible fix and update of how test map game data is found.","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},"labels":[],"state":"open","locked":false,"assignee":{"login":"veqryn","id":1897829,"avatar_url":"https://avatars.githubusercontent.com/u/1897829?v=3","gravatar_id":"","url":"https://api.github.com/users/veqryn","html_url":"https://github.com/veqryn","followers_url":"https://api.github.com/users/veqryn/followers","following_url":"https://api.github.com/users/veqryn/following{/other_user}","gists_url":"https://api.github.com/users/veqryn/gists{/gist_id}","starred_url":"https://api.github.com/users/veqryn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veqryn/subscriptions","organizations_url":"https://api.github.com/users/veqryn/orgs","repos_url":"https://api.github.com/users/veqryn/repos","events_url":"https://api.github.com/users/veqryn/events{/privacy}","received_events_url":"https://api.github.com/users/veqryn/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2015-08-20T23:42:50Z","updated_at":"2015-08-26T03:50:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/triplea-game/triplea/pulls/103","html_url":"https://github.com/triplea-game/triplea/pull/103","diff_url":"https://github.com/triplea-game/triplea/pull/103.diff","patch_url":"https://github.com/triplea-game/triplea/pull/103.patch"},"body":"Secondly, make a copy paste of the big world map data in \"maps\" and move it to \"test_data\", then update the two tests that used the \"maps\" version rather than a test version.\r\n\r\nThe code for finding maps can take a lot of branches, depends on if you run from IDE, ant, gradle, or which packaged version of the game. In addition the test and prod search paths for map data are mixed together. In the test case we find we are running from a class file and assume we are running from ant. In that case all we need to do is ascend up enough directories to get out of the packages and then plus a fixed amount. For gradle this is not enough, the compiled classes are nested a bit deeper.\r\n\r\nTo fix this, instead of having GameRunner2 tell us what the root folder is, and then from there try to find parent folders with a map file in it, we instead ask GameRunner2 to find us a file and give it a list of potential parent folders. The method that looks at both test and prod paths has been deprecated so we can migrate away from it (so eventually the list woudl perhaps become a scalar). Secondly, GameRunner2 now has different behavior in the finding files in the case of finding relative to a class file (as opposed to relative to a jar). Instead of going up enough directories to match the packages plus one, instead we are given a folder and file, and we keep ascending directories until we find that folder containing the file. This works in both the ant and gradle cases.\r\n\r\nLastly:\r\n-  some extract method was done on GameRunner2, so there is some additional refactoring that was done to clean up the methods so that this change would be clear and make sense. So one can expect some extracted methods in the diff.\r\n- Remove test restriction that chooser model needs to find at least one file. In unit test case maps from a users home folder will get picked up, for travis this is not the case.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/triplea-game/triplea/103)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/triplea-game/triplea/issues/comments/134812502","html_url":"https://github.com/triplea-game/triplea/pull/103#issuecomment-134812502","issue_url":"https://api.github.com/repos/triplea-game/triplea/issues/103","id":134812502,"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},"created_at":"2015-08-26T03:50:13Z","updated_at":"2015-08-26T03:50:13Z","body":"The refactoring and functional changes are a bit coupled in this PR. To some extent I do not disagree, to another, until the code was re-worked ab it, the needed change was not obvious, and also I don't think the correctness of the change would be nearly as obvious. Since another PR may or may not be accepted, and would have to deal with merge conflicts, it was not worth a second PR, particularly when the light refactor made this change clean.\r\n\r\nFYI I use linux primarily and can also test windows. Occasionally depending on the day of the week I can test on a mac as well. "}}