Module: TFSGraph::Populators::Utilities

Includes:
StoreHelpers
Included in:
Everything, ForProject, SinceDate, SinceLast
Defined in:
lib/tfs_graph/populators/utilities.rb

Constant Summary

Constants included from StoreHelpers

StoreHelpers::UPDATED_KEY

Instance Method Summary collapse

Methods included from StoreHelpers

#flush_all, #last_updated_on, #mark_as_updated

Instance Method Details

#cleanObject



6
7
8
# File 'lib/tfs_graph/populators/utilities.rb', line 6

def clean
  flush_all
end

#collect_branches(project) ⇒ Object



19
20
21
# File 'lib/tfs_graph/populators/utilities.rb', line 19

def collect_branches(project)
  BranchStore.new(project).cache_all
end

#collect_changesets(branch, method = :cache_all, *args) ⇒ Object



23
24
25
26
27
# File 'lib/tfs_graph/populators/utilities.rb', line 23

def collect_changesets(branch, method=:cache_all, *args)
  changesets = ChangesetStore.new(branch).send(method, *args)
  generate_branch_tree(branch)
  changesets.compact
end

#collect_merges(branch) ⇒ Object



33
34
35
# File 'lib/tfs_graph/populators/utilities.rb', line 33

def collect_merges(branch)
  ChangesetMergeStore.new(branch).cache
end

#collect_projectsObject



15
16
17
# File 'lib/tfs_graph/populators/utilities.rb', line 15

def collect_projects
  ProjectStore.cache
end

#finalizeObject



10
11
12
13
# File 'lib/tfs_graph/populators/utilities.rb', line 10

def finalize
  BranchArchiveHandler.hide_all_archives
  mark_as_updated
end

#generate_branch_tree(branch) ⇒ Object



29
30
31
# File 'lib/tfs_graph/populators/utilities.rb', line 29

def generate_branch_tree(branch)
  ChangesetTreeCreator.to_tree branch
end