Unverified Commit b8d82602 authored by Michael Loßin's avatar Michael Loßin Committed by GitHub
Browse files

Ignore exclusions for regions.json (#6453)

* Ignore exclusions for regions.json

* Fix rubocop issue
parent ec1f8f4c
......@@ -22,7 +22,7 @@ Dir.glob('entries/*/*.json') do |file|
entry['tfa'] = website['tfa'].map { |e| rplc_ptrn.keys.include?(e) ? rplc_ptrn[e] : e } unless website['tfa'].nil?
website['contact']&.each { |a, b| a.eql?('email') ? entry['email_address'] = b : entry[a] = b }
website['regions']&.each { |region| regions[region] = 1 + regions[region].to_i }
website['regions']&.each { |region| regions[region] = 1 + regions[region].to_i unless region[0] == '-' }
all[category].nil? ? all[category] = { name => entry } : all[category][name] = entry # Initialize the object
end
......
......@@ -12,6 +12,8 @@ Dir.glob('entries/*/*.json') { |file| all[JSON.parse(File.read(file)).keys[0]] =
all.sort.to_h.each do |k, v|
v['tfa']&.each { |method| (tfa[method].nil? ? tfa[method] = { k => v } : tfa[method][k] = v) }
v['regions']&.each do |region|
next if region[0] == '-'
regions[region] = {} unless regions.key? region
regions[region]['count'] = 1 + regions[region]['count'].to_i
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment