jejacks0n / guard-teaspoon

Guard-Teaspoon: Run Javascript tests with Guard and all the features of Teaspoon.
38 stars 16 forks source link

Does it make sense to enable guard-teaspoon to use :cmd option for starting spring teaspoon? #31

Open curtislinden opened 10 years ago

xtagon commented 9 years ago

I don't know about others, but personally I would like to be able to set :cmd to anything I want. For my apps I wrap commands in foreman run so it loads my environment variables for that command only, without exporting them into the current shell session. This works for Rspec + Guard, but Teaspon + Guard fails to honor the custom command.

xtagon commented 9 years ago

Hi, after posting that I tried something that solved my problem. I now wrap the entire guard start command with Foreman instead, and everything works perfectly. Sorry for adding noise to the issue.

jejacks0n commented 9 years ago

No worries! I don't use guard regularly and I wrote this project more or less as a proof of concept. I am by no means opposed to someone who knows what they're doing with guard to improve upon it. I don't even know what :cmd means, and have little time to really understand the stack as well as I should to provide this as a good solution. Feel free to make PRs. :)


Jeremy Jackson

On Sep 4, 2015, at 6:11 PM, Justin Workman notifications@github.com wrote:

Hi, after posting that I tried something that solved my problem. I now wrap the entire guard start command with Foreman instead, and everything works perfectly. Sorry for adding noise to the issue.

— Reply to this email directly or view it on GitHub.

xtagon commented 9 years ago

Guard has an option named :cmd that you set in the Guardfile for each suite (Rspec, Teaspoon, etc). It's the command that runs Teaspoon (e.g. bundle exec rake teaspon)

Proof of concept or not, this plugn does the job! Thanks for creating it.

nerfologist commented 8 years ago

@xtagon I have a similar issue with the :cmd option trying to get guard-teaspoon to run bundle exec spring teaspoon instead of bundle exec teaspoon when a change is detected. Can you elaborate on your workaround/solution?

xtagon commented 8 years ago

@nerfologist I start guard with the command foreman run bundle exec guard start (Foreman loads my .env file). My Guardfile has the line:

guard :teaspoon, cmd: "spring rake teaspoon" do
  # watch ...
end

It's a lot of comand wrapping but it works for me.

jejacks0n commented 8 years ago

if anybody wants to submit a PR, I'd merge it.. I don't use it, so it's hard for me to get a good setup and make sure everything is working.