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