module TFSGraph::Behaviors::RelatedRepository::Project
Public Instance Methods
active()
click to toggle source
# File lib/tfs_graph/behaviors/related_repository/project.rb, line 16 def active all.reject &:hidden? end
activity(project)
click to toggle source
# File lib/tfs_graph/behaviors/related_repository/project.rb, line 35 def activity(project) project.branches.map {|b| b.changesets }.flatten end
activity_by_date(project, date)
click to toggle source
# File lib/tfs_graph/behaviors/related_repository/project.rb, line 39 def activity_by_date(project, date) activity = activity(project) activity = activity.select {|c| c.created > date } unless date.nil? activity end
all()
click to toggle source
# File lib/tfs_graph/behaviors/related_repository/project.rb, line 12 def all get_nodes(root, :outgoing, :projects, TFSGraph::Project) end
branches_for_root(project, root)
click to toggle source
# File lib/tfs_graph/behaviors/related_repository/project.rb, line 27 def branches_for_root(project, root) project.branches.select {|b| b.root == branch.path || b.original_path == branch.path} end
changesets_for_root(project, root)
click to toggle source
# File lib/tfs_graph/behaviors/related_repository/project.rb, line 31 def changesets_for_root(project, root) branches_for_root(project, root).map(&:changesets).flatten.sort end
create(args)
click to toggle source
Calls superclass method
# File lib/tfs_graph/behaviors/related_repository/project.rb, line 5 def create(args) obj = super relate :projects, root, obj.db_object obj end
find_by_name(name)
click to toggle source
# File lib/tfs_graph/behaviors/related_repository/project.rb, line 20 def find_by_name(name) project = all.detect {|p| p.name == name } raise TFSGraph::Repository::NotFound, "No project found for #{name}" if project.nil? project end