coderly / code

The Coderly toolbelt
http://coderly.com
1 stars 0 forks source link

Add code search command #11

Closed idelahoz closed 9 years ago

idelahoz commented 9 years ago

This Pr adds the code searchcommand which opens a github search interface for the repository, like:

https://github.com/coderly/code/find/development

venkatd commented 9 years ago

There are no tests for the testing current_organization and current_repo_name. I can imagine that it took a while to get this right without tests (and we can't be certain it works well).

idelahoz commented 9 years ago

@venkatd take a look a @begedin's comment. That code actually needs some changes, I copied the code from https://github.com/coderly/code/pull/9 and Nikola says he will refactor it once this PR gets merged, since he refactored this code on his PR but he says this is a better location for it.

So, where should those specs go?

venkatd commented 9 years ago

@idelahoz What is your opinion?

begedin commented 9 years ago

@venkatd: The 3 pull requests (#9, #10, #11) had so much overlap it was a nightmare to manage, so if you agree, I'd like to add the specs as a separate PR, once all of this is merged and cleared.

begedin commented 9 years ago

@idelahoz I merged the latest development into here and removed the unnecessary code the discussion was about, so you should have a cleaner situation now.

idelahoz commented 9 years ago

@begedin so the search method is broken, since it calls current_repo, but I'll merge your changes and call it from the Repository class.

begedin commented 9 years ago

@idelahoz And the conflict nightmare continues. We need to make this gem bigger so we can each work on our own part :)

begedin commented 9 years ago

It's going to be Repository.current.slug in that case. Just to save you a few seconds.

idelahoz commented 9 years ago

@begedin cool. Let me know when I can merge and use that. Thanks man.

idelahoz commented 9 years ago

Ok the Repository code is merged so I'll do it now,

begedin commented 9 years ago

@venkatd I've merged latest development into this one and then fixed issues that occured with it. I also added a single spec to cover the search command.

I created tasks in asana to cover the rest of the repo with specs, so we can do that separately.