mirror of
https://github.com/github/choosealicense.com
synced 2024-12-22 12:50:24 +01:00
slightly reduce branches apparent to rubocop to satisfy rubocop
This commit is contained in:
parent
40fff59824
commit
2d9e5be8c2
@ -105,7 +105,7 @@ def fsf_approved_licenses
|
|||||||
object = JSON.parse(OpenURI.open_uri(url).read)
|
object = JSON.parse(OpenURI.open_uri(url).read)
|
||||||
licenses = {}
|
licenses = {}
|
||||||
object['licenses'].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')
|
next unless meta.dig('identifiers', 'spdx') && (meta.include? 'tags') && (meta['tags'].include? 'libre')
|
||||||
|
|
||||||
meta['identifiers']['spdx'].each do |identifier|
|
meta['identifiers']['spdx'].each do |identifier|
|
||||||
licenses[identifier.downcase] = meta['name']
|
licenses[identifier.downcase] = meta['name']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user