Class: GrepFu::FindBuilder
- Inherits:
-
Object
- Object
- GrepFu::FindBuilder
- Defined in:
- lib/grep-fu/find_builder.rb
Constant Summary collapse
- PRUNE_PATHS =
%w{/.svn /.git /vendor /log /public /tmp /coverage /build /node_modules /static}
Class Method Summary collapse
Class Method Details
.delicious_prunes ⇒ Object
5 6 7 |
# File 'lib/grep-fu/find_builder.rb', line 5 def self.delicious_prunes "-path '*#{PRUNE_PATHS.join("' -prune -o -path '*")}' -prune -o" end |
.find_command(options) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/grep-fu/find_builder.rb', line 9 def self.find_command() [ 'find', .file_path, delicious_prunes, "\\( -size -100000c -type f \\) -print0 | xargs -0 grep", .to_s, "\"#{.search_criteria}\"" ].join(' ') end |