Sha256: e8a930f9d55d930d3bf530ade8cf7237fb42d01a5b28f5067f41b4182590a4fe

Contents?: true

Size: 448 Bytes

Versions: 12

Compression:

Stored size: 448 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

domains = ARGV
domains = domains.clone.map { |d| d.gsub ",", "" }

list = File.open("./config/domains.txt").read
puts "Starting list: #{list.size} lines"

domains.each do |domain|
  list.gsub! /^#{domain}$\n/, ""
end

puts "Ending list: #{list.size} lines"

File.write "./config/domains.txt", list

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gman-4.6.5 script/prune
gman-4.6.4 script/prune
gman-4.6.3 script/prune
gman-4.6.2 script/prune
gman-4.6.1 script/prune
gman-4.6.0 script/prune
gman-4.5.1 script/prune
gman-4.5.0 script/prune
gman-4.4.3 script/prune
gman-4.4.2 script/prune
gman-4.4.1 script/prune
gman-4.4.0 script/prune