Class: TFSGraph::BranchStore

Inherits:
Object
  • Object
show all
Includes:
StoreHelpers, TFSClient, TFSHelpers
Defined in:
lib/tfs_graph/branch/branch_store.rb

Constant Summary collapse

LIMIT =
1000

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 TFSHelpers

#base_username, #branch_base, #branch_path_to_name, #branch_project, #odata_path_to_server_path, #scrub_changeset, #server_path_to_odata_path

Methods included from TFSClient

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

Constructor Details

#initialize(project) ⇒ BranchStore

Returns a new instance of BranchStore.



16
17
18
# File 'lib/tfs_graph/branch/branch_store.rb', line 16

def initialize(project)
  @project = project
end

Instance Method Details

#allObject



28
29
30
# File 'lib/tfs_graph/branch/branch_store.rb', line 28

def all
  normalize root_query.run
end

#cache_allObject



20
21
22
# File 'lib/tfs_graph/branch/branch_store.rb', line 20

def cache_all
  persist(all)
end

#cache_since_last_updateObject



24
25
26
# File 'lib/tfs_graph/branch/branch_store.rb', line 24

def cache_since_last_update
  persist since_last_update
end

#since_last_updateObject



32
33
34
# File 'lib/tfs_graph/branch/branch_store.rb', line 32

def since_last_update
  normalize root_query.where("DateCreated gt DateTime'#{last_updated_on.iso8601}'").run
end