{"action":"created","comment":{"url":"https://api.github.com/repos/nxus/storage/pulls/comments/116114987","pull_request_review_id":37713953,"id":116114987,"diff_hunk":"@@ -1,15 +1,68 @@\n+/* globals before: false, beforeEach: false, after: false, afterEach: false, describe: false, it: false, expect: false */\n 'use strict';\n \n import Storage from '../'\n import {storage as storageProxy} from '../'\n-import {Waterline, HasModels, BaseModel, GeoModel} from '../'\n+import {Waterline, BaseModel, GeoModel} from '../'\n \n import sinon from 'sinon'\n import {application as app} from 'nxus-core'\n \n import One from './models/One'\n import Two from './models/Two'\n \n+// example from RFC 7946, section 1.5 (deconstructed and reassembled)\n+const geoJSONPoint = { 'type': 'Point', 'coordinates': [102.0, 0.5] },","path":"src/test/index.js","position":16,"original_position":16,"commit_id":"9ead88c0a63e4441f30e22ca0a5f6caaad72db99","original_commit_id":"9ead88c0a63e4441f30e22ca0a5f6caaad72db99","user":{"login":"davidkellerman","id":114854,"avatar_url":"https://avatars3.githubusercontent.com/u/114854?v=3","gravatar_id":"","url":"https://api.github.com/users/davidkellerman","html_url":"https://github.com/davidkellerman","followers_url":"https://api.github.com/users/davidkellerman/followers","following_url":"https://api.github.com/users/davidkellerman/following{/other_user}","gists_url":"https://api.github.com/users/davidkellerman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkellerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkellerman/subscriptions","organizations_url":"https://api.github.com/users/davidkellerman/orgs","repos_url":"https://api.github.com/users/davidkellerman/repos","events_url":"https://api.github.com/users/davidkellerman/events{/privacy}","received_events_url":"https://api.github.com/users/davidkellerman/received_events","type":"User","site_admin":false},"body":"That was my bias back in the C/C++ and Java days. Now, I'm not so sure the distinction is worth highlighting; so have tended towards declaring as `const` where appropriate, but using camel-case everywhere. ","created_at":"2017-05-11T22:14:52Z","updated_at":"2017-05-11T22:14:52Z","html_url":"https://github.com/nxus/storage/pull/32#discussion_r116114987","pull_request_url":"https://api.github.com/repos/nxus/storage/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/nxus/storage/pulls/comments/116114987"},"html":{"href":"https://github.com/nxus/storage/pull/32#discussion_r116114987"},"pull_request":{"href":"https://api.github.com/repos/nxus/storage/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/nxus/storage/pulls/32","id":119307278,"html_url":"https://github.com/nxus/storage/pull/32","diff_url":"https://github.com/nxus/storage/pull/32.diff","patch_url":"https://github.com/nxus/storage/pull/32.patch","issue_url":"https://api.github.com/repos/nxus/storage/issues/32","number":32,"state":"open","locked":false,"title":"Refactored GeoModel.","user":{"login":"davidkellerman","id":114854,"avatar_url":"https://avatars3.githubusercontent.com/u/114854?v=3","gravatar_id":"","url":"https://api.github.com/users/davidkellerman","html_url":"https://github.com/davidkellerman","followers_url":"https://api.github.com/users/davidkellerman/followers","following_url":"https://api.github.com/users/davidkellerman/following{/other_user}","gists_url":"https://api.github.com/users/davidkellerman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkellerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkellerman/subscriptions","organizations_url":"https://api.github.com/users/davidkellerman/orgs","repos_url":"https://api.github.com/users/davidkellerman/repos","events_url":"https://api.github.com/users/davidkellerman/events{/privacy}","received_events_url":"https://api.github.com/users/davidkellerman/received_events","type":"User","site_admin":false},"body":"Changed code in GeoModel to be more \"understanding\" of GeoJSON structures. It should now produce reasonable results for any valid GeoJSON data.\r\n\r\nChanged the `extractGeometryFeatures()` method to set the geometry feature field to a valid GeoJSON object, which is what is needed for the MongoDB `2dsphere` index.\r\n\r\nRemoved `geometrySingle` property from GeoModel. It wasn't used, and didn't seem to serve a useful purpose. Same for the `extractGeometryFeatures` property.\r\n\r\nRemoved the `query` parameter from the `findWithin()` and `findIntersects()` methods. It wasn't used, and the code implementing it wasn't correct anyway.\r\n\r\nAdded `getGeometry()` and `getCentroid()` methods to extract geometry data from the GeoJSON geographic field of a GeoModel instance. Their intended use is for extracting coordinate data that can be used for geo queries. The `getGeometry()` method extracts GeoJSON geometry objects. The `getCentroid()` method calculates the centroid of the geographic field.\r\n\r\nDocumented the code.\r\n\r\nAdded tests to check functionality of GeoModel. Wired it up to a `sails-mongo` adapter so it could actually exercise MongoDB geo functionality.","created_at":"2017-05-06T16:34:31Z","updated_at":"2017-05-11T22:14:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1b3ceb7df8ee4f142037727aa96422de18a6ff6","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/nxus/storage/pulls/32/commits","review_comments_url":"https://api.github.com/repos/nxus/storage/pulls/32/comments","review_comment_url":"https://api.github.com/repos/nxus/storage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nxus/storage/issues/32/comments","statuses_url":"https://api.github.com/repos/nxus/storage/statuses/9ead88c0a63e4441f30e22ca0a5f6caaad72db99","head":{"label":"nxus:feature/geomodel-geometry","ref":"feature/geomodel-geometry","sha":"9ead88c0a63e4441f30e22ca0a5f6caaad72db99","user":{"login":"nxus","id":13356498,"avatar_url":"https://avatars0.githubusercontent.com/u/13356498?v=3","gravatar_id":"","url":"https://api.github.com/users/nxus","html_url":"https://github.com/nxus","followers_url":"https://api.github.com/users/nxus/followers","following_url":"https://api.github.com/users/nxus/following{/other_user}","gists_url":"https://api.github.com/users/nxus/gists{/gist_id}","starred_url":"https://api.github.com/users/nxus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nxus/subscriptions","organizations_url":"https://api.github.com/users/nxus/orgs","repos_url":"https://api.github.com/users/nxus/repos","events_url":"https://api.github.com/users/nxus/events{/privacy}","received_events_url":"https://api.github.com/users/nxus/received_events","type":"Organization","site_admin":false},"repo":{"id":47646833,"name":"storage","full_name":"nxus/storage","owner":{"login":"nxus","id":13356498,"avatar_url":"https://avatars0.githubusercontent.com/u/13356498?v=3","gravatar_id":"","url":"https://api.github.com/users/nxus","html_url":"https://github.com/nxus","followers_url":"https://api.github.com/users/nxus/followers","following_url":"https://api.github.com/users/nxus/following{/other_user}","gists_url":"https://api.github.com/users/nxus/gists{/gist_id}","starred_url":"https://api.github.com/users/nxus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nxus/subscriptions","organizations_url":"https://api.github.com/users/nxus/orgs","repos_url":"https://api.github.com/users/nxus/repos","events_url":"https://api.github.com/users/nxus/events{/privacy}","received_events_url":"https://api.github.com/users/nxus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nxus/storage","description":"Storage framework for Nxus applications","fork":false,"url":"https://api.github.com/repos/nxus/storage","forks_url":"https://api.github.com/repos/nxus/storage/forks","keys_url":"https://api.github.com/repos/nxus/storage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nxus/storage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nxus/storage/teams","hooks_url":"https://api.github.com/repos/nxus/storage/hooks","issue_events_url":"https://api.github.com/repos/nxus/storage/issues/events{/number}","events_url":"https://api.github.com/repos/nxus/storage/events","assignees_url":"https://api.github.com/repos/nxus/storage/assignees{/user}","branches_url":"https://api.github.com/repos/nxus/storage/branches{/branch}","tags_url":"https://api.github.com/repos/nxus/storage/tags","blobs_url":"https://api.github.com/repos/nxus/storage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nxus/storage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nxus/storage/git/refs{/sha}","trees_url":"https://api.github.com/repos/nxus/storage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nxus/storage/statuses/{sha}","languages_url":"https://api.github.com/repos/nxus/storage/languages","stargazers_url":"https://api.github.com/repos/nxus/storage/stargazers","contributors_url":"https://api.github.com/repos/nxus/storage/contributors","subscribers_url":"https://api.github.com/repos/nxus/storage/subscribers","subscription_url":"https://api.github.com/repos/nxus/storage/subscription","commits_url":"https://api.github.com/repos/nxus/storage/commits{/sha}","git_commits_url":"https://api.github.com/repos/nxus/storage/git/commits{/sha}","comments_url":"https://api.github.com/repos/nxus/storage/comments{/number}","issue_comment_url":"https://api.github.com/repos/nxus/storage/issues/comments{/number}","contents_url":"https://api.github.com/repos/nxus/storage/contents/{+path}","compare_url":"https://api.github.com/repos/nxus/storage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nxus/storage/merges","archive_url":"https://api.github.com/repos/nxus/storage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nxus/storage/downloads","issues_url":"https://api.github.com/repos/nxus/storage/issues{/number}","pulls_url":"https://api.github.com/repos/nxus/storage/pulls{/number}","milestones_url":"https://api.github.com/repos/nxus/storage/milestones{/number}","notifications_url":"https://api.github.com/repos/nxus/storage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nxus/storage/labels{/name}","releases_url":"https://api.github.com/repos/nxus/storage/releases{/id}","deployments_url":"https://api.github.com/repos/nxus/storage/deployments","created_at":"2015-12-08T20:10:31Z","updated_at":"2016-01-27T16:40:53Z","pushed_at":"2017-05-08T22:54:07Z","git_url":"git://github.com/nxus/storage.git","ssh_url":"git@github.com:nxus/storage.git","clone_url":"https://github.com/nxus/storage.git","svn_url":"https://github.com/nxus/storage","homepage":null,"size":105,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"nxus:master","ref":"master","sha":"458fc42626187cfeb2a74850cb2a8f86ec525c2f","user":{"login":"nxus","id":13356498,"avatar_url":"https://avatars0.githubusercontent.com/u/13356498?v=3","gravatar_id":"","url":"https://api.github.com/users/nxus","html_url":"https://github.com/nxus","followers_url":"https://api.github.com/users/nxus/followers","following_url":"https://api.github.com/users/nxus/following{/other_user}","gists_url":"https://api.github.com/users/nxus/gists{/gist_id}","starred_url":"https://api.github.com/users/nxus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nxus/subscriptions","organizations_url":"https://api.github.com/users/nxus/orgs","repos_url":"https://api.github.com/users/nxus/repos","events_url":"https://api.github.com/users/nxus/events{/privacy}","received_events_url":"https://api.github.com/users/nxus/received_events","type":"Organization","site_admin":false},"repo":{"id":47646833,"name":"storage","full_name":"nxus/storage","owner":{"login":"nxus","id":13356498,"avatar_url":"https://avatars0.githubusercontent.com/u/13356498?v=3","gravatar_id":"","url":"https://api.github.com/users/nxus","html_url":"https://github.com/nxus","followers_url":"https://api.github.com/users/nxus/followers","following_url":"https://api.github.com/users/nxus/following{/other_user}","gists_url":"https://api.github.com/users/nxus/gists{/gist_id}","starred_url":"https://api.github.com/users/nxus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nxus/subscriptions","organizations_url":"https://api.github.com/users/nxus/orgs","repos_url":"https://api.github.com/users/nxus/repos","events_url":"https://api.github.com/users/nxus/events{/privacy}","received_events_url":"https://api.github.com/users/nxus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nxus/storage","description":"Storage framework for Nxus applications","fork":false,"url":"https://api.github.com/repos/nxus/storage","forks_url":"https://api.github.com/repos/nxus/storage/forks","keys_url":"https://api.github.com/repos/nxus/storage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nxus/storage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nxus/storage/teams","hooks_url":"https://api.github.com/repos/nxus/storage/hooks","issue_events_url":"https://api.github.com/repos/nxus/storage/issues/events{/number}","events_url":"https://api.github.com/repos/nxus/storage/events","assignees_url":"https://api.github.com/repos/nxus/storage/assignees{/user}","branches_url":"https://api.github.com/repos/nxus/storage/branches{/branch}","tags_url":"https://api.github.com/repos/nxus/storage/tags","blobs_url":"https://api.github.com/repos/nxus/storage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nxus/storage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nxus/storage/git/refs{/sha}","trees_url":"https://api.github.com/repos/nxus/storage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nxus/storage/statuses/{sha}","languages_url":"https://api.github.com/repos/nxus/storage/languages","stargazers_url":"https://api.github.com/repos/nxus/storage/stargazers","contributors_url":"https://api.github.com/repos/nxus/storage/contributors","subscribers_url":"https://api.github.com/repos/nxus/storage/subscribers","subscription_url":"https://api.github.com/repos/nxus/storage/subscription","commits_url":"https://api.github.com/repos/nxus/storage/commits{/sha}","git_commits_url":"https://api.github.com/repos/nxus/storage/git/commits{/sha}","comments_url":"https://api.github.com/repos/nxus/storage/comments{/number}","issue_comment_url":"https://api.github.com/repos/nxus/storage/issues/comments{/number}","contents_url":"https://api.github.com/repos/nxus/storage/contents/{+path}","compare_url":"https://api.github.com/repos/nxus/storage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nxus/storage/merges","archive_url":"https://api.github.com/repos/nxus/storage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nxus/storage/downloads","issues_url":"https://api.github.com/repos/nxus/storage/issues{/number}","pulls_url":"https://api.github.com/repos/nxus/storage/pulls{/number}","milestones_url":"https://api.github.com/repos/nxus/storage/milestones{/number}","notifications_url":"https://api.github.com/repos/nxus/storage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nxus/storage/labels{/name}","releases_url":"https://api.github.com/repos/nxus/storage/releases{/id}","deployments_url":"https://api.github.com/repos/nxus/storage/deployments","created_at":"2015-12-08T20:10:31Z","updated_at":"2016-01-27T16:40:53Z","pushed_at":"2017-05-08T22:54:07Z","git_url":"git://github.com/nxus/storage.git","ssh_url":"git@github.com:nxus/storage.git","clone_url":"https://github.com/nxus/storage.git","svn_url":"https://github.com/nxus/storage","homepage":null,"size":105,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nxus/storage/pulls/32"},"html":{"href":"https://github.com/nxus/storage/pull/32"},"issue":{"href":"https://api.github.com/repos/nxus/storage/issues/32"},"comments":{"href":"https://api.github.com/repos/nxus/storage/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/nxus/storage/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/nxus/storage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nxus/storage/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/nxus/storage/statuses/9ead88c0a63e4441f30e22ca0a5f6caaad72db99"}}}}
{"actor":{"display_login":"davidkellerman"}}