-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds a pass-thru arg for Mocha grep
support
#181
Conversation
when running from the command line.
@jfirebaugh Hi John -- does this seem ok? |
Hi @tim-pg, and thanks for the contribution. I'm leaning towards "no" on this. I realize there's a precedent here with |
Sure I feel the same way. Do you have a preference on how you'd like that done (there are of course various options)? Anyway yeah I can switch this to use an arg, then followup to make the other extant env vars work via args instead. Also, that aside, are you OK with the basic idea of appending the |
Let's start simple, just using the stdlib
👍 |
@jfirebaugh Ok this has been updated. Note that |
@jfirebaugh Hi John, how's this looking? Anything you'd like tweaked? Thanks-- |
What I had in mind was actually moving the existing env var support out to the rake tasks (we do need to keep supporting that), and providing a standalone
The binary has to load up the Rails environment somehow -- I guess look at what |
You require
|
Ok-- I misunderstood what you meant by "real CLI interface", sorry about that. Ok, I'll take a stab at a standalone binary.
|
Yes, right, just task :run => :environment do
if ENV['FORMAT']
Konacha.config.formatters = ENV['FORMAT'].split(',').map do |string|
eval(string).new(STDOUT)
end
end
if ENV["SPEC"]
Konacha.config.spec = ENV["SPEC"].split(",")
end
passed = Konacha.run
# Apparently there is no canonical way to fail a rake task other than
# throwing an exception or exiting.
# http://stackoverflow.com/a/5117457/525872
exit 1 unless passed
end |
Adds a pass-thru arg for Mocha
grep
support when running from the command line.