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

Version Path
gman-5.0.9 script/prune
gman-5.0.8 script/prune
gman-5.0.7 script/prune
gman-5.0.6 script/prune
gman-5.0.5 script/prune
gman-5.0.4 script/prune
gman-5.0.3 script/prune
gman-5.0.2 script/prune
gman-5.0.1 script/prune
gman-5.0.0 script/prune
gman-4.7.1 script/prune
gman-4.7.0 script/prune