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

Grocery-delivery - Missing methods? #29

Closed
pkringle opened this issue Jul 22, 2014 · 3 comments
Closed

Grocery-delivery - Missing methods? #29

pkringle opened this issue Jul 22, 2014 · 3 comments

Comments

@pkringle
Copy link

I am not a ruby dev by any means.

Working on setting up grocery-delivery via ruby version to work with our git repo, it seems to be missing a few methods.

$ ./grocery-delivery.rb 
Attempting to acquire lock
Lock acquired
Updating repo
./grocery-delivery.rb:199:in `<main>': undefined method `update' for #<BetweenMeals::Repo::Git:0x000000014794a0> (NoMethodError)

So I went in an added an update method

index 9ccf4d8..76d586a 100755
--- a/between-meals/repo/git.rb
+++ b/between-meals/repo/git.rb
@@ -46,6 +46,11 @@ module BetweenMeals
         s = Mixlib::ShellOut.new("#{@bin} clone #{url} #{@repo}").run_command
         s.error!
       end
+ 
+      def update
+        s = Mixlib::ShellOut.new("#{@bin} pull").run_command
+        s.error!
+      end

       # libgit turns out to be *very* slow at this. Using /usr/bin/git
       # for now, we'll circle back to this.

And then ran into this error.

$ ./grocery-delivery.rb 
Attempting to acquire lock
Lock acquired
Updating repo
DEBUG: Reading 
/grocery-delivery/gd_revision
./grocery-delivery.rb:223:in `<main>': undefined method `head' for #<BetweenMeals::Repo::Git:0x0000000219a440> (NoMethodError)

Are these methods really missing? Or am I just missing something obvious?

@jaymzh
Copy link
Collaborator

jaymzh commented Jul 22, 2014

Hmmm. This is probably a function of a restructuring of the BM::Git module for TasteTester, and GD didn't keep up because we use it with SVN internally. I'll dig into this and get a patch out, hopefully today. Thanks for the report.

jaymzh added a commit to jaymzh/chef-utils that referenced this issue Jul 22, 2014
BetweenMeals::Repo::SVN had diverged from the Git modules, bring
them back in sync.

Also, TT's logging has changed, bring GD inline.

Addresses facebook#29.
@jaymzh
Copy link
Collaborator

jaymzh commented Jul 22, 2014

All fixed up. Sorry about that. Let me know if you have any more issues.

@jaymzh jaymzh closed this as completed Jul 22, 2014
@pkringle
Copy link
Author

Thanks, the last post was a problem on my end, hence why I deleted it. Thanks, your patched work! Thanks again for such a quick response.

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

2 participants