teamcity-ruby-client 0.4.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +8 -8
  2. data/CHANGELOG.md +15 -1
  3. data/README.md +4 -2
  4. data/lib/teamcity.rb +1 -0
  5. data/lib/teamcity/client/build_types.rb +25 -16
  6. data/lib/teamcity/client/builds.rb +19 -15
  7. data/lib/teamcity/client/common.rb +0 -12
  8. data/lib/teamcity/client/projects.rb +21 -17
  9. data/lib/teamcity/client/vcs_roots.rb +11 -13
  10. data/lib/teamcity/configuration.rb +1 -5
  11. data/lib/teamcity/connection.rb +7 -7
  12. data/lib/teamcity/headers.rb +47 -0
  13. data/lib/teamcity/request.rb +2 -8
  14. data/lib/teamcity/version.rb +1 -1
  15. data/spec/cassettes/BuildTypes/DELETE/_delete_agent_requirement/should_delete_the_agent_requirement.yml +51 -6
  16. data/spec/cassettes/BuildTypes/DELETE/_delete_buildtype/should_delete_a_buildtype.yml +8 -6
  17. data/spec/cassettes/BuildTypes/DELETE/_delete_buildtype_parameter/should_delete_a_buildtype_parameter.yml +49 -6
  18. data/spec/cassettes/BuildTypes/GET/_buildtype/should_fetch_the_details_of_a_buildtype_by_id.yml +51 -11
  19. data/spec/cassettes/BuildTypes/GET/_buildtype/should_raise_an_error_if_the_buildtype_does_not_exist.yml +8 -6
  20. data/spec/cassettes/BuildTypes/GET/_buildtype_agent_requirements/should_fetch_the_build_configuration_agent_requirements_for_a_buildtype.yml +9 -7
  21. data/spec/cassettes/BuildTypes/GET/_buildtype_agent_requirements/should_return_an_array.yml +9 -7
  22. data/spec/cassettes/BuildTypes/GET/_buildtype_agent_requirements/should_return_nil_if_there_are_no_agent_requirements_defined.yml +9 -7
  23. data/spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_fetch_the_build_configuration_artifact_dependencies_for_a_buildtype.yml +9 -7
  24. data/spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_return_an_array.yml +9 -7
  25. data/spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_return_nil_if_there_are_no_artifact_dependencies_defined.yml +9 -7
  26. data/spec/cassettes/BuildTypes/GET/_buildtype_features/should_fetch_the_build_configuration_features_for_a_buildtype.yml +9 -7
  27. data/spec/cassettes/BuildTypes/GET/_buildtype_features/should_return_an_array.yml +9 -7
  28. data/spec/cassettes/BuildTypes/GET/_buildtype_features/should_return_nil_if_there_are_no_features_defined.yml +9 -7
  29. data/spec/cassettes/BuildTypes/GET/_buildtype_investigations/should_get_investigation_details.yml +11 -11
  30. data/spec/cassettes/BuildTypes/GET/_buildtype_investigations/should_return_nil_if_no_one_is_investigating.yml +9 -7
  31. data/spec/cassettes/BuildTypes/GET/_buildtype_parameters/should_fetch_the_build_configuration_parameters_for_a_buildtype.yml +9 -7
  32. data/spec/cassettes/BuildTypes/GET/_buildtype_parameters/should_return_an_array.yml +9 -7
  33. data/spec/cassettes/BuildTypes/GET/_buildtype_parameters/should_return_nil_if_there_are_no_parameters_defined.yml +9 -7
  34. data/spec/cassettes/BuildTypes/GET/_buildtype_settings/should_fetch_the_settings_for_a_given_buildtype.yml +51 -6
  35. data/spec/cassettes/BuildTypes/GET/_buildtype_settings/should_return_an_array.yml +51 -6
  36. data/spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_fetch_the_build_configuration_snapshot_dependencies_for_a_buildtype.yml +9 -7
  37. data/spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_return_an_array.yml +9 -7
  38. data/spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_return_nil_if_there_are_no_snapshot_dependencies_defined.yml +9 -7
  39. data/spec/cassettes/BuildTypes/GET/_buildtype_state/should_fetch_the_state_of_the_buildtype.yml +89 -0
  40. data/spec/cassettes/BuildTypes/GET/_buildtype_steps/should_fetch_the_build_configuration_steps_for_a_buildtype.yml +10 -9
  41. data/spec/cassettes/BuildTypes/GET/_buildtype_steps/should_return_an_array.yml +9 -9
  42. data/spec/cassettes/BuildTypes/GET/_buildtype_steps/should_return_nil_if_there_are_no_steps_defined.yml +9 -7
  43. data/spec/cassettes/BuildTypes/GET/_buildtype_template/should_return_nil_if_the_buildtype_is_not_associated_with_a_template.yml +8 -6
  44. data/spec/cassettes/BuildTypes/GET/_buildtype_template/should_return_the_attributes_of_the_associated_template.yml +9 -8
  45. data/spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_fetch_the_build_configuration_triggers_for_a_buildtype.yml +8 -6
  46. data/spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_return_an_array.yml +8 -6
  47. data/spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_return_nil_if_there_are_no_triggers_defined.yml +9 -7
  48. data/spec/cassettes/BuildTypes/GET/_buildtype_vcs_root_entries/should_fetch_the_build_configuration_vcs_root_entries_for_a_buildtype.yml +10 -8
  49. data/spec/cassettes/BuildTypes/GET/_buildtype_vcs_root_entries/should_return_an_array.yml +10 -8
  50. data/spec/cassettes/BuildTypes/GET/_buildtype_vcs_root_entries/should_return_nil_if_there_are_no_vcs_root_entries_defined.yml +9 -7
  51. data/spec/cassettes/BuildTypes/GET/_buildtypes/should_fetch_all_the_buildtypes.yml +9 -12
  52. data/spec/cassettes/BuildTypes/POST/_attach_vcs_root/should_attach_a_vcs_root_to_a_buildtype.yml +9 -9
  53. data/spec/cassettes/BuildTypes/POST/_create_agent_requirement/should_create_an_agent_requirement_for_a_buildtype.yml +10 -9
  54. data/spec/cassettes/BuildTypes/PUT/_set_build_step_field/should_disable_a_build_step.yml +14 -10
  55. data/spec/cassettes/BuildTypes/PUT/_set_build_step_field/should_enable_a_build_step.yml +18 -10
  56. data/spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_pause_a_project.yml +14 -10
  57. data/spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_set_a_projects_description.yml +15 -11
  58. data/spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_set_the_buildtype_name.yml +15 -11
  59. data/spec/cassettes/BuildTypes/PUT/_set_buildtype_parameter/should_set_a_buildtype_parameter.yml +15 -11
  60. data/spec/cassettes/Builds/DELETE/_unpin_build/should_unpin_a_build.yml +51 -6
  61. data/spec/cassettes/Builds/GET/_build/should_fetch_the_build_details.yml +53 -11
  62. data/spec/cassettes/Builds/GET/_build/should_raise_an_error_if_the_build_does_not_exist.yml +16 -13
  63. data/spec/cassettes/Builds/GET/_build_pinned_/should_return_false_when_a_build_is_not_pinned.yml +126 -0
  64. data/spec/cassettes/Builds/GET/_build_pinned_/should_return_true_when_a_build_is_pinned.yml +126 -0
  65. data/spec/cassettes/Builds/GET/_build_statistics/should_return_statistics_for_a_build.yml +50 -5
  66. data/spec/cassettes/Builds/GET/_build_tags/should_fetch_the_build_tags.yml +51 -6
  67. data/spec/cassettes/Builds/GET/_build_tags/should_return_an_empty_array_if_there_are_no_build_tags_defined_for_a_build.yml +89 -0
  68. data/spec/cassettes/Builds/GET/_builds/should_allow_you_to_filter_by_multiple_build_locators.yml +9 -7
  69. data/spec/cassettes/Builds/GET/_builds/should_allow_you_to_filter_results_by_build_locators.yml +9 -7
  70. data/spec/cassettes/Builds/GET/_builds/should_fetch_all_the_builds.yml +9 -7
  71. data/spec/cassettes/Builds/GET/{_build_statistics/should_return_an_empty_string_for_a_build_with_no_statistics.yml → _builds/should_return_an_empty_array_if_no_results_are_found.yml} +9 -7
  72. data/spec/cassettes/Builds/PUT/_pin_build/should_pin_a_build.yml +49 -6
  73. data/spec/cassettes/Projects/DELETE/_delete_project/should_delete_a_project.yml +17 -14
  74. data/spec/cassettes/Projects/DELETE/_delete_project_parameter/should_delete_a_project_parameter.yml +91 -6
  75. data/spec/cassettes/Projects/GET/_project/should_fetch_a_single_project_by_id.yml +10 -10
  76. data/spec/cassettes/Projects/GET/_project/should_raise_an_error_if_the_project_does_not_exist.yml +9 -7
  77. data/spec/cassettes/Projects/GET/_project_buildtypes/should_fetch_all_the_buildTypes_for_a_project.yml +9 -8
  78. data/spec/cassettes/Projects/GET/{_projects/should_return_nil_if_there_are_no_projects.yml → _project_buildtypes/should_return_nil_if_the_project_does_not_have_any_build_types.yml} +9 -7
  79. data/spec/cassettes/Projects/GET/_project_parameters/should_fetch_all_the_paramters_for_a_given_project.yml +9 -7
  80. data/spec/cassettes/Projects/GET/_project_parameters/should_return_nil_if_there_are_no_parameters_defined_for_a_project.yml +9 -7
  81. data/spec/cassettes/Projects/GET/_projects/should_fetch_projects.yml +9 -9
  82. data/spec/cassettes/Projects/POST/_copy_project/should_copy_a_project.yml +61 -15
  83. data/spec/cassettes/Projects/POST/_create_project/should_create_a_project.yml +9 -8
  84. data/spec/cassettes/Projects/PUT/_set_project_field/should_archive_a_project.yml +56 -10
  85. data/spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_description.yml +56 -10
  86. data/spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_name.yml +56 -10
  87. data/spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter.yml +56 -10
  88. data/spec/cassettes/VCSRoots/GET/_vcs_root_details/should_fetch_the_vcs_root_details.yml +53 -6
  89. data/spec/cassettes/VCSRoots/GET/_vcs_roots/should_fetch_vcs_roots.yml +10 -7
  90. data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml +90 -0
  91. data/spec/spec_helper.rb +1 -1
  92. data/spec/teamcity/api_spec.rb +0 -1
  93. data/spec/teamcity/client/builds_spec.rb +36 -56
  94. data/spec/teamcity/client/buildtypes_spec.rb +78 -42
  95. data/spec/teamcity/client/projects_spec.rb +41 -32
  96. data/spec/teamcity/client/vcs_roots_spec.rb +9 -29
  97. data/spec/teamcity/client_spec.rb +5 -1
  98. data/spec/teamcity/headers_spec.rb +43 -0
  99. data/spec/teamcity_spec.rb +1 -28
  100. data/teamcity-ruby-client.gemspec +1 -0
  101. metadata +21 -23
  102. data/spec/cassettes/BuildTypes/GET/_buildtype_template/should_raise_an_exception_if_the_response_is_not_due_to_a_template_not_assigned.yml +0 -50
  103. data/spec/cassettes/Builds/GET/_build_tags/should_return_nil_if_there_are_no_build_tags_defined_for_a_build.yml +0 -44
  104. data/spec/cassettes/Builds/GET/_builds/should_allow_you_to_search_by_locator.yml +0 -44
  105. data/spec/cassettes/Projects/GET/_project_buildtypes/should_return_nil_if_the_project_does_not_have_any_build_build_types.yml +0 -44
  106. data/spec/cassettes/Projects/PUT/_set_project_field/should_un-archive_a_project.yml +0 -50
  107. data/spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter_with_a_boolean_value.yml +0 -40
  108. data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_shared_vcs_root.yml +0 -45
  109. data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_vcs_root_that_is_only_shared_within_a_project.yml +0 -48
@@ -0,0 +1,47 @@
1
+ module TeamCity
2
+ class Headers
3
+
4
+ VALID_FORMATS = [ :json, :xml, :text ]
5
+
6
+ def self.build(opts={})
7
+ accept_format = opts.fetch(:accept){ :json }
8
+ content_type_format = opts.fetch(:content_type){ :json }
9
+ raise ArgumentError, "Invalid format for :accept, valid formats: #{VALID_FORMATS}" unless VALID_FORMATS.include?(accept_format)
10
+ raise ArgumentError, "Invalid format for :content_type, valid format: #{VALID_FORMATS}" unless VALID_FORMATS.include?(content_type_format)
11
+ new do |headers|
12
+ headers.accept = self.const_get(accept_format.to_s.capitalize).accept
13
+ headers.content_type = self.const_get(content_type_format.to_s.capitalize).content_type
14
+ end
15
+ end
16
+
17
+ attr_accessor :accept, :content_type
18
+
19
+ def initialize
20
+ yield(self) if block_given?
21
+ end
22
+
23
+ def to_hash
24
+ {
25
+ 'Accept' => accept,
26
+ 'Content-Type' => content_type
27
+ }
28
+ end
29
+
30
+ private
31
+
32
+ class Xml
33
+ def self.accept; "application/xml; charset=utf-8"; end
34
+ def self.content_type; "application/xml"; end
35
+ end
36
+
37
+ class Json
38
+ def self.accept; "application/json; charset=utf-8"; end
39
+ def self.content_type; "application/json"; end
40
+ end
41
+
42
+ class Text
43
+ def self.accept; 'text/plain'; end
44
+ def self.content_type; 'text/plain'; end
45
+ end
46
+ end
47
+ end
@@ -25,15 +25,9 @@ module TeamCity
25
25
 
26
26
  # Perform an HTTP request
27
27
  def request(method, path, options, &block)
28
- response = connection.send(method) do |request|
28
+ response = connection(options).send(method) do |request|
29
29
  block.call(request) if block_given?
30
- case method
31
- when :get, :delete
32
- request.url(path, options)
33
- when :post, :put
34
- request.path = path
35
- request.body = options unless options.empty?
36
- end
30
+ request.url(path)
37
31
  end
38
32
  response.body
39
33
  end
@@ -1,3 +1,3 @@
1
1
  module TeamCity
2
- VERSION = '0.4.0'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -1,16 +1,61 @@
1
1
  ---
2
2
  http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/buildTypes/BuildTypeTests_DeleteBuildTypeSettings/agent-requirements
6
+ body:
7
+ encoding: US-ASCII
8
+ string: <agent-requirement id="delete-agent-requirement" type="equals"><properties><property
9
+ name="property-name" value="delete-agent-requirement"/><property name="property-value"
10
+ value=""/></properties></agent-requirement>
11
+ headers:
12
+ User-Agent:
13
+ - TeamCity Ruby Client 0.4.0
14
+ Accept:
15
+ - application/json; charset=utf-8
16
+ Content-Type:
17
+ - application/xml
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - Apache-Coyote/1.1
25
+ Set-Cookie:
26
+ - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
27
+ - TCSESSIONID=D3D0379B84E01FCC30F572AC9D235E06; Path=/; HttpOnly
28
+ Pragma:
29
+ - no-cache
30
+ Expires:
31
+ - Thu, 01 Jan 1970 00:00:00 GMT
32
+ Cache-Control:
33
+ - no-cache
34
+ - no-store
35
+ Content-Type:
36
+ - application/json
37
+ Transfer-Encoding:
38
+ - chunked
39
+ Date:
40
+ - Wed, 14 Aug 2013 13:40:01 GMT
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ! '{"id":"delete-agent-requirement","type":"equals","properties":{"property":[{"name":"property-name","value":"delete-agent-requirement"},{"name":"property-value","value":""}]}}'
44
+ http_version:
45
+ recorded_at: Wed, 14 Aug 2013 13:40:01 GMT
3
46
  - request:
