Class: TFSGraph::ChangesetStore

Inherits:
Object
  • Object
show all
Includes:
StoreHelpers, TFSClient
Defined in:
lib/tfs_graph/changeset/changeset_store.rb

Constant Summary collapse

LIMIT =
10000

Constants included from StoreHelpers

StoreHelpers::UPDATED_KEY

Constants included from TFSClient

TFSClient::InvalidConfig, TFSClient::REQUIRED_KEYS

Instance Method Summary collapse

Methods included from StoreHelpers

#flush_all, #last_updated_on, #mark_as_updated

Methods included from TFSClient

#endpoint, #setup, #tfs, #tfs=

Constructor Details

#initialize(branch) ⇒ ChangesetStore

Returns a new instance of ChangesetStore.



15
16
17
# File 'lib/tfs_graph/changeset/changeset_store.rb', line 15

def initialize(branch)
  @branch = branch
end

Instance Method Details

#allObject



31
32
33
# File 'lib/tfs_graph/changeset/changeset_store.rb', line 31

def all
  normalize root_query.run
end

#cache_allObject



19
20
21
# File 'lib/tfs_graph/changeset/changeset_store.rb', line 19

def cache_all
  persist all
end

#cache_since_date(start) ⇒ Object



27
28
29
# File 'lib/tfs_graph/changeset/changeset_store.rb', line 27

def cache_since_date(start)
  persist since_date(start)
end

#cache_since_last_updateObject



23
24
25
# File 'lib/tfs_graph/changeset/changeset_store.rb', line 23

def cache_since_last_update
  persist since_last_update
end

#since_date(date) ⇒ Object



35
36
37
# File 'lib/tfs_graph/changeset/changeset_store.rb', line 35

def since_date(date)
  normalize root_query.where("CreationDate gt DateTime'#{date}'").run
end

#since_last_updateObject



39
40
41
# File 'lib/tfs_graph/changeset/changeset_store.rb', line 39

def since_last_update
  since_date(last_updated_on.iso8601)
end