Aqui
A gem for making sure some code is running.
Sometimes when coding, you run into a situation where you want to make sure
a bit of code is being executed by your application. You might end up
typing something like the following, where you aren't positive if the code about @noises_made
being run
class Animal
def make_noise
@noises_made ||= 0
@noises_made += 1
puts 'noises are being made!'
nil
end
end
class Dog < Animal
def make_noise
super
'bark'
end
end
This way, you can run your code and check your logs to see if the put
methods were called. If this short and simple effective method works for you,
then give aqui
a shot next time. It looks like this:
class Animal
def make_noise
@noises_made ||= 0
@noises_made += 1
aqui # <= add this!
nil
end
end
This time, the output is colorized and contains information about where the code is running:
Handy, huh?
Installation
gem 'aqui'
Usage
aqui
Contributing
- Fork it ( https://github.com/[my-github-username]/aqui/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request