Sha256: 437d33a2145ca5dc19d9a531c257897b4231e49d7620500e2fbac2d828078986

Contents?: true

Size: 526 Bytes

Versions: 4

Compression:

Stored size: 526 Bytes

Contents

#! /usr/bin/env ruby
# frozen_string_literal: true

require 'yaml'
require 'open-uri'
require './lib/gman'
require './lib/gman/importer'

current = Gman::DomainList.current

puts 'Checking for duplicate domains in the domain list...'
puts "Current list contains #{current.count} domains..."

dupe = current.count - current.domains.uniq.count
puts "Found #{dupe} duplicate domains"
exit 0 if dupe.zero?

dupes = current.domains.select { |domain| current.domains.count(domain) > 1 }

puts 'Duplicate domains:'
puts dupes
exit 1

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gman-7.0.6 script/dedupe
gman-7.0.5 script/dedupe
gman-7.0.4 script/dedupe
gman-7.0.3 script/dedupe