From 2d9e5be8c236cddd3399e6034932b019a5e77ef3 Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Thu, 23 Jul 2020 12:28:53 -0700 Subject: [PATCH] slightly reduce branches apparent to rubocop to satisfy rubocop --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 192d00e..d66c491 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -105,7 +105,7 @@ def fsf_approved_licenses object = JSON.parse(OpenURI.open_uri(url).read) licenses = {} 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| licenses[identifier.downcase] = meta['name']