Sha256: a4acc988ca3c6b1c29e0b5e614ba30517906fac3a2d59900eb338bc9bc0e5a26
Contents?: true
Size: 569 Bytes
Versions: 12
Compression:
Stored size: 569 Bytes
Contents
#! /usr/bin/env ruby # Given an array of domains, removes them from the list # Example usage: script/prune foo.invalid, bar.invalid, foo.bar.invalid require_relative "../lib/gman" require_relative "../lib/gman/domain_list" domains = ARGV domains = domains.clone.map { |d| d.gsub ",", "" } list = File.open("./config/domains.txt").read puts "Starting list: #{Gman::DomainList.current.count} domains" domains.each do |domain| list.gsub! /^#{domain}$\n/, "" end puts "Ending list: #{Gman::DomainList.current.count} domains" File.write "./config/domains.txt", list
Version data entries
12 entries across 12 versions & 1 rubygems