module TFSGraph::TFSClient
Constants
- InvalidConfig
- REQUIRED_KEYS
Public Instance Methods
endpoint(settings)
click to toggle source
# File lib/tfs_graph/tfs_client.rb, line 33 def endpoint(settings) "#{settings[:endpoint]}/#{settings[:collection]}" end
setup(settings=TFSGraph.config.tfs)
click to toggle source
Requires a hash of settings
# File lib/tfs_graph/tfs_client.rb, line 11 def setup(settings=TFSGraph.config.tfs) raise InvalidConfig unless REQUIRED_KEYS.all? {|key| settings.keys.include? key } TFS.configure do |c| c.endpoint = endpoint(settings) c.username = settings[:username] c.password = settings[:password] c.namespace = settings[:namespace] || "TFS" end end
tfs()
click to toggle source
# File lib/tfs_graph/tfs_client.rb, line 22 def tfs @tfs ||= begin setup TFS.client end end
tfs=(client)
click to toggle source
# File lib/tfs_graph/tfs_client.rb, line 29 def tfs=(client) @tfs = client end