parent
4524ba20b8
commit
a18ce40943
3 changed files with 3 additions and 10 deletions
1
Gemfile
1
Gemfile
|
@ -22,7 +22,6 @@ gem 'omniauth-twitter'
|
|||
gem 'omniauth-github'
|
||||
|
||||
# Extracting information from a git repository
|
||||
gem 'rugged', '~> 0.17.0.b7'
|
||||
gem "gitlab-grit", '~> 1.0.0', require: 'grit'
|
||||
gem 'grit_ext', '~> 0.8.1'
|
||||
|
||||
|
|
|
@ -397,7 +397,6 @@ GEM
|
|||
ruby-progressbar (1.0.2)
|
||||
rubyntlm (0.1.1)
|
||||
rubyzip (0.9.9)
|
||||
rugged (0.17.0.b7)
|
||||
sanitize (2.0.3)
|
||||
nokogiri (>= 1.4.4, < 1.6)
|
||||
sass (3.2.7)
|
||||
|
@ -566,7 +565,6 @@ DEPENDENCIES
|
|||
redcarpet (~> 2.2.2)
|
||||
redis-rails
|
||||
rspec-rails
|
||||
rugged (~> 0.17.0.b7)
|
||||
sass-rails (~> 3.2.5)
|
||||
sdoc
|
||||
seed-fu
|
||||
|
|
|
@ -34,10 +34,6 @@ class Repository
|
|||
@repo ||= Grit::Repo.new(path_to_repo)
|
||||
end
|
||||
|
||||
def rugged
|
||||
@rugged ||= Rugged::Repository.new(path_to_repo)
|
||||
end
|
||||
|
||||
def commit(commit_id = nil)
|
||||
Commit.find_or_first(repo, commit_id, root_ref)
|
||||
end
|
||||
|
@ -68,17 +64,17 @@ class Repository
|
|||
|
||||
# Returns an Array of branch names
|
||||
def branch_names
|
||||
branches.map(&:name).sort
|
||||
repo.branches.collect(&:name).sort
|
||||
end
|
||||
|
||||
# Returns an Array of Branches
|
||||
def branches
|
||||
rugged.branches.sort_by(&:name)
|
||||
repo.branches.sort_by(&:name)
|
||||
end
|
||||
|
||||
# Returns an Array of tag names
|
||||
def tag_names
|
||||
rugged.tags.sort.reverse
|
||||
repo.tags.collect(&:name).sort.reverse
|
||||
end
|
||||
|
||||
# Returns an Array of Tags
|
||||
|
|
Loading…
Reference in a new issue