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.
- checksums.yaml +8 -8
- data/CHANGELOG.md +15 -1
- data/README.md +4 -2
- data/lib/teamcity.rb +1 -0
- data/lib/teamcity/client/build_types.rb +25 -16
- data/lib/teamcity/client/builds.rb +19 -15
- data/lib/teamcity/client/common.rb +0 -12
- data/lib/teamcity/client/projects.rb +21 -17
- data/lib/teamcity/client/vcs_roots.rb +11 -13
- data/lib/teamcity/configuration.rb +1 -5
- data/lib/teamcity/connection.rb +7 -7
- data/lib/teamcity/headers.rb +47 -0
- data/lib/teamcity/request.rb +2 -8
- data/lib/teamcity/version.rb +1 -1
- data/spec/cassettes/BuildTypes/DELETE/_delete_agent_requirement/should_delete_the_agent_requirement.yml +51 -6
- data/spec/cassettes/BuildTypes/DELETE/_delete_buildtype/should_delete_a_buildtype.yml +8 -6
- data/spec/cassettes/BuildTypes/DELETE/_delete_buildtype_parameter/should_delete_a_buildtype_parameter.yml +49 -6
- data/spec/cassettes/BuildTypes/GET/_buildtype/should_fetch_the_details_of_a_buildtype_by_id.yml +51 -11
- data/spec/cassettes/BuildTypes/GET/_buildtype/should_raise_an_error_if_the_buildtype_does_not_exist.yml +8 -6
- data/spec/cassettes/BuildTypes/GET/_buildtype_agent_requirements/should_fetch_the_build_configuration_agent_requirements_for_a_buildtype.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_agent_requirements/should_return_an_array.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_agent_requirements/should_return_nil_if_there_are_no_agent_requirements_defined.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_fetch_the_build_configuration_artifact_dependencies_for_a_buildtype.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_return_an_array.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_return_nil_if_there_are_no_artifact_dependencies_defined.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_features/should_fetch_the_build_configuration_features_for_a_buildtype.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_features/should_return_an_array.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_features/should_return_nil_if_there_are_no_features_defined.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_investigations/should_get_investigation_details.yml +11 -11
- data/spec/cassettes/BuildTypes/GET/_buildtype_investigations/should_return_nil_if_no_one_is_investigating.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_parameters/should_fetch_the_build_configuration_parameters_for_a_buildtype.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_parameters/should_return_an_array.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_parameters/should_return_nil_if_there_are_no_parameters_defined.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_settings/should_fetch_the_settings_for_a_given_buildtype.yml +51 -6
- data/spec/cassettes/BuildTypes/GET/_buildtype_settings/should_return_an_array.yml +51 -6
- data/spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_fetch_the_build_configuration_snapshot_dependencies_for_a_buildtype.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_return_an_array.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_return_nil_if_there_are_no_snapshot_dependencies_defined.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_state/should_fetch_the_state_of_the_buildtype.yml +89 -0
- data/spec/cassettes/BuildTypes/GET/_buildtype_steps/should_fetch_the_build_configuration_steps_for_a_buildtype.yml +10 -9
- data/spec/cassettes/BuildTypes/GET/_buildtype_steps/should_return_an_array.yml +9 -9
- data/spec/cassettes/BuildTypes/GET/_buildtype_steps/should_return_nil_if_there_are_no_steps_defined.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_template/should_return_nil_if_the_buildtype_is_not_associated_with_a_template.yml +8 -6
- data/spec/cassettes/BuildTypes/GET/_buildtype_template/should_return_the_attributes_of_the_associated_template.yml +9 -8
- data/spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_fetch_the_build_configuration_triggers_for_a_buildtype.yml +8 -6
- data/spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_return_an_array.yml +8 -6
- data/spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_return_nil_if_there_are_no_triggers_defined.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtype_vcs_root_entries/should_fetch_the_build_configuration_vcs_root_entries_for_a_buildtype.yml +10 -8
- data/spec/cassettes/BuildTypes/GET/_buildtype_vcs_root_entries/should_return_an_array.yml +10 -8
- data/spec/cassettes/BuildTypes/GET/_buildtype_vcs_root_entries/should_return_nil_if_there_are_no_vcs_root_entries_defined.yml +9 -7
- data/spec/cassettes/BuildTypes/GET/_buildtypes/should_fetch_all_the_buildtypes.yml +9 -12
- data/spec/cassettes/BuildTypes/POST/_attach_vcs_root/should_attach_a_vcs_root_to_a_buildtype.yml +9 -9
- data/spec/cassettes/BuildTypes/POST/_create_agent_requirement/should_create_an_agent_requirement_for_a_buildtype.yml +10 -9
- data/spec/cassettes/BuildTypes/PUT/_set_build_step_field/should_disable_a_build_step.yml +14 -10
- data/spec/cassettes/BuildTypes/PUT/_set_build_step_field/should_enable_a_build_step.yml +18 -10
- data/spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_pause_a_project.yml +14 -10
- data/spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_set_a_projects_description.yml +15 -11
- data/spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_set_the_buildtype_name.yml +15 -11
- data/spec/cassettes/BuildTypes/PUT/_set_buildtype_parameter/should_set_a_buildtype_parameter.yml +15 -11
- data/spec/cassettes/Builds/DELETE/_unpin_build/should_unpin_a_build.yml +51 -6
- data/spec/cassettes/Builds/GET/_build/should_fetch_the_build_details.yml +53 -11
- data/spec/cassettes/Builds/GET/_build/should_raise_an_error_if_the_build_does_not_exist.yml +16 -13
- data/spec/cassettes/Builds/GET/_build_pinned_/should_return_false_when_a_build_is_not_pinned.yml +126 -0
- data/spec/cassettes/Builds/GET/_build_pinned_/should_return_true_when_a_build_is_pinned.yml +126 -0
- data/spec/cassettes/Builds/GET/_build_statistics/should_return_statistics_for_a_build.yml +50 -5
- data/spec/cassettes/Builds/GET/_build_tags/should_fetch_the_build_tags.yml +51 -6
- 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
- data/spec/cassettes/Builds/GET/_builds/should_allow_you_to_filter_by_multiple_build_locators.yml +9 -7
- data/spec/cassettes/Builds/GET/_builds/should_allow_you_to_filter_results_by_build_locators.yml +9 -7
- data/spec/cassettes/Builds/GET/_builds/should_fetch_all_the_builds.yml +9 -7
- 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
- data/spec/cassettes/Builds/PUT/_pin_build/should_pin_a_build.yml +49 -6
- data/spec/cassettes/Projects/DELETE/_delete_project/should_delete_a_project.yml +17 -14
- data/spec/cassettes/Projects/DELETE/_delete_project_parameter/should_delete_a_project_parameter.yml +91 -6
- data/spec/cassettes/Projects/GET/_project/should_fetch_a_single_project_by_id.yml +10 -10
- data/spec/cassettes/Projects/GET/_project/should_raise_an_error_if_the_project_does_not_exist.yml +9 -7
- data/spec/cassettes/Projects/GET/_project_buildtypes/should_fetch_all_the_buildTypes_for_a_project.yml +9 -8
- 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
- data/spec/cassettes/Projects/GET/_project_parameters/should_fetch_all_the_paramters_for_a_given_project.yml +9 -7
- data/spec/cassettes/Projects/GET/_project_parameters/should_return_nil_if_there_are_no_parameters_defined_for_a_project.yml +9 -7
- data/spec/cassettes/Projects/GET/_projects/should_fetch_projects.yml +9 -9
- data/spec/cassettes/Projects/POST/_copy_project/should_copy_a_project.yml +61 -15
- data/spec/cassettes/Projects/POST/_create_project/should_create_a_project.yml +9 -8
- data/spec/cassettes/Projects/PUT/_set_project_field/should_archive_a_project.yml +56 -10
- data/spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_description.yml +56 -10
- data/spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_name.yml +56 -10
- data/spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter.yml +56 -10
- data/spec/cassettes/VCSRoots/GET/_vcs_root_details/should_fetch_the_vcs_root_details.yml +53 -6
- data/spec/cassettes/VCSRoots/GET/_vcs_roots/should_fetch_vcs_roots.yml +10 -7
- 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
- data/spec/spec_helper.rb +1 -1
- data/spec/teamcity/api_spec.rb +0 -1
- data/spec/teamcity/client/builds_spec.rb +36 -56
- data/spec/teamcity/client/buildtypes_spec.rb +78 -42
- data/spec/teamcity/client/projects_spec.rb +41 -32
- data/spec/teamcity/client/vcs_roots_spec.rb +9 -29
- data/spec/teamcity/client_spec.rb +5 -1
- data/spec/teamcity/headers_spec.rb +43 -0
- data/spec/teamcity_spec.rb +1 -28
- data/teamcity-ruby-client.gemspec +1 -0
- metadata +21 -23
- 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
- data/spec/cassettes/Builds/GET/_build_tags/should_return_nil_if_there_are_no_build_tags_defined_for_a_build.yml +0 -44
- data/spec/cassettes/Builds/GET/_builds/should_allow_you_to_search_by_locator.yml +0 -44
- data/spec/cassettes/Projects/GET/_project_buildtypes/should_return_nil_if_the_project_does_not_have_any_build_build_types.yml +0 -44
- data/spec/cassettes/Projects/PUT/_set_project_field/should_un-archive_a_project.yml +0 -50
- data/spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter_with_a_boolean_value.yml +0 -40
- data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_shared_vcs_root.yml +0 -45
- data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_vcs_root_that_is_only_shared_within_a_project.yml +0 -48
data/spec/cassettes/BuildTypes/PUT/_set_buildtype_parameter/should_set_a_buildtype_parameter.yml
CHANGED
@@ -2,27 +2,27 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: put
|
5
|
-
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/
|
5
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/buildTypes/BuildTypeTests_PutSetBuildTypeParameters/parameters/test-setting-buildtype-parameters
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
|
-
string:
|
8
|
+
string: param-value
|
9
9
|
headers:
|
10
|
-
Accept:
|
11
|
-
- application/json; charset=utf-8
|
12
10
|
User-Agent:
|
13
|
-
- TeamCity Ruby Client 0.
|
11
|
+
- TeamCity Ruby Client 0.4.0
|
12
|
+
Accept:
|
13
|
+
- text/plain
|
14
14
|
Content-Type:
|
15
15
|
- text/plain
|
16
16
|
response:
|
17
17
|
status:
|
18
|
-
code:
|
19
|
-
message:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
20
|
headers:
|
21
21
|
Server:
|
22
22
|
- Apache-Coyote/1.1
|
23
23
|
Set-Cookie:
|
24
|
-
- JSESSIONID=A121E2C8864D517C191AAC59B4B7D6EA; Path=/; HttpOnly
|
25
24
|
- RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
25
|
+
- TCSESSIONID=6D26566BB7711798F748B359FC121618; Path=/; HttpOnly
|
26
26
|
Pragma:
|
27
27
|
- no-cache
|
28
28
|
Expires:
|
@@ -30,11 +30,15 @@ http_interactions:
|
|
30
30
|
Cache-Control:
|
31
31
|
- no-cache
|
32
32
|
- no-store
|
33
|
+
Content-Type:
|
34
|
+
- text/plain
|
35
|
+
Transfer-Encoding:
|
36
|
+
- chunked
|
33
37
|
Date:
|
34
|
-
-
|
38
|
+
- Wed, 14 Aug 2013 11:51:59 GMT
|
35
39
|
body:
|
36
40
|
encoding: US-ASCII
|
37
|
-
string:
|
41
|
+
string: param-value
|
38
42
|
http_version:
|
39
|
-
recorded_at:
|
43
|
+
recorded_at: Wed, 14 Aug 2013 11:51:59 GMT
|
40
44
|
recorded_with: VCR 2.4.0
|
@@ -1,16 +1,61 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
|
-
method:
|
5
|
-
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/
|
4
|
+
method: get
|
5
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds
|
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=DD1DE3B650BB01BEBEBEDDB5BE811580; 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 14:41:07 GMT
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ! '{"count":6,"build":[{"id":36,"number":"4","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T101733-0400","href":"/httpAuth/app/rest/builds/id:36","webUrl":"http://localhost:8111/viewLog.html?buildId=36&buildTypeId=BuildTests_GetBuildTests"},{"id":35,"number":"3","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100159-0400","href":"/httpAuth/app/rest/builds/id:35","webUrl":"http://localhost:8111/viewLog.html?buildId=35&buildTypeId=BuildTests_GetBuildTests"},{"id":34,"number":"2","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100151-0400","href":"/httpAuth/app/rest/builds/id:34","webUrl":"http://localhost:8111/viewLog.html?buildId=34&buildTypeId=BuildTests_GetBuildTests"},{"id":33,"number":"1","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100134-0400","href":"/httpAuth/app/rest/builds/id:33","webUrl":"http://localhost:8111/viewLog.html?buildId=33&buildTypeId=BuildTests_GetBuildTests"},{"id":32,"number":"2","status":"FAILURE","buildTypeId":"BuildTypeTests_GetBuildTypeWithInvestigations","startDate":"20130814T073131-0400","href":"/httpAuth/app/rest/builds/id:32","webUrl":"http://localhost:8111/viewLog.html?buildId=32&buildTypeId=BuildTypeTests_GetBuildTypeWithInvestigations"},{"id":31,"number":"1","status":"FAILURE","buildTypeId":"BuildTypeTests_GetBuildTypeWithInvestigations","startDate":"20130814T073100-0400","href":"/httpAuth/app/rest/builds/id:31","webUrl":"http://localhost:8111/viewLog.html?buildId=31&buildTypeId=BuildTypeTests_GetBuildTypeWithInvestigations"}]}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Wed, 14 Aug 2013 14:41:07 GMT
|
46
|
+
- request:
|
47
|
+
method: delete
|
48
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds/36/pin
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: ''
|
52
|
+
headers:
|
12
53
|
User-Agent:
|
13
|
-
- TeamCity Ruby Client 0.
|
54
|
+
- TeamCity Ruby Client 0.4.0
|
55
|
+
Accept:
|
56
|
+
- application/json; charset=utf-8
|
57
|
+
Content-Type:
|
58
|
+
- text/plain
|
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=ECEF901E911DFA5B320740401E61BB02; Path=/; HttpOnly
|
23
67
|
- RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
68
|
+
- TCSESSIONID=CAB4405286BEDEC9546164852929EA35; 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
|
-
-
|
77
|
+
- Wed, 14 Aug 2013 14:41:07 GMT
|
33
78
|
body:
|
34
79
|
encoding: US-ASCII
|
35
80
|
string: ''
|
36
81
|
http_version:
|
37
|
-
recorded_at:
|
82
|
+
recorded_at: Wed, 14 Aug 2013 14:41:07 GMT
|
38
83
|
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/
|
5
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds
|
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=DA78A978C3FF65602A60155D7ED9E4D5; 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 14:08:28 GMT
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ! '{"count":5,"build":[{"id":35,"number":"3","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100159-0400","href":"/httpAuth/app/rest/builds/id:35","webUrl":"http://localhost:8111/viewLog.html?buildId=35&buildTypeId=BuildTests_GetBuildTests"},{"id":34,"number":"2","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100151-0400","href":"/httpAuth/app/rest/builds/id:34","webUrl":"http://localhost:8111/viewLog.html?buildId=34&buildTypeId=BuildTests_GetBuildTests"},{"id":33,"number":"1","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100134-0400","href":"/httpAuth/app/rest/builds/id:33","webUrl":"http://localhost:8111/viewLog.html?buildId=33&buildTypeId=BuildTests_GetBuildTests"},{"id":32,"number":"2","status":"FAILURE","buildTypeId":"BuildTypeTests_GetBuildTypeWithInvestigations","startDate":"20130814T073131-0400","href":"/httpAuth/app/rest/builds/id:32","webUrl":"http://localhost:8111/viewLog.html?buildId=32&buildTypeId=BuildTypeTests_GetBuildTypeWithInvestigations"},{"id":31,"number":"1","status":"FAILURE","buildTypeId":"BuildTypeTests_GetBuildTypeWithInvestigations","startDate":"20130814T073100-0400","href":"/httpAuth/app/rest/builds/id:31","webUrl":"http://localhost:8111/viewLog.html?buildId=31&buildTypeId=BuildTypeTests_GetBuildTypeWithInvestigations"}]}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Wed, 14 Aug 2013 14:08:28 GMT
|
46
|
+
- request:
|
47
|
+
method: get
|
48
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds/id:35
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: ''
|
52
|
+
headers:
|
12
53
|
User-Agent:
|
13
|
-
- TeamCity Ruby Client 0.0
|
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=D2EA85979E1D8F7D6429B8530B5D8C77; Path=/; HttpOnly
|
25
69
|
- RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
70
|
+
- TCSESSIONID=A2117C063AF74E799F18E8CAF380BF52; Path=/; HttpOnly
|
26
71
|
Pragma:
|
27
72
|
- no-cache
|
28
73
|
Expires:
|
@@ -35,15 +80,12 @@ http_interactions:
|
|
35
80
|
Transfer-Encoding:
|
36
81
|
- chunked
|
37
82
|
Date:
|
38
|
-
-
|
83
|
+
- Wed, 14 Aug 2013 14:08:28 GMT
|
39
84
|
body:
|
40
85
|
encoding: US-ASCII
|
41
|
-
string: ! '{"id":
|
42
|
-
|
43
|
-
|
44
|
-
Agent"},"tags":null,"properties":null,"snapshot-dependencies":null,"artifact-dependencies":null,"revisions":{"revision":[{"version":"bb19f54ab1d7450bf85b060f9cc9b6218dd61e5b","vcs-root-instance":{"id":"1","vcs-root-id":"1","name":"teamcity
|
45
|
-
ruby client","href":"/guestAuth/app/rest/7.0/vcs-roots/id:1/instances/id:1"}}]},"triggered":{"date":"20130423T105906-0400","user":{"href":"/guestAuth/app/rest/7.0/users/id:1","id":1,"name":"Jay
|
46
|
-
Perry","username":"jperry"}},"changes":{"count":0,"href":"/guestAuth/app/rest/7.0/changes?build=id:2"}}'
|
86
|
+
string: ! '{"id":35,"number":"3","status":"SUCCESS","href":"/httpAuth/app/rest/builds/id:35","webUrl":"http://localhost:8111/viewLog.html?buildId=35&buildTypeId=BuildTests_GetBuildTests","personal":false,"history":false,"pinned":false,"statusText":"Success","buildType":{"id":"BuildTests_GetBuildTests","name":"GetBuildTests","href":"/httpAuth/app/rest/buildTypes/id:BuildTests_GetBuildTests","projectName":"BuildTests","projectId":"BuildTests","webUrl":"http://localhost:8111/viewType.html?buildTypeId=BuildTests_GetBuildTests"},"startDate":"20130814T100159-0400","finishDate":"20130814T100201-0400","agent":{"name":"Default
|
87
|
+
Agent","id":1,"href":"/httpAuth/app/rest/agents/id:1"},"tags":{"tag":[]},"properties":{"property":[]},"snapshot-dependencies":{"count":0,"build":[]},"artifact-dependencies":{"count":0,"build":[]},"revisions":{"revision":[]},"triggered":{"date":"20130814T100159-0400","user":{"username":"jperry","name":"Jay
|
88
|
+
Perry","id":1,"href":"/httpAuth/app/rest/users/id:1"}},"changes":{"count":0,"href":"/httpAuth/app/rest/changes?build=id:35"},"relatedIssues":{"href":"/httpAuth/app/rest/builds/id:35/relatedIssues"},"artifacts":{"href":"/httpAuth/app/rest/builds/id:35/artifacts/children"}}'
|
47
89
|
http_version:
|
48
|
-
recorded_at:
|
90
|
+
recorded_at: Wed, 14 Aug 2013 14:08:28 GMT
|
49
91
|
recorded_with: VCR 2.4.0
|
@@ -2,27 +2,29 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://localhost:8111/
|
5
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds/id:doesnotexist
|
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
|
-
|
13
|
-
-
|
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:
|
17
19
|
status:
|
18
|
-
code:
|
19
|
-
message:
|
20
|
+
code: 400
|
21
|
+
message: Bad Request
|
20
22
|
headers:
|
21
23
|
Server:
|
22
24
|
- Apache-Coyote/1.1
|
23
25
|
Set-Cookie:
|
24
|
-
- JSESSIONID=9AF99299E2C9B5FBEE57338AE5696FC3; Path=/; HttpOnly
|
25
26
|
- RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
27
|
+
- TCSESSIONID=87B31C0E67F8CBB479DF910003EA0BF0; Path=/; HttpOnly
|
26
28
|
Pragma:
|
27
29
|
- no-cache
|
28
30
|
Expires:
|
@@ -35,16 +37,17 @@ http_interactions:
|
|
35
37
|
Transfer-Encoding:
|
36
38
|
- chunked
|
37
39
|
Date:
|
38
|
-
-
|
40
|
+
- Wed, 14 Aug 2013 14:08:54 GMT
|
41
|
+
Connection:
|
42
|
+
- close
|
39
43
|
body:
|
40
44
|
encoding: US-ASCII
|
41
|
-
string: ! 'Error has occurred during request processing (
|
45
|
+
string: ! 'Error has occurred during request processing (Bad Request).
|
42
46
|
|
43
|
-
Error: jetbrains.buildServer.server.rest.errors.
|
44
|
-
|
47
|
+
Error: jetbrains.buildServer.server.rest.errors.LocatorProcessException: Invalid
|
48
|
+
value of dimension ''id'': ''doesnotexist''. Should be a number.
|
45
49
|
|
46
|
-
|
47
|
-
user has permissions to access the entity.'
|
50
|
+
Invalid request. Check locator is specified correctly.'
|
48
51
|
http_version:
|
49
|
-
recorded_at:
|
52
|
+
recorded_at: Wed, 14 Aug 2013 14:08:54 GMT
|
50
53
|
recorded_with: VCR 2.4.0
|
data/spec/cassettes/Builds/GET/_build_pinned_/should_return_false_when_a_build_is_not_pinned.yml
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- TeamCity Ruby Client 0.4.0
|
12
|
+
Accept:
|
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=46905FE125A0E871B212DE22A5BE026F; 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 14:29:57 GMT
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ! '{"count":6,"build":[{"id":36,"number":"4","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T101733-0400","href":"/httpAuth/app/rest/builds/id:36","webUrl":"http://localhost:8111/viewLog.html?buildId=36&buildTypeId=BuildTests_GetBuildTests"},{"id":35,"number":"3","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100159-0400","href":"/httpAuth/app/rest/builds/id:35","webUrl":"http://localhost:8111/viewLog.html?buildId=35&buildTypeId=BuildTests_GetBuildTests"},{"id":34,"number":"2","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100151-0400","href":"/httpAuth/app/rest/builds/id:34","webUrl":"http://localhost:8111/viewLog.html?buildId=34&buildTypeId=BuildTests_GetBuildTests"},{"id":33,"number":"1","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100134-0400","href":"/httpAuth/app/rest/builds/id:33","webUrl":"http://localhost:8111/viewLog.html?buildId=33&buildTypeId=BuildTests_GetBuildTests"},{"id":32,"number":"2","status":"FAILURE","buildTypeId":"BuildTypeTests_GetBuildTypeWithInvestigations","startDate":"20130814T073131-0400","href":"/httpAuth/app/rest/builds/id:32","webUrl":"http://localhost:8111/viewLog.html?buildId=32&buildTypeId=BuildTypeTests_GetBuildTypeWithInvestigations"},{"id":31,"number":"1","status":"FAILURE","buildTypeId":"BuildTypeTests_GetBuildTypeWithInvestigations","startDate":"20130814T073100-0400","href":"/httpAuth/app/rest/builds/id:31","webUrl":"http://localhost:8111/viewLog.html?buildId=31&buildTypeId=BuildTypeTests_GetBuildTypeWithInvestigations"}]}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Wed, 14 Aug 2013 14:29:57 GMT
|
46
|
+
- request:
|
47
|
+
method: delete
|
48
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds/36/pin
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: ''
|
52
|
+
headers:
|
53
|
+
User-Agent:
|
54
|
+
- TeamCity Ruby Client 0.4.0
|
55
|
+
Accept:
|
56
|
+
- application/json; charset=utf-8
|
57
|
+
Content-Type:
|
58
|
+
- text/plain
|
59
|
+
response:
|
60
|
+
status:
|
61
|
+
code: 204
|
62
|
+
message: No Content
|
63
|
+
headers:
|
64
|
+
Server:
|
65
|
+
- Apache-Coyote/1.1
|
66
|
+
Set-Cookie:
|
67
|
+
- RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
68
|
+
- TCSESSIONID=28D7D536AC7440B8A3C850BD88A017D0; Path=/; HttpOnly
|
69
|
+
Pragma:
|
70
|
+
- no-cache
|
71
|
+
Expires:
|
72
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
73
|
+
Cache-Control:
|
74
|
+
- no-cache
|
75
|
+
- no-store
|
76
|
+
Date:
|
77
|
+
- Wed, 14 Aug 2013 14:29:57 GMT
|
78
|
+
body:
|
79
|
+
encoding: US-ASCII
|
80
|
+
string: ''
|
81
|
+
http_version:
|
82
|
+
recorded_at: Wed, 14 Aug 2013 14:29:57 GMT
|
83
|
+
- request:
|
84
|
+
method: get
|
85
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds/36/pin
|
86
|
+
body:
|
87
|
+
encoding: US-ASCII
|
88
|
+
string: ''
|
89
|
+
headers:
|
90
|
+
User-Agent:
|
91
|
+
- TeamCity Ruby Client 0.4.0
|
92
|
+
Accept:
|
93
|
+
- text/plain
|
94
|
+
Content-Type:
|
95
|
+
- text/plain
|
96
|
+
Accept-Encoding:
|
97
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
98
|
+
response:
|
99
|
+
status:
|
100
|
+
code: 200
|
101
|
+
message: OK
|
102
|
+
headers:
|
103
|
+
Server:
|
104
|
+
- Apache-Coyote/1.1
|
105
|
+
Set-Cookie:
|
106
|
+
- RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
107
|
+
- TCSESSIONID=43E3F0754810575EF5CABDA467B92AE0; Path=/; HttpOnly
|
108
|
+
Pragma:
|
109
|
+
- no-cache
|
110
|
+
Expires:
|
111
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
112
|
+
Cache-Control:
|
113
|
+
- no-cache
|
114
|
+
- no-store
|
115
|
+
Content-Type:
|
116
|
+
- text/plain
|
117
|
+
Transfer-Encoding:
|
118
|
+
- chunked
|
119
|
+
Date:
|
120
|
+
- Wed, 14 Aug 2013 14:29:57 GMT
|
121
|
+
body:
|
122
|
+
encoding: US-ASCII
|
123
|
+
string: 'false'
|
124
|
+
http_version:
|
125
|
+
recorded_at: Wed, 14 Aug 2013 14:29:57 GMT
|
126
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,126 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- TeamCity Ruby Client 0.4.0
|
12
|
+
Accept:
|
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=C5134E30C877F342C7F4C2D6E632993B; 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 14:35:35 GMT
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ! '{"count":6,"build":[{"id":36,"number":"4","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T101733-0400","href":"/httpAuth/app/rest/builds/id:36","webUrl":"http://localhost:8111/viewLog.html?buildId=36&buildTypeId=BuildTests_GetBuildTests"},{"id":35,"number":"3","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100159-0400","href":"/httpAuth/app/rest/builds/id:35","webUrl":"http://localhost:8111/viewLog.html?buildId=35&buildTypeId=BuildTests_GetBuildTests"},{"id":34,"number":"2","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100151-0400","href":"/httpAuth/app/rest/builds/id:34","webUrl":"http://localhost:8111/viewLog.html?buildId=34&buildTypeId=BuildTests_GetBuildTests"},{"id":33,"number":"1","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100134-0400","href":"/httpAuth/app/rest/builds/id:33","webUrl":"http://localhost:8111/viewLog.html?buildId=33&buildTypeId=BuildTests_GetBuildTests"},{"id":32,"number":"2","status":"FAILURE","buildTypeId":"BuildTypeTests_GetBuildTypeWithInvestigations","startDate":"20130814T073131-0400","href":"/httpAuth/app/rest/builds/id:32","webUrl":"http://localhost:8111/viewLog.html?buildId=32&buildTypeId=BuildTypeTests_GetBuildTypeWithInvestigations"},{"id":31,"number":"1","status":"FAILURE","buildTypeId":"BuildTypeTests_GetBuildTypeWithInvestigations","startDate":"20130814T073100-0400","href":"/httpAuth/app/rest/builds/id:31","webUrl":"http://localhost:8111/viewLog.html?buildId=31&buildTypeId=BuildTypeTests_GetBuildTypeWithInvestigations"}]}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Wed, 14 Aug 2013 14:35:35 GMT
|
46
|
+
- request:
|
47
|
+
method: put
|
48
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds/36/pin
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: ''
|
52
|
+
headers:
|
53
|
+
User-Agent:
|
54
|
+
- TeamCity Ruby Client 0.4.0
|
55
|
+
Accept:
|
56
|
+
- text/plain
|
57
|
+
Content-Type:
|
58
|
+
- text/plain
|
59
|
+
response:
|
60
|
+
status:
|
61
|
+
code: 204
|
62
|
+
message: No Content
|
63
|
+
headers:
|
64
|
+
Server:
|
65
|
+
- Apache-Coyote/1.1
|
66
|
+
Set-Cookie:
|
67
|
+
- RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
68
|
+
- TCSESSIONID=30819604F9D5D9D4BD005AD5AB10AA9A; Path=/; HttpOnly
|
69
|
+
Pragma:
|
70
|
+
- no-cache
|
71
|
+
Expires:
|
72
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
73
|
+
Cache-Control:
|
74
|
+
- no-cache
|
75
|
+
- no-store
|
76
|
+
Date:
|
77
|
+
- Wed, 14 Aug 2013 14:35:35 GMT
|
78
|
+
body:
|
79
|
+
encoding: US-ASCII
|
80
|
+
string: ''
|
81
|
+
http_version:
|
82
|
+
recorded_at: Wed, 14 Aug 2013 14:35:35 GMT
|
83
|
+
- request:
|
84
|
+
method: get
|
85
|
+
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds/36/pin
|
86
|
+
body:
|
87
|
+
encoding: US-ASCII
|
88
|
+
string: ''
|
89
|
+
headers:
|
90
|
+
User-Agent:
|
91
|
+
- TeamCity Ruby Client 0.4.0
|
92
|
+
Accept:
|
93
|
+
- text/plain
|
94
|
+
Content-Type:
|
95
|
+
- text/plain
|
96
|
+
Accept-Encoding:
|
97
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
98
|
+
response:
|
99
|
+
status:
|
100
|
+
code: 200
|
101
|
+
message: OK
|
102
|
+
headers:
|
103
|
+
Server:
|
104
|
+
- Apache-Coyote/1.1
|
105
|
+
Set-Cookie:
|
106
|
+
- RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
107
|
+
- TCSESSIONID=BA08ACB5B1A1AE69A8CD127F7D534058; Path=/; HttpOnly
|
108
|
+
Pragma:
|
109
|
+
- no-cache
|
110
|
+
Expires:
|
111
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
112
|
+
Cache-Control:
|
113
|
+
- no-cache
|
114
|
+
- no-store
|
115
|
+
Content-Type:
|
116
|
+
- text/plain
|
117
|
+
Transfer-Encoding:
|
118
|
+
- chunked
|
119
|
+
Date:
|
120
|
+
- Wed, 14 Aug 2013 14:35:35 GMT
|
121
|
+
body:
|
122
|
+
encoding: US-ASCII
|
123
|
+
string: 'true'
|
124
|
+
http_version:
|
125
|
+
recorded_at: Wed, 14 Aug 2013 14:35:35 GMT
|
126
|
+
recorded_with: VCR 2.4.0
|