Skip to content
Browse files

made depot create a repo.

  • Loading branch information...
1 parent 673b967 commit 3a417f108b3246890a4e780f4b2141127faf54d8 @michaelfeathers committed Jul 1, 2011
Showing with 8 additions and 12 deletions.
  1. +8 −12 depot.rb
View
20 depot.rb
@@ -1,17 +1,13 @@
module RepoDepot
- class Depot < Repository
-
- def initialize name
- super(name, load(name))
- end
-
- private
-
- def load name
- new_events = read_events(name).sort_by(&:date)
- weave(new_events)
- new_events
+ class Depot
+
+ def self.load name
+ events = read_events(name).sort_by(&:date)
+ events = events.select {|e| e.class_name =~ /^[A-Z]/ }
+ events = events.reject {|e| e.method_name == "none" }
+ weave(events)
+ Repository.new(name, events)
end
end

0 comments on commit 3a417f1

Please sign in to comment.
Something went wrong with that request. Please try again.