class TFSGraph::ChangesetStore
Constants
- LIMIT
Public Class Methods
new(branch)
click to toggle source
# File lib/tfs_graph/changeset/changeset_store.rb, line 12 def initialize(branch) @branch = branch end
Public Instance Methods
cache(attrs)
click to toggle source
# File lib/tfs_graph/changeset/changeset_store.rb, line 24 def cache(attrs) changeset = RepositoryRegistry.changeset_repository.build attrs # add_changeset action runs save! on changeset @branch.add_changeset changeset changeset end
fetch_since_date(date)
click to toggle source
# File lib/tfs_graph/changeset/changeset_store.rb, line 20 def fetch_since_date(date) normalize root_query.where("CreationDate gt DateTime'#{date}'").run end
fetch_since_last_update()
click to toggle source
# File lib/tfs_graph/changeset/changeset_store.rb, line 16 def fetch_since_last_update fetch_since_date(@branch.last_updated.iso8601) end
Private Instance Methods
normalize(changesets)
click to toggle source
# File lib/tfs_graph/changeset/changeset_store.rb, line 38 def normalize(changesets) ChangesetNormalizer.normalize_many changesets, @branch.path end
root_query()
click to toggle source
# File lib/tfs_graph/changeset/changeset_store.rb, line 34 def root_query tfs.branches(@branch.path).changesets.order_by("Id asc").limit(LIMIT) end