Skip to content

Commit

Permalink
merge d34d53 and fix whitespace conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mojombo committed Mar 1, 2009
2 parents 007473c + d34d530 commit bc9fb8b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Rakefile
Expand Up @@ -3,6 +3,7 @@ require 'rake/testtask'
require 'rake/rdoctask'

begin
require 'rubygems'
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "grit"
Expand Down Expand Up @@ -51,4 +52,4 @@ end
desc "Upload site to Rubyforge"
task :site do
sh "scp -r doc/* mojombo@grit.rubyforge.org:/var/www/gforge-projects/grit"
end
end
9 changes: 7 additions & 2 deletions lib/grit/blob.rb
Expand Up @@ -104,7 +104,7 @@ def self.blame(repo, commit, file)
info = nil
end
end

blames
end

Expand All @@ -116,6 +116,11 @@ def basename
def inspect
%Q{#<Grit::Blob "#{@id}">}
end

# Compares blobs by name
def <=>(other)
name <=> other.name
end
end # Blob

end # Grit
17 changes: 16 additions & 1 deletion lib/grit/tree.rb
Expand Up @@ -103,6 +103,21 @@ def basename
def inspect
%Q{#<Grit::Tree "#{@id}">}
end

# Find only Tree objects from contents
def trees
contents.select {|v| v.kind_of? Tree}
end

# Find only Blob objects from contents
def blobs
contents.select {|v| v.kind_of? Blob}
end

# Compares trees by name
def <=>(other)
name <=> other.name
end
end # Tree

end # Grit

0 comments on commit bc9fb8b

Please sign in to comment.