Skip to content

Commit

Permalink
Added Package author attributes #81
Browse files Browse the repository at this point in the history
* Added type, email, and url
* Updated tests

Signed-off-by: Jillian Daguil <jdaguil@nexb.com>
  • Loading branch information
jdaguil committed May 20, 2017
1 parent 22b2c6f commit 3dbfb86
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
6 changes: 6 additions & 0 deletions assets/js/aboutCodeDB.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,10 @@ class AboutCodeDB {
packages_summary: AboutCodeDB.jsonDataType( "packages_summary"),
packages_description: AboutCodeDB.jsonDataType( "packages_description"),
packages_payload_type: AboutCodeDB.jsonDataType( "packages_payload_type"),
packages_authors_type: AboutCodeDB.jsonDataType( "packages_authors_type"),
packages_authors_name: AboutCodeDB.jsonDataType( "packages_authors_name"),
packages_authors_email: AboutCodeDB.jsonDataType( "packages_authors_email"),
packages_authors_url: AboutCodeDB.jsonDataType( "packages_authors_url"),
packages_maintainers: AboutCodeDB.jsonDataType( "packages_maintainers"),
packages_contributors: AboutCodeDB.jsonDataType( "packages_contributors"),
packages_owners: AboutCodeDB.jsonDataType( "packages_owners"),
Expand Down Expand Up @@ -505,7 +508,10 @@ class AboutCodeDB {
packages_summary: AboutCodeDB.getValues(file.packages, "summary"),
packages_description: AboutCodeDB.getValues(file.packages, "description"),
packages_payload_type: AboutCodeDB.getValues(file.packages, "payload_type"),
packages_authors_type: AboutCodeDB.getNestedValues(file.packages, "authors", "type"),
packages_authors_name: AboutCodeDB.getNestedValues(file.packages, "authors", "name"),
packages_authors_email: AboutCodeDB.getNestedValues(file.packages, "authors", "email"),
packages_authors_url: AboutCodeDB.getNestedValues(file.packages, "authors", "url"),
packages_maintainers: AboutCodeDB.getValues(file.packages, "maintainers"),
packages_contributors: AboutCodeDB.getValues(file.packages, "contributors"),
packages_owners: AboutCodeDB.getValues(file.packages, "owners"),
Expand Down
5 changes: 4 additions & 1 deletion test/data/flattened-scancode-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@
"packages_summary": [ [] ],
"packages_description": [ [] ],
"packages_payload_type": [ [] ],
"packages_authors_name": [],
"packages_authors_name": ["jQuery Foundation and other contributors"],
"packages_authors_type": ["person"],
"packages_authors_email": [[]],
"packages_authors_url": ["https://github.com/jquery/jquery/blob/3.1.0/AUTHORS.txt"],
"packages_maintainers": [ [] ],
"packages_contributors": [ [] ],
"packages_owners": [ [] ],
Expand Down
9 changes: 8 additions & 1 deletion test/data/scancode-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,14 @@
"summary": null,
"description": null,
"payload_type": null,
"authors": [],
"authors": [
{
"type": "person",
"name": "jQuery Foundation and other contributors",
"email": null,
"url": "https://github.com/jquery/jquery/blob/3.1.0/AUTHORS.txt"
}
],
"maintainers": [],
"contributors": [],
"owners": [],
Expand Down

0 comments on commit 3dbfb86

Please sign in to comment.