Created
February 8, 2014 15:50
-
-
Save harssh/8885754 to your computer and use it in GitHub Desktop.
7 Lines Every Gem's Rakefile Should Have
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Add these 7 lines to your project's Rakefile: | |
| task :console do | |
| require 'irb' | |
| require 'irb/completion' | |
| require 'my_gem' # You know what to do. | |
| ARGV.clear | |
| IRB.start | |
| end | |
| #Now, a suitable playground is only a rake console away. For bonus points, if your gem requires a bit of fixture data to do #anything useful, you can stage some data before starting the console. Even users who aren't adept at writing tests should be #able to give you steps to reproduce problems using this console, in a clean environment free of their app code and other gems. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment