Module: TeamCity::Client::Projects

Included in:
TeamCity::Client
Defined in:
lib/teamcity/client/projects.rb

Overview

Defines methods related to projects

Instance Method Summary collapse

Instance Method Details

#project(options = {}) ⇒ Hashie::Mash

Get project details

Parameters:

  • options (Hash) (defaults to: {})

    option keys, :id => project_id

Returns:

  • (Hashie::Mash)

    of project details



20
21
22
23
# File 'lib/teamcity/client/projects.rb', line 20

def project(options={})
  assert_options(options)
  get("projects/#{locator(options)}")
end

#project_buildtypes(options = {}) ⇒ Array<Hashie::Mash>?

List of Build Configurations of a project

Parameters:

  • options (Hash) (defaults to: {})

    option keys, :id => project_id

Returns:

  • (Array<Hashie::Mash>, nil)

    of build types or nil if no build types exist



29
30
31
32
33
# File 'lib/teamcity/client/projects.rb', line 29

def project_buildtypes(options={})
  assert_options(options)
  response = get("projects/#{locator(options)}/buildTypes")
  response['buildType']
end

#project_parameters(options = {}) ⇒ Array<Hashie::Mash>?

List of parameters defined on a project

Parameters:

  • options (Hash) (defaults to: {})

    option keys, :id => project_id

Returns:

  • (Array<Hashie::Mash>, nil)

    of parameters or nil if no parameters are defined



39
40
41
42
43
# File 'lib/teamcity/client/projects.rb', line 39

def project_parameters(options={})
  assert_options(options)
  response = get("projects/#{locator(options)}/parameters")
  response['property']
end

#projectsArray<Hashie::Mash>?

List of projects

Returns:

  • (Array<Hashie::Mash>, nil)

    of projects or nil if no projects exist



11
12
13
14
# File 'lib/teamcity/client/projects.rb', line 11

def projects
  response = get('projects')
  response['project']
end