{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/addons-validator/pulls/comments/46697366","id":46697366,"diff_hunk":"@@ -105,6 +109,40 @@ export default class InstallRdfParser {\n       this._getTopLevelNodeByTag('em:bootstrap')) === 'true';\n   }\n \n+  _getApplication() {\n+    var targetApplications = this._getTopLevelNodesByTag(\n+      'em:targetApplication');\n+    var applications = [];\n+\n+    for (let targetApplication of targetApplications) {\n+      let application = {};\n+      let descriptionNodes = Array.prototype.slice.call(\n+          targetApplication.childNodes)\n+          .filter((node) => node.nodeName === 'Description');\n+\n+      if (descriptionNodes.length !== 1) {\n+        throw new Error(singleLineString`<em:targetApplication> node should only\n+          have a single descendant <Description>`);\n+      }\n+\n+      for (var i in descriptionNodes[0].childNodes) {\n+        let childNode = descriptionNodes[0].childNodes[i];\n+        if (TARGET_APPLICATION_FIELDS.indexOf(childNode.localName) !== -1) {\n+          application[childNode.localName] = this._getNodeValue(childNode);\n+        }\n+      }\n+\n+      if (application.id && application.maxVersion && application.minVersion) {\n+        applications.push(application);\n+      } else {\n+        throw new Error(singleLineString`targetApplication must contain an id,","path":"src/parsers/installrdf.js","position":48,"original_position":48,"commit_id":"2a6e10c8d56f8c7dce79b45c1e5b76699950982f","original_commit_id":"2a6e10c8d56f8c7dce79b45c1e5b76699950982f","user":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"body":"Shouldn't this be an error message pushed onto the collector?\r\n\r\nAlso I think doing something a little more granular will help developers e.g. flag each field that's invalid separately so that it's clearer when just one thing is broken.","created_at":"2015-12-04T16:04:30Z","updated_at":"2015-12-04T16:04:30Z","html_url":"https://github.com/mozilla/addons-validator/pull/388#discussion_r46697366","pull_request_url":"https://api.github.com/repos/mozilla/addons-validator/pulls/388","_links":{"self":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/comments/46697366"},"html":{"href":"https://github.com/mozilla/addons-validator/pull/388#discussion_r46697366"},"pull_request":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/388"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/addons-validator/pulls/388","id":52678501,"html_url":"https://github.com/mozilla/addons-validator/pull/388","diff_url":"https://github.com/mozilla/addons-validator/pull/388.diff","patch_url":"https://github.com/mozilla/addons-validator/pull/388.patch","issue_url":"https://api.github.com/repos/mozilla/addons-validator/issues/388","number":388,"state":"open","locked":false,"title":"Parser now retrieves application metadata","user":{"login":"Nolski","id":2600677,"avatar_url":"https://avatars.githubusercontent.com/u/2600677?v=3","gravatar_id":"","url":"https://api.github.com/users/Nolski","html_url":"https://github.com/Nolski","followers_url":"https://api.github.com/users/Nolski/followers","following_url":"https://api.github.com/users/Nolski/following{/other_user}","gists_url":"https://api.github.com/users/Nolski/gists{/gist_id}","starred_url":"https://api.github.com/users/Nolski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nolski/subscriptions","organizations_url":"https://api.github.com/users/Nolski/orgs","repos_url":"https://api.github.com/users/Nolski/repos","events_url":"https://api.github.com/users/Nolski/events{/privacy}","received_events_url":"https://api.github.com/users/Nolski/received_events","type":"User","site_admin":false},"body":"Resolves #296","created_at":"2015-12-04T14:57:43Z","updated_at":"2015-12-04T16:04:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"400f17e7c88a18c5763276b2607cac68abf93e3d","assignee":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/addons-validator/pulls/388/commits","review_comments_url":"https://api.github.com/repos/mozilla/addons-validator/pulls/388/comments","review_comment_url":"https://api.github.com/repos/mozilla/addons-validator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/addons-validator/issues/388/comments","statuses_url":"https://api.github.com/repos/mozilla/addons-validator/statuses/2a6e10c8d56f8c7dce79b45c1e5b76699950982f","head":{"label":"Nolski:application-metadata","ref":"application-metadata","sha":"2a6e10c8d56f8c7dce79b45c1e5b76699950982f","user":{"login":"Nolski","id":2600677,"avatar_url":"https://avatars.githubusercontent.com/u/2600677?v=3","gravatar_id":"","url":"https://api.github.com/users/Nolski","html_url":"https://github.com/Nolski","followers_url":"https://api.github.com/users/Nolski/followers","following_url":"https://api.github.com/users/Nolski/following{/other_user}","gists_url":"https://api.github.com/users/Nolski/gists{/gist_id}","starred_url":"https://api.github.com/users/Nolski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nolski/subscriptions","organizations_url":"https://api.github.com/users/Nolski/orgs","repos_url":"https://api.github.com/users/Nolski/repos","events_url":"https://api.github.com/users/Nolski/events{/privacy}","received_events_url":"https://api.github.com/users/Nolski/received_events","type":"User","site_admin":false},"repo":{"id":44769156,"name":"addons-validator","full_name":"Nolski/addons-validator","owner":{"login":"Nolski","id":2600677,"avatar_url":"https://avatars.githubusercontent.com/u/2600677?v=3","gravatar_id":"","url":"https://api.github.com/users/Nolski","html_url":"https://github.com/Nolski","followers_url":"https://api.github.com/users/Nolski/followers","following_url":"https://api.github.com/users/Nolski/following{/other_user}","gists_url":"https://api.github.com/users/Nolski/gists{/gist_id}","starred_url":"https://api.github.com/users/Nolski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nolski/subscriptions","organizations_url":"https://api.github.com/users/Nolski/orgs","repos_url":"https://api.github.com/users/Nolski/repos","events_url":"https://api.github.com/users/Nolski/events{/privacy}","received_events_url":"https://api.github.com/users/Nolski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nolski/addons-validator","description":"The new Firefox Add-ons validator, written in ES6/JavaScript.","fork":true,"url":"https://api.github.com/repos/Nolski/addons-validator","forks_url":"https://api.github.com/repos/Nolski/addons-validator/forks","keys_url":"https://api.github.com/repos/Nolski/addons-validator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nolski/addons-validator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nolski/addons-validator/teams","hooks_url":"https://api.github.com/repos/Nolski/addons-validator/hooks","issue_events_url":"https://api.github.com/repos/Nolski/addons-validator/issues/events{/number}","events_url":"https://api.github.com/repos/Nolski/addons-validator/events","assignees_url":"https://api.github.com/repos/Nolski/addons-validator/assignees{/user}","branches_url":"https://api.github.com/repos/Nolski/addons-validator/branches{/branch}","tags_url":"https://api.github.com/repos/Nolski/addons-validator/tags","blobs_url":"https://api.github.com/repos/Nolski/addons-validator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nolski/addons-validator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nolski/addons-validator/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nolski/addons-validator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nolski/addons-validator/statuses/{sha}","languages_url":"https://api.github.com/repos/Nolski/addons-validator/languages","stargazers_url":"https://api.github.com/repos/Nolski/addons-validator/stargazers","contributors_url":"https://api.github.com/repos/Nolski/addons-validator/contributors","subscribers_url":"https://api.github.com/repos/Nolski/addons-validator/subscribers","subscription_url":"https://api.github.com/repos/Nolski/addons-validator/subscription","commits_url":"https://api.github.com/repos/Nolski/addons-validator/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nolski/addons-validator/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nolski/addons-validator/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nolski/addons-validator/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nolski/addons-validator/contents/{+path}","compare_url":"https://api.github.com/repos/Nolski/addons-validator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nolski/addons-validator/merges","archive_url":"https://api.github.com/repos/Nolski/addons-validator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nolski/addons-validator/downloads","issues_url":"https://api.github.com/repos/Nolski/addons-validator/issues{/number}","pulls_url":"https://api.github.com/repos/Nolski/addons-validator/pulls{/number}","milestones_url":"https://api.github.com/repos/Nolski/addons-validator/milestones{/number}","notifications_url":"https://api.github.com/repos/Nolski/addons-validator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nolski/addons-validator/labels{/name}","releases_url":"https://api.github.com/repos/Nolski/addons-validator/releases{/id}","created_at":"2015-10-22T19:44:20Z","updated_at":"2015-10-22T19:44:21Z","pushed_at":"2015-12-04T14:57:18Z","git_url":"git://github.com/Nolski/addons-validator.git","ssh_url":"git@github.com:Nolski/addons-validator.git","clone_url":"https://github.com/Nolski/addons-validator.git","svn_url":"https://github.com/Nolski/addons-validator","homepage":"","size":633,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"cdfb093cb67317520b86f37b9b63e12a04fa2add","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":42436885,"name":"addons-validator","full_name":"mozilla/addons-validator","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/addons-validator","description":"The new Firefox Add-ons validator, written in ES6/JavaScript.","fork":false,"url":"https://api.github.com/repos/mozilla/addons-validator","forks_url":"https://api.github.com/repos/mozilla/addons-validator/forks","keys_url":"https://api.github.com/repos/mozilla/addons-validator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/addons-validator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/addons-validator/teams","hooks_url":"https://api.github.com/repos/mozilla/addons-validator/hooks","issue_events_url":"https://api.github.com/repos/mozilla/addons-validator/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/addons-validator/events","assignees_url":"https://api.github.com/repos/mozilla/addons-validator/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/addons-validator/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/addons-validator/tags","blobs_url":"https://api.github.com/repos/mozilla/addons-validator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/addons-validator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/addons-validator/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/addons-validator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/addons-validator/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/addons-validator/languages","stargazers_url":"https://api.github.com/repos/mozilla/addons-validator/stargazers","contributors_url":"https://api.github.com/repos/mozilla/addons-validator/contributors","subscribers_url":"https://api.github.com/repos/mozilla/addons-validator/subscribers","subscription_url":"https://api.github.com/repos/mozilla/addons-validator/subscription","commits_url":"https://api.github.com/repos/mozilla/addons-validator/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/addons-validator/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/addons-validator/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/addons-validator/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/addons-validator/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/addons-validator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/addons-validator/merges","archive_url":"https://api.github.com/repos/mozilla/addons-validator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/addons-validator/downloads","issues_url":"https://api.github.com/repos/mozilla/addons-validator/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/addons-validator/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/addons-validator/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/addons-validator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/addons-validator/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/addons-validator/releases{/id}","created_at":"2015-09-14T08:34:44Z","updated_at":"2015-12-02T00:13:40Z","pushed_at":"2015-12-04T14:57:43Z","git_url":"git://github.com/mozilla/addons-validator.git","ssh_url":"git@github.com:mozilla/addons-validator.git","clone_url":"https://github.com/mozilla/addons-validator.git","svn_url":"https://github.com/mozilla/addons-validator","homepage":"","size":706,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":65,"forks":7,"open_issues":65,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/388"},"html":{"href":"https://github.com/mozilla/addons-validator/pull/388"},"issue":{"href":"https://api.github.com/repos/mozilla/addons-validator/issues/388"},"comments":{"href":"https://api.github.com/repos/mozilla/addons-validator/issues/388/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/388/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/388/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/addons-validator/statuses/2a6e10c8d56f8c7dce79b45c1e5b76699950982f"}}}}