mojombo-grit 0.8.1 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/History.txt +7 -0
  2. data/Manifest.txt +18 -1
  3. data/grit.gemspec +56 -10
  4. data/lib/{mojombo-grit.rb → grit.rb} +20 -4
  5. data/lib/grit/commit.rb +32 -11
  6. data/lib/grit/commit_stats.rb +104 -0
  7. data/lib/grit/git-ruby.rb +182 -0
  8. data/lib/grit/git-ruby/commit_db.rb +52 -0
  9. data/lib/grit/git-ruby/file_index.rb +186 -0
  10. data/lib/grit/git-ruby/git_object.rb +344 -0
  11. data/lib/grit/git-ruby/internal/loose.rb +136 -0
  12. data/lib/grit/git-ruby/internal/mmap.rb +58 -0
  13. data/lib/grit/git-ruby/internal/pack.rb +382 -0
  14. data/lib/grit/git-ruby/internal/raw_object.rb +37 -0
  15. data/lib/grit/git-ruby/object.rb +319 -0
  16. data/lib/grit/git-ruby/repository.rb +729 -0
  17. data/lib/grit/git.rb +33 -15
  18. data/lib/grit/head.rb +6 -15
  19. data/lib/grit/index.rb +121 -0
  20. data/lib/grit/ref.rb +95 -0
  21. data/lib/grit/repo.rb +95 -6
  22. data/lib/grit/status.rb +151 -0
  23. data/lib/grit/tree.rb +3 -2
  24. data/test/test_blob.rb +5 -0
  25. data/test/test_commit.rb +7 -5
  26. data/test/test_diff.rb +1 -1
  27. data/test/test_git.rb +20 -2
  28. data/test/test_grit.rb +32 -0
  29. data/test/test_head.rb +30 -5
  30. data/test/test_real.rb +8 -6
  31. data/test/test_remote.rb +14 -0
  32. data/test/test_repo.rb +86 -79
  33. data/test/test_tag.rb +2 -6
  34. data/test/test_tree.rb +5 -0
  35. metadata +40 -40
  36. data/test/fixtures/blame +0 -131
  37. data/test/fixtures/cat_file_blob +0 -1
  38. data/test/fixtures/cat_file_blob_size +0 -1
  39. data/test/fixtures/diff_2 +0 -54
  40. data/test/fixtures/diff_2f +0 -19
  41. data/test/fixtures/diff_f +0 -15
  42. data/test/fixtures/diff_i +0 -201
  43. data/test/fixtures/diff_mode_only +0 -1152
  44. data/test/fixtures/diff_new_mode +0 -17
  45. data/test/fixtures/diff_p +0 -610
  46. data/test/fixtures/for_each_ref +0 -0
  47. data/test/fixtures/for_each_ref_tags +0 -0
  48. data/test/fixtures/ls_tree_a +0 -7
  49. data/test/fixtures/ls_tree_b +0 -2
  50. data/test/fixtures/ls_tree_commit +0 -3
  51. data/test/fixtures/rev_list +0 -26
  52. data/test/fixtures/rev_list_count +0 -655
  53. data/test/fixtures/rev_list_single +0 -7
  54. data/test/fixtures/rev_parse +0 -1
  55. data/test/fixtures/show_empty_commit +0 -6
  56. data/test/fixtures/simple_config +0 -2
  57. data/test/helper.rb +0 -17
  58. data/test/profile.rb +0 -21
  59. data/test/suite.rb +0 -6
@@ -1,7 +0,0 @@
1
- commit 4c8124ffcf4039d292442eeccabdeca5af5c5017
2
- tree 672eca9b7f9e09c22dcb128c283e8c3c8d7697a4
3
- parent 634396b2f541a9f2d58b00be1a07f0c358b999b3
4
- author Tom Preston-Werner <tom@mojombo.com> 1191999972 -0700
5
- committer Tom Preston-Werner <tom@mojombo.com> 1191999972 -0700
6
-
7
- implement Grit#heads
@@ -1 +0,0 @@
1
- 80f136f
@@ -1,6 +0,0 @@
1
- commit 1e3824339762bd48316fe87bfafc853732d43264
2
- tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
3
- author Tom Preston-Werner <tom@mojombo.com> 1157392833 +0000
4
- committer Tom Preston-Werner <tom@mojombo.com> 1157392833 +0000
5
-
6
- initial directory structure
@@ -1,2 +0,0 @@
1
- core.bare=false
2
- remote.origin.url=git://github.com/mojombo/grit.git
data/test/helper.rb DELETED
@@ -1,17 +0,0 @@
1
- require File.join(File.dirname(__FILE__), *%w[.. lib grit])
2
-
3
- require 'rubygems'
4
- require 'test/unit'
5
- require 'mocha'
6
-
7
- GRIT_REPO = File.join(File.dirname(__FILE__), *%w[..])
8
-
9
- include Grit
10
-
11
- def fixture(name)
12
- File.read(File.join(File.dirname(__FILE__), 'fixtures', name))
13
- end
14
-
15
- def absolute_project_path
16
- File.expand_path(File.join(File.dirname(__FILE__), '..'))
17
- end
data/test/profile.rb DELETED
@@ -1,21 +0,0 @@
1
- # require File.join(File.dirname(__FILE__), *%w[.. lib grit])
2
- # include Grit
3
- #
4
- # def recurse(tree, indent = "")
5
- # tree.contents.each do |c|
6
- # case c
7
- # when Tree
8
- # # puts "#{indent}#{c.name} (#{c.id})"
9
- # recurse(c, indent + " ")
10
- # end
11
- # end
12
- # end
13
- #
14
- # 10.times do
15
- # r = Repo.new("/Users/tom/dev/god")
16
- # t = r.tree
17
- #
18
- # recurse(t)
19
- # end
20
-
21
- 500.times { puts `git --git-dir /Users/tom/dev/god/.git ls-tree master` }
data/test/suite.rb DELETED
@@ -1,6 +0,0 @@
1
- require 'test/unit'
2
-
3
- tests = Dir["#{File.dirname(__FILE__)}/test_*.rb"]
4
- tests.each do |file|
5
- require file
6
- end