4
47
  method: delete
5
- uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/7.0/buildTypes/bt3/agent-requirements/test
48
+ uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/buildTypes/BuildTypeTests_DeleteBuildTypeSettings/agent-requirements/delete-agent-requirement
6
49
  body:
7
50
  encoding: US-ASCII
8
51
  string: ''
9
52
  headers:
53
+ User-Agent:
54
+ - TeamCity Ruby Client 0.4.0
10
55
  Accept:
11
56
  - application/json; charset=utf-8
12
- User-Agent:
13
- - TeamCity Ruby Client 0.2.0
57
+ Content-Type:
58
+ - application/json
14
59
  response:
15
60
  status:
16
61
  code: 204
@@ -19,8 +64,8 @@ http_interactions:
19
64
  Server:
20
65
  - Apache-Coyote/1.1
21
66
  Set-Cookie:
22
- - JSESSIONID=7D5C309BD50232088662586230C9FE5B; Path=/; HttpOnly
23
67
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
68
+ - TCSESSIONID=8A65EEF1CA573F6D40EC4EDE344112BC; Path=/; HttpOnly
24
69
  Pragma:
25
70
  - no-cache
26
71
  Expires:
@@ -29,10 +74,10 @@ http_interactions:
29
74
  - no-cache
30
75
  - no-store
31
76
  Date:
32
- - Mon, 06 May 2013 19:35:55 GMT
77
+ - Wed, 14 Aug 2013 13:40:01 GMT
33
78
  body:
34
79
  encoding: US-ASCII
35
80
  string: ''
36
81
  http_version:
37
- recorded_at: Mon, 06 May 2013 19:35:55 GMT
82
+ recorded_at: Wed, 14 Aug 2013 13:40:01 GMT
38
83
  recorded_with: VCR 2.4.0
@@ -2,15 +2,17 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: delete
5
- uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/7.0/buildTypes/bt8
5
+ uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/buildTypes/BuildTypeTests_DeleteBuildTypeRequest
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ User-Agent:
11
+ - TeamCity Ruby Client 0.4.0
10
12
  Accept:
11
13
  - application/json; charset=utf-8
12
- User-Agent:
13
- - TeamCity Ruby Client 0.2.0
14
+ Content-Type:
15
+ - application/json
14
16
  response:
15
17
  status:
16
18
  code: 204
@@ -19,8 +21,8 @@ http_interactions:
19
21
  Server:
20
22
  - Apache-Coyote/1.1
21
23
  Set-Cookie:
22
- - JSESSIONID=CC41A2976701126792F604C8CD56E27D; Path=/; HttpOnly
23
24
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
25
+ - TCSESSIONID=DEC226611E966051DBB9544DC0506D6A; Path=/; HttpOnly
24
26
  Pragma:
25
27
  - no-cache
26
28
  Expires:
@@ -29,10 +31,10 @@ http_interactions:
29
31
  - no-cache
30
32
  - no-store
31
33
  Date:
32
- - Thu, 16 May 2013 18:59:17 GMT
34
+ - Wed, 14 Aug 2013 13:43:51 GMT
33
35
  body:
34
36
  encoding: US-ASCII
35
37
  string: ''
36
38
  http_version:
37
- recorded_at: Thu, 16 May 2013 18:59:17 GMT
39
+ recorded_at: Wed, 14 Aug 2013 13:43:51 GMT
38
40
  recorded_with: VCR 2.4.0
@@ -1,16 +1,59 @@
1
1
  ---
2
2
  http_interactions:
3
3
  - request:
4
- method: delete
5
- uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/7.0/buildTypes/bt3/parameters/delete-me
4
+ method: put
5
+ uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/buildTypes/BuildTypeTests_DeleteBuildTypeSettings/parameters/delete-buildtype-param
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ User-Agent:
11
+ - TeamCity Ruby Client 0.4.0
10
12
  Accept:
11
13
  - text/plain
14
+ Content-Type:
15
+ - text/plain
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Apache-Coyote/1.1
23
+ Set-Cookie:
24
+ - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
25
+ - TCSESSIONID=3DD3228407F350DD087D54467B54201B; Path=/; HttpOnly
26
+ Pragma:
27
+ - no-cache
28
+ Expires:
29
+ - Thu, 01 Jan 1970 00:00:00 GMT
30
+ Cache-Control:
31
+ - no-cache
32
+ - no-store
33
+ Content-Type:
34
+ - text/plain
35
+ Content-Length:
36
+ - '0'
37
+ Date:
38
+ - Wed, 14 Aug 2013 13:37:47 GMT
39
+ body:
40
+ encoding: US-ASCII
41
+ string: ''
42
+ http_version:
43
+ recorded_at: Wed, 14 Aug 2013 13:37:48 GMT
44
+ - request:
45
+ method: delete
46
+ uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/buildTypes/BuildTypeTests_DeleteBuildTypeSettings/parameters/delete-me
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
12
51
  User-Agent:
13
- - TeamCity Ruby Client 0.2.0
52
+ - TeamCity Ruby Client 0.4.0
53
+ Accept:
54
+ - text/plain
55
+ Content-Type:
56
+ - text/plain
14
57
  response:
15
58
  status:
16
59
  code: 204
@@ -19,8 +62,8 @@ http_interactions:
19
62
  Server:
20
63
  - Apache-Coyote/1.1
21
64
  Set-Cookie:
22
- - JSESSIONID=38D5592832B0BE1F8FC74BEA529AB60F; Path=/; HttpOnly
23
65
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
66
+ - TCSESSIONID=B25867C33EC5BBB87144ADAA3E52E816; Path=/; HttpOnly
24
67
  Pragma:
25
68
  - no-cache
26
69
  Expires:
@@ -29,10 +72,10 @@ http_interactions:
29
72
  - no-cache
30
73
  - no-store
31
74
  Date:
32
- - Mon, 06 May 2013 19:54:06 GMT
75
+ - Wed, 14 Aug 2013 13:37:47 GMT
33
76
  body:
34
77
  encoding: US-ASCII
35
78
  string: ''
36
79
  http_version:
37
- recorded_at: Mon, 06 May 2013 19:54:07 GMT
80
+ recorded_at: Wed, 14 Aug 2013 13:37:48 GMT
38
81
  recorded_with: VCR 2.4.0
@@ -2,15 +2,60 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://localhost:8111/guestAuth/app/rest/7.0/buildTypes/id:bt2
5
+ uri: http://localhost:8111/guestAuth/app/rest/buildTypes
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ User-Agent:
11
+ - TeamCity Ruby Client 0.4.0
10
12
  Accept:
11
13
  - application/json; charset=utf-8
14
+ Content-Type:
15
+ - application/json
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - Apache-Coyote/1.1
25
+ Set-Cookie:
26
+ - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
27
+ - TCSESSIONID=1E55294896E54A273A5A6F266CB2EB9A; Path=/; HttpOnly
28
+ Pragma:
29
+ - no-cache
30
+ Expires:
31
+ - Thu, 01 Jan 1970 00:00:00 GMT
32
+ Cache-Control:
33
+ - no-cache
34
+ - no-store
35
+ Content-Type:
36
+ - application/json
37
+ Transfer-Encoding:
38
+ - chunked
39
+ Date:
40
+ - Wed, 14 Aug 2013 03:00:45 GMT
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ! '{"buildType":[{"id":"GetProjectBuildTypes_Bt1","name":"BT1","href":"/guestAuth/app/rest/buildTypes/id:GetProjectBuildTypes_Bt1","projectName":"GetProjectBuildTypes","projectId":"GetProjectBuildTypes","webUrl":"http://localhost:8111/viewType.html?buildTypeId=GetProjectBuildTypes_Bt1"},{"id":"GetProjectBuildTypes_Bt2","name":"BT2","href":"/guestAuth/app/rest/buildTypes/id:GetProjectBuildTypes_Bt2","projectName":"GetProjectBuildTypes","projectId":"GetProjectBuildTypes","webUrl":"http://localhost:8111/viewType.html?buildTypeId=GetProjectBuildTypes_Bt2"}]}'
44
+ http_version:
45
+ recorded_at: Wed, 14 Aug 2013 03:00:45 GMT
46
+ - request:
47
+ method: get
48
+ uri: http://localhost:8111/guestAuth/app/rest/buildTypes/id:GetProjectBuildTypes_Bt1
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
12
53
  User-Agent:
13
- - TeamCity Ruby Client 0.0.1
54
+ - TeamCity Ruby Client 0.4.0
55
+ Accept:
56
+ - application/json; charset=utf-8
57
+ Content-Type:
58
+ - application/json
14
59
  Accept-Encoding:
15
60
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
61
  response:
@@ -21,8 +66,8 @@ http_interactions:
21
66
  Server:
22
67
  - Apache-Coyote/1.1
23
68
  Set-Cookie:
24
- - JSESSIONID=23EBB01F6E51B3438C0F1D6E983325BB; Path=/; HttpOnly
25
69
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
70
+ - TCSESSIONID=8AAE8AAAAF10B36876EDC54DA195D836; Path=/; HttpOnly
26
71
  Pragma:
27
72
  - no-cache
28
73
  Expires:
@@ -35,15 +80,10 @@ http_interactions:
35
80
  Transfer-Encoding:
36
81
  - chunked
37
82
  Date:
38
- - Tue, 23 Apr 2013 15:14:22 GMT
83
+ - Wed, 14 Aug 2013 03:00:45 GMT
39
84
  body:
40
85
  encoding: US-ASCII
41
- string: ! '{"id":"bt2","name":"build A1","href":"/guestAuth/app/rest/7.0/buildTypes/id:bt2","webUrl":"http://localhost:8111/viewType.html?buildTypeId=bt2","description":"","paused":false,"project":{"id":"project2","name":"Project
42
- A","href":"/guestAuth/app/rest/7.0/projects/id:project2"},"template":{"id":"btTemplate2","name":"test-template","href":"/guestAuth/app/rest/7.0/buildTypes/id:(template:btTemplate2)","projectName":"Project
43
- A","projectId":"project2"},"vcs-root-entries":{"vcs-root-entry":[{"id":"1","checkout-rules":"","vcs-root":{"id":"1","name":"teamcity
44
- ruby client","href":"/guestAuth/app/rest/7.0/vcs-roots/id:1"}}]},"builds":{"href":"/guestAuth/app/rest/7.0/buildTypes/id:bt2/builds/"},"settings":{"property":[{"name":"allowExternalStatus","value":"false"},{"name":"artifactRules"},{"name":"buildNumberCounter","value":"1"},{"name":"buildNumberPattern","value":"{0}"},{"name":"checkoutDirectory"},{"name":"checkoutMode","value":"ON_SERVER"},{"name":"cleanBuild","value":"false"},{"name":"enableHangingBuildsDetection","value":"true"},{"name":"executionTimeoutMin","value":"0"},{"name":"maximumNumberOfBuilds","value":"0"},{"name":"shouldFailBuildIfTestsFailed","value":"true"},{"name":"shouldFailBuildOnAnyErrorMessage","value":"false"},{"name":"shouldFailBuildOnBadExitCode","value":"true"},{"name":"shouldFailBuildOnOOMEOrCrash","value":"true"},{"name":"showDependenciesChanges","value":"false"}]},"parameters":{"property":[{"name":"env.test1","value":"test"},{"name":"param1","value":"1"},{"name":"system.test","value":"test"}]},"steps":{"step":[{"id":"RUNNER_1","name":"continuous","type":"Maven2","properties":{"property":[{"name":"goals","value":"clean
45
- verify"},{"name":"mavenSelection","value":"mavenSelection:default"},{"name":"pomLocation","value":"pom.xml"},{"name":"teamcity.coverage.emma.include.source","value":"true"},{"name":"teamcity.coverage.emma.instr.parameters","value":"-ix
46
- -*Test*"},{"name":"teamcity.coverage.idea.includePatterns","value":"*"},{"name":"teamcity.step.mode","value":"default"},{"name":"userSettingsSelection","value":"userSettingsSelection:default"}]}}]},"features":{"feature":[{"id":"perfmon","type":"perfmon","properties":null}]},"triggers":{"trigger":[{"id":"vcsTrigger","type":"vcsTrigger","properties":{"property":[{"name":"quietPeriodMode","value":"DO_NOT_USE"}]}}]},"snapshot-dependencies":{"snapshot-dependency":[{"id":"bt3","type":"snapshot_dependency","properties":{"property":[{"name":"run-build-if-dependency-failed","value":"false"},{"name":"run-build-on-the-same-agent","value":"false"},{"name":"source_buildTypeId","value":"bt3"},{"name":"take-started-build-with-same-revisions","value":"true"},{"name":"take-successful-builds-only","value":"true"}]}}]},"artifact-dependencies":{"artifact-dependency":[{"id":"0","type":"artifact_dependency","properties":{"property":[{"name":"cleanDestinationDirectory","value":"false"},{"name":"pathRules","value":"+:version.txt"},{"name":"revisionName","value":"sameChainOrLastFinished"},{"name":"revisionValue","value":"latest.sameChainOrLastFinished"},{"name":"source_buildTypeId","value":"bt3"}]}}]},"agent-requirements":{"agent-requirement":[{"id":"system.os.name","type":"equals","properties":{"property":[{"name":"property-name","value":"system.os.name"},{"name":"property-value","value":"linux"}]}}]}}'
86
+ string: ! '{"id":"GetProjectBuildTypes_Bt1","name":"BT1","href":"/guestAuth/app/rest/buildTypes/id:GetProjectBuildTypes_Bt1","webUrl":"http://localhost:8111/viewType.html?buildTypeId=GetProjectBuildTypes_Bt1","description":"","paused":false,"project":{"id":"GetProjectBuildTypes","name":"GetProjectBuildTypes","href":"/guestAuth/app/rest/projects/id:GetProjectBuildTypes"},"builds":{"href":"/guestAuth/app/rest/buildTypes/id:GetProjectBuildTypes_Bt1/builds/"},"vcs-root-entries":{"vcs-root-entry":[]},"settings":{"property":[{"name":"allowExternalStatus","value":"false"},{"name":"artifactRules"},{"name":"buildNumberCounter","value":"1"},{"name":"buildNumberPattern","value":"%build.counter%"},{"name":"checkoutDirectory"},{"name":"checkoutMode","value":"ON_SERVER"},{"name":"cleanBuild","value":"false"},{"name":"enableHangingBuildsDetection","value":"true"},{"name":"executionTimeoutMin","value":"0"},{"name":"maximumNumberOfBuilds","value":"0"},{"name":"shouldFailBuildIfTestsFailed","value":"true"},{"name":"shouldFailBuildOnAnyErrorMessage","value":"false"},{"name":"shouldFailBuildOnBadExitCode","value":"true"},{"name":"shouldFailBuildOnOOMEOrCrash","value":"true"},{"name":"showDependenciesChanges","value":"false"},{"name":"vcsLabelingBranchFilter","value":"+:<default>"}]},"parameters":{"property":[]},"steps":{"step":[]},"features":{"feature":[]},"triggers":{"trigger":[]},"snapshot-dependencies":{"snapshot-dependency":[]},"artifact-dependencies":{"artifact-dependency":[]},"agent-requirements":{"agent-requirement":[]}}'
47
87
  http_version:
48
- recorded_at: Tue, 23 Apr 2013 15:14:22 GMT
88
+ recorded_at: Wed, 14 Aug 2013 03:00:45 GMT
49
89
  recorded_with: VCR 2.4.0
@@ -2,15 +2,17 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://localhost:8111/guestAuth/app/rest/7.0/buildTypes/id:missing
5
+ uri: http://localhost:8111/guestAuth/app/rest/buildTypes/id:missing
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ User-Agent:
11
+ - TeamCity Ruby Client 0.4.0
10
12
  Accept:
11
13
  - application/json; charset=utf-8
12
- User-Agent:
13
- - TeamCity Ruby Client 0.0.1
14
+ Content-Type:
15
+ - application/json
14
16
  Accept-Encoding:
15
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
18
  response:
@@ -21,8 +23,8 @@ http_interactions:
21
23
  Server:
22
24
  - Apache-Coyote/1.1
23
25
  Set-Cookie:
24
- - JSESSIONID=4CA15232C53DB1C151944775A52989BA; Path=/; HttpOnly
25
26
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
27
+ - TCSESSIONID=0A9A974B428E6EFFD5195F6FF556E375; Path=/; HttpOnly
26
28
  Pragma:
27
29
  - no-cache
28
30
  Expires:
@@ -35,7 +37,7 @@ http_interactions:
35
37
  Transfer-Encoding:
36
38
  - chunked
37
39
  Date:
38
- - Tue, 23 Apr 2013 15:14:22 GMT
40
+ - Wed, 14 Aug 2013 03:00:55 GMT
39
41
  body:
40
42
  encoding: US-ASCII
41
43
  string: ! 'Error has occurred during request processing (Not Found).
@@ -46,5 +48,5 @@ http_interactions:
46
48
  Could not find the entity requested. Check the reference is correct and the
47
49
  user has permissions to access the entity.'
48
50
  http_version:
49
- recorded_at: Tue, 23 Apr 2013 15:14:22 GMT
51
+ recorded_at: Wed, 14 Aug 2013 03:00:55 GMT
50
52
  recorded_with: VCR 2.4.0
@@ -2,15 +2,17 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://localhost:8111/guestAuth/app/rest/7.0/buildTypes/id:bt2/agent-requirements
5
+ uri: http://localhost:8111/guestAuth/app/rest/buildTypes/id:BuildTypeTests_GetBuildTypeConfigTests/agent-requirements
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ User-Agent:
11
+ - TeamCity Ruby Client 0.4.0
10
12
  Accept:
11
13
  - application/json; charset=utf-8
12
- User-Agent:
13
- - TeamCity Ruby Client 0.0.1
14
+ Content-Type:
15
+ - application/json
14
16
  Accept-Encoding:
15
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
18
  response:
@@ -21,8 +23,8 @@ http_interactions:
21
23
  Server:
22
24
  - Apache-Coyote/1.1
23
25
  Set-Cookie:
24
- - JSESSIONID=926ACF600C2B65C0657FD0F786EDBDB4; Path=/; HttpOnly
25
26
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
27
+ - TCSESSIONID=23C9D62FDB6816D9618B3DABBD23F31E; Path=/; HttpOnly
26
28
  Pragma:
27
29
  - no-cache
28
30
  Expires:
@@ -35,10 +37,10 @@ http_interactions:
35
37
  Transfer-Encoding:
36
38
  - chunked
37
39
  Date:
38
- - Tue, 23 Apr 2013 15:14:22 GMT
40
+ - Wed, 14 Aug 2013 11:45:55 GMT
39
41
  body:
40
42
  encoding: US-ASCII
41
- string: ! '{"agent-requirement":[{"id":"system.os.name","type":"equals","properties":{"property":[{"name":"property-name","value":"system.os.name"},{"name":"property-value","value":"linux"}]}}]}'
43
+ string: ! '{"agent-requirement":[{"id":"teamcity.agent.home.dir","type":"exists","properties":{"property":[{"name":"property-name","value":"teamcity.agent.home.dir"}]}}]}'
42
44
  http_version:
43
- recorded_at: Tue, 23 Apr 2013 15:14:23 GMT
45
+ recorded_at: Wed, 14 Aug 2013 11:45:55 GMT
44
46
  recorded_with: VCR 2.4.0