Sha256: b687151f3976c83e50725630e7ca8610914980d5057eab12ea7c6db01ce2fd1e
Contents?: true
Size: 685 Bytes
Versions: 9
Compression:
Stored size: 685 Bytes
Contents
module FeatureGateCleaner def self.clean(gate_name) matching_string = "(FeatureGate::Manager.gate(\s|\\()[\\\"\\']#{gate_name}[\\\"\\'])|(<%\s*end\s*#\s*#{gate_name}\s*%>)" `grep -r -l -E "#{matching_string}" #{Dir.pwd}/app/views/ | while IFS= read -r file; do grep -v -E "#{matching_string}" "$file" > "$file".cleaned; mv "$file"{.cleaned,}; done` matching_string = "FeatureGate::Manager.gate_page(\s|\\()[\\\"\\']#{gate_name}[\\\"\\']" `grep -r -l -E "#{matching_string}" #{Dir.pwd}/app/controllers/ | while IFS= read -r file; do grep -v -E "#{matching_string}" "$file" > "$file".cleaned; mv "$file"{.cleaned,}; done` puts "#{gate_name} cleaned!" end end
Version data entries
9 entries across 9 versions & 1 rubygems