mirror of
https://github.com/github/choosealicense.com
synced 2024-11-05 11:18:50 +01:00
Merge pull request #579 from wking/update-fsf-api-structure
spec_helper: Adjust to new 'licenses' key in the FSF API
This commit is contained in:
commit
1c8e3d1439
@ -104,7 +104,7 @@ def fsf_approved_licenses
|
||||
url = 'https://wking.github.io/fsf-api/licenses-full.json'
|
||||
object = JSON.parse(OpenURI.open_uri(url).read)
|
||||
licenses = {}
|
||||
object.each_value do |meta|
|
||||
object['licenses'].each_value do |meta|
|
||||
next unless (meta.include? 'identifiers') && (meta['identifiers'].include? 'spdx') && (meta.include? 'tags') && (meta['tags'].include? 'libre')
|
||||
meta['identifiers']['spdx'].each do |identifier|
|
||||
licenses[identifier.downcase] = meta['name']
|
||||
|
Loading…
Reference in New Issue
Block a user