snoopycrimecop/snoopycrimecop — pull request #20 by sbesson (2012-12-03 21:35:20+00:00)
Title: Git github

- Implement GitHubRepository class
- Subclass Manager to manage Git & Github repository like Github instances
- Improve Mock classes for Manager testing

Example of use:
```
sbesson:snoopycrimecop sebastien$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scc
>>> repo = scc.get_git_repo(".")
2012-12-03 21:33:27,219 INFO
2012-12-03 21:33:27,219 DEBUG Check current status
2012-12-03 21:33:27,220 DEBUG Calling 'git log --oneline -n 1 HEAD'
2012-12-03 21:33:27,229 DEBUG 1c6e6e1 Add tests for GitRepoManager
2012-12-03 21:33:27,229 DEBUG Calling 'git submodule status'
2012-12-03 21:33:27,267 DEBUG Calling 'git config --get remote.origin.url'
2012-12-03 21:33:27,272 INFO Repository: snoopycrimecop/snoopycrimecop
2012-12-03 21:33:27,272 DEBUG Calling 'git config --get github.token'
2012-12-03 21:33:27,834 DEBUG Create Github instance identified as snoopycrimecop
2012-12-03 21:33:27,834 DEBUG Connect to Github repository snoopycrimecop/snoopycrimecop
2012-12-03 21:33:27,834 DEBUG github.get_user
>>> origin = scc.get_github_repo("snoopycrimecop","snoopycrimecop")
2012-12-03 21:33:58,904 DEBUG Retrieve Github repository: snoopycrimecop/snoopycrimecop
>>> remote = scc.get_github_repo("sbesson","snoopycrimecop")
2012-12-03 21:34:11,512 DEBUG Calling 'git config --get github.token'
2012-12-03 21:34:12,412 DEBUG Retrieve Github instance identified as snoopycrimecop
2012-12-03 21:34:12,412 DEBUG Connect to Github repository sbesson/snoopycrimecop
2012-12-03 21:34:12,412 DEBUG github.get_user
```
Also run the tests under tests.