Skip to content
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

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

Open
curtislinden opened this issue May 2, 2014 · 7 comments

Comments

@curtislinden
Copy link

No description provided.

@xtagon
Copy link

xtagon commented Sep 5, 2015

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
Copy link

xtagon commented Sep 5, 2015

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
Copy link
Owner

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
Copy link

xtagon commented Sep 5, 2015

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
Copy link

@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
Copy link

xtagon commented Mar 15, 2016

@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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants