Commit a18ce409431dfad00af137bf3983bb0f456d2485
1 parent
4524ba20
Exists in
master
and in
4 other branches
Revert "First step with rugged"
This reverts commit 4524ba20b804dacccbaca3c37e781adc82c5e0d3.
Showing
3 changed files
with
3 additions
and
10 deletions
Show diff stats
Gemfile
Gemfile.lock
| ... | ... | @@ -397,7 +397,6 @@ GEM |
| 397 | 397 | ruby-progressbar (1.0.2) |
| 398 | 398 | rubyntlm (0.1.1) |
| 399 | 399 | rubyzip (0.9.9) |
| 400 | - rugged (0.17.0.b7) | |
| 401 | 400 | sanitize (2.0.3) |
| 402 | 401 | nokogiri (>= 1.4.4, < 1.6) |
| 403 | 402 | sass (3.2.7) |
| ... | ... | @@ -566,7 +565,6 @@ DEPENDENCIES |
| 566 | 565 | redcarpet (~> 2.2.2) |
| 567 | 566 | redis-rails |
| 568 | 567 | rspec-rails |
| 569 | - rugged (~> 0.17.0.b7) | |
| 570 | 568 | sass-rails (~> 3.2.5) |
| 571 | 569 | sdoc |
| 572 | 570 | seed-fu | ... | ... |
app/models/repository.rb
| ... | ... | @@ -34,10 +34,6 @@ class Repository |
| 34 | 34 | @repo ||= Grit::Repo.new(path_to_repo) |
| 35 | 35 | end |
| 36 | 36 | |
| 37 | - def rugged | |
| 38 | - @rugged ||= Rugged::Repository.new(path_to_repo) | |
| 39 | - end | |
| 40 | - | |
| 41 | 37 | def commit(commit_id = nil) |
| 42 | 38 | Commit.find_or_first(repo, commit_id, root_ref) |
| 43 | 39 | end |
| ... | ... | @@ -68,17 +64,17 @@ class Repository |
| 68 | 64 | |
| 69 | 65 | # Returns an Array of branch names |
| 70 | 66 | def branch_names |
| 71 | - branches.map(&:name).sort | |
| 67 | + repo.branches.collect(&:name).sort | |
| 72 | 68 | end |
| 73 | 69 | |
| 74 | 70 | # Returns an Array of Branches |
| 75 | 71 | def branches |
| 76 | - rugged.branches.sort_by(&:name) | |
| 72 | + repo.branches.sort_by(&:name) | |
| 77 | 73 | end |
| 78 | 74 | |
| 79 | 75 | # Returns an Array of tag names |
| 80 | 76 | def tag_names |
| 81 | - rugged.tags.sort.reverse | |
| 77 | + repo.tags.collect(&:name).sort.reverse | |
| 82 | 78 | end |
| 83 | 79 | |
| 84 | 80 | # Returns an Array of Tags | ... | ... |