Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pellegrino/s7-e1
Ruby wrapper for Ack
https://github.com/pellegrino/s7-e1
Last synced: 3 months ago
JSON representation
Ruby wrapper for Ack
- Host: GitHub
- URL: https://github.com/pellegrino/s7-e1
- Owner: pellegrino
- License: mit
- Created: 2011-05-09T23:17:43.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-05-18T21:35:58.000Z (over 13 years ago)
- Last Synced: 2024-07-20T03:48:45.090Z (4 months ago)
- Language: Ruby
- Homepage: https://github.com/pellegrino/s7-e1
- Size: 129 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# RubyAck
This gem abstracts the usage of ack (http://betterthangrep.com/) so it
can be used in a ruby program.## Pre-requisites
ack must be installed and available somewhere at the path.
## Example
The following code finds any ocurrencies of "Jackpot" , ignoring the
"specs" directory, following any symlinks@searcher = RubyAck::TextSearcher.new
@searcher.search("Jackpot") do |s|
s.ignore_directory "specs"
s.follow_symlink
endFor more examples, check spec/integration/full_stack_specs.rb
## Options supported
* Non Recursive (recursive by default)
* Follow Symlinks (don't follow by default)
* Ignore a directory## Important aspects
* spec/integration/full_stack_specs.rb is an integration test
* spec/*.spec are unit tests, mocking external calls