teamcity_ruby 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. data/lib/teamcity_ruby/agent_pool.rb +39 -0
  2. data/lib/teamcity_ruby/version.rb +1 -1
  3. data/lib/teamcity_ruby.rb +1 -0
  4. data/spec/cassettes/TeamcityRuby_AgentPool/creates_an_agent_pool.yml +299 -0
  5. data/spec/cassettes/TeamcityRuby_BuildConfiguration/an_existing_build_configuration/has_a_build_step_added_to_it.yml +107 -107
  6. data/spec/cassettes/TeamcityRuby_BuildConfiguration/an_existing_build_configuration/has_a_build_trigger_added_to_it.yml +95 -95
  7. data/spec/cassettes/TeamcityRuby_BuildConfiguration/an_existing_build_configuration/has_a_vcs_root_attached_to_it_with_specific_checkout_rules.yml +109 -109
  8. data/spec/cassettes/TeamcityRuby_BuildConfiguration/an_existing_build_configuration/has_settings_definitions.yml +107 -107
  9. data/spec/cassettes/TeamcityRuby_BuildConfiguration/fetches_a_specific_build_configuration_by_id.yml +83 -83
  10. data/spec/cassettes/TeamcityRuby_BuildConfiguration/lists_all_build_configurations.yml +103 -169
  11. data/spec/cassettes/TeamcityRuby_Project/creates_a_project_copying_its_settings_from_a_source_project.yml +96 -96
  12. data/spec/cassettes/TeamcityRuby_Project/creates_a_project_with_a_parent_project.yml +49 -49
  13. data/spec/cassettes/TeamcityRuby_Project/destroys_a_specific_project.yml +69 -69
  14. data/spec/cassettes/TeamcityRuby_Project/fetches_a_specific_project_by_id_locator.yml +69 -69
  15. data/spec/cassettes/TeamcityRuby_Project/fetches_a_specific_project_by_name_locator.yml +59 -59
  16. data/spec/cassettes/TeamcityRuby_Project/lists_all_projects_including_root_built_in_on_TeamCity_.yml +71 -71
  17. data/spec/cassettes/TeamcityRuby_VcsRoot/lists_all_vcs_roots.yml +51 -51
  18. data/spec/spec_helper.rb +6 -0
  19. data/spec/teamcity_ruby/agent_pool_spec.rb +25 -0
  20. metadata +8 -3
@@ -1,5 +1,4 @@
1
1
  ---
2
- recorded_with: VCR 2.4.0
3
2
  http_interactions:
4
3
  - request:
5
4
  method: get
@@ -16,28 +15,28 @@ http_interactions:
16
15
  code: 200
17
16
  message: OK
18
17
  headers:
19
- Cache-Control:
20
- - no-cache
21
- - no-store
22
18
  Set-Cookie:
23
19
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
24
- - TCSESSIONID=D62C33084B56BE3CFA36C0B509FC4A23; Path=/; HttpOnly
20
+ - TCSESSIONID=6264841749C6CF2E1CF9E7237B6962AD; Path=/; HttpOnly
21
+ Pragma:
22
+ - no-cache
23
+ Content-Type:
24
+ - application/json
25
+ Server:
26
+ - Apache-Coyote/1.1
27
+ Date:
28
+ - Fri, 23 May 2014 07:28:36 GMT
25
29
  Expires:
26
30
  - Thu, 01 Jan 1970 00:00:00 GMT
27
31
  Transfer-Encoding:
28
32
  - chunked
29
- Server:
30
- - Apache-Coyote/1.1
31
- Pragma:
33
+ Cache-Control:
32
34
  - no-cache
33
- Date:
34
- - Fri, 23 May 2014 05:17:08 GMT
35
- Content-Type:
36
- - application/json
35
+ - no-store
37
36
  body:
38
37
  string: "{\"project\":[{\"id\":\"_Root\",\"name\":\"<Root project>\",\"href\":\"/httpAuth/app/rest/projects/id:_Root\",\"archived\":false,\"webUrl\":\"http://localhost:8111/project.html?projectId=_Root\"},{\"id\":\"SampleProject\",\"name\":\"Sample Project\",\"href\":\"/httpAuth/app/rest/projects/id:SampleProject\",\"archived\":false,\"webUrl\":\"http://localhost:8111/project.html?projectId=SampleProject\",\"parentProjectId\":\"_Root\"}]}"
39
38
  http_version:
40
- recorded_at: Fri, 23 May 2014 05:17:08 GMT
39
+ recorded_at: Fri, 23 May 2014 07:28:36 GMT
41
40
  - request:
42
41
  method: delete
43
42
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/projects/id:_Root
@@ -53,31 +52,31 @@ http_interactions:
53
52
  code: 403
54
53
  message: Forbidden
55
54
  headers:
56
- Cache-Control:
57
- - no-cache
58
- - no-store
59
55
  Set-Cookie:
60
56
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
61
- - TCSESSIONID=9156522297A2F05C66816C7918EC3C0E; Path=/; HttpOnly
57
+ - TCSESSIONID=A73B0280D96247113DEDB57AFE7BCAC5; Path=/; HttpOnly
58
+ Pragma:
59
+ - no-cache
60
+ Content-Type:
61
+ - text/plain
62
+ Server:
63
+ - Apache-Coyote/1.1
64
+ Date:
65
+ - Fri, 23 May 2014 07:28:36 GMT
62
66
  Expires:
63
67
  - Thu, 01 Jan 1970 00:00:00 GMT
64
68
  Transfer-Encoding:
65
69
  - chunked
66
- Server:
67
- - Apache-Coyote/1.1
68
- Pragma:
70
+ Cache-Control:
69
71
  - no-cache
70
- Date:
71
- - Fri, 23 May 2014 05:17:08 GMT
72
- Content-Type:
73
- - text/plain
72
+ - no-store
74
73
  body:
75
74
  string: |-
76
75
  Error has occurred during request processing (Forbidden).
77
76
  Error: jetbrains.buildServer.serverSide.auth.AccessDeniedException: Root project cannot be removed
78
77
  Access denied. Check the user has enough permissions to perform the operation.
79
78
  http_version:
80
- recorded_at: Fri, 23 May 2014 05:17:08 GMT
79
+ recorded_at: Fri, 23 May 2014 07:28:36 GMT
81
80
  - request:
82
81
  method: delete
83
82
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/projects/id:SampleProject
@@ -93,24 +92,24 @@ http_interactions:
93
92
  code: 204
94
93
  message: No Content
95
94
  headers:
96
- Cache-Control:
97
- - no-cache
98
- - no-store
99
95
  Set-Cookie:
100
96
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
101
- - TCSESSIONID=B47E7E7464C6B27929C28769E3E31F2D; Path=/; HttpOnly
102
- Expires:
103
- - Thu, 01 Jan 1970 00:00:00 GMT
104
- Server:
105
- - Apache-Coyote/1.1
97
+ - TCSESSIONID=011B9AFE40A73B26B48512DD82E17EED; Path=/; HttpOnly
106
98
  Pragma:
107
99
  - no-cache
100
+ Server:
101
+ - Apache-Coyote/1.1
108
102
  Date:
109
- - Fri, 23 May 2014 05:17:08 GMT
103
+ - Fri, 23 May 2014 07:28:36 GMT
104
+ Expires:
105
+ - Thu, 01 Jan 1970 00:00:00 GMT
106
+ Cache-Control:
107
+ - no-cache
108
+ - no-store
110
109
  body:
111
110
  string: ""
112
111
  http_version:
113
- recorded_at: Fri, 23 May 2014 05:17:08 GMT
112
+ recorded_at: Fri, 23 May 2014 07:28:36 GMT
114
113
  - request:
115
114
  method: get
116
115
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/vcs-roots
@@ -126,28 +125,28 @@ http_interactions:
126
125
  code: 200
127
126
  message: OK
128
127
  headers:
129
- Cache-Control:
130
- - no-cache
131
- - no-store
132
128
  Set-Cookie:
133
129
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
134
- - TCSESSIONID=3828B620EFE09CDC8449306A20272DC1; Path=/; HttpOnly
130
+ - TCSESSIONID=6DE693E59BCEE03E2108E7333D43EB1E; Path=/; HttpOnly
131
+ Pragma:
132
+ - no-cache
133
+ Content-Type:
134
+ - application/json
135
+ Server:
136
+ - Apache-Coyote/1.1
137
+ Date:
138
+ - Fri, 23 May 2014 07:28:36 GMT
135
139
  Expires:
136
140
  - Thu, 01 Jan 1970 00:00:00 GMT
137
141
  Transfer-Encoding:
138
142
  - chunked
139
- Server:
140
- - Apache-Coyote/1.1
141
- Pragma:
143
+ Cache-Control:
142
144
  - no-cache
143
- Date:
144
- - Fri, 23 May 2014 05:17:08 GMT
145
- Content-Type:
146
- - application/json
145
+ - no-store
147
146
  body:
148
147
  string: "{\"count\":0,\"vcs-root\":[]}"
149
148
  http_version:
150
- recorded_at: Fri, 23 May 2014 05:17:08 GMT
149
+ recorded_at: Fri, 23 May 2014 07:28:36 GMT
151
150
  - request:
152
151
  method: post
153
152
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/projects
@@ -163,33 +162,33 @@ http_interactions:
163
162
  code: 200
164
163
  message: OK
165
164
  headers:
166
- Cache-Control:
167
- - no-cache
168
- - no-store
169
165
  Set-Cookie:
170
166
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
171
- - TCSESSIONID=4C96C089F6C9B5936E1C3AA5C199721F; Path=/; HttpOnly
167
+ - TCSESSIONID=77488D99C0F6EADBE3F937E0E021CF0B; Path=/; HttpOnly
168
+ Pragma:
169
+ - no-cache
170
+ Content-Type:
171
+ - application/json
172
+ Server:
173
+ - Apache-Coyote/1.1
174
+ Date:
175
+ - Fri, 23 May 2014 07:28:36 GMT
172
176
  Expires:
173
177
  - Thu, 01 Jan 1970 00:00:00 GMT
174
178
  Transfer-Encoding:
175
179
  - chunked
176
- Server:
177
- - Apache-Coyote/1.1
178
- Pragma:
180
+ Cache-Control:
179
181
  - no-cache
180
- Date:
181
- - Fri, 23 May 2014 05:17:08 GMT
182
- Content-Type:
183
- - application/json
182
+ - no-store
184
183
  body:
185
184
  string: "{\"id\":\"SampleProject\",\"name\":\"Sample Project\",\"href\":\"/httpAuth/app/rest/projects/id:SampleProject\",\"archived\":false,\"webUrl\":\"http://localhost:8111/project.html?projectId=SampleProject\",\"parentProjectId\":\"_Root\"}"
186
185
  http_version:
187
- recorded_at: Fri, 23 May 2014 05:17:09 GMT
186
+ recorded_at: Fri, 23 May 2014 07:28:36 GMT
188
187
  - request:
189
188
  method: post
190
189
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/vcs-roots
191
190
  body:
192
- string: "{\"vcsName\":\"jetbrains.git\",\"name\":\"Sample VCS Root\",\"projectLocator\":\"id:_Root\",\"properties\":{\"property\":[]}}"
191
+ string: "{\"projectLocator\":\"id:_Root\",\"vcsName\":\"jetbrains.git\",\"name\":\"Sample VCS Root\",\"properties\":{\"property\":[]}}"
193
192
  headers:
194
193
  Accept:
195
194
  - application/json
@@ -200,28 +199,28 @@ http_interactions:
200
199
  code: 200
201
200
  message: OK
202
201
  headers:
203
- Cache-Control:
204
- - no-cache
205
- - no-store
206
202
  Set-Cookie:
207
203
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
208
- - TCSESSIONID=9A2D848F221344D45BA2C822872A24F6; Path=/; HttpOnly
204
+ - TCSESSIONID=2F921649892A339D8AE7804761A628EA; Path=/; HttpOnly
205
+ Pragma:
206
+ - no-cache
207
+ Content-Type:
208
+ - application/json
209
+ Server:
210
+ - Apache-Coyote/1.1
211
+ Date:
212
+ - Fri, 23 May 2014 07:28:36 GMT
209
213
  Expires:
210
214
  - Thu, 01 Jan 1970 00:00:00 GMT
211
215
  Transfer-Encoding:
212
216
  - chunked
213
- Server:
214
- - Apache-Coyote/1.1
215
- Pragma:
217
+ Cache-Control:
216
218
  - no-cache
217
- Date:
218
- - Fri, 23 May 2014 05:17:08 GMT
219
- Content-Type:
220
- - application/json
219
+ - no-store
221
220
  body:
222
221
  string: "{\"id\":\"Root_SampleVcsRoot\",\"name\":\"Sample VCS Root\",\"vcsName\":\"jetbrains.git\",\"status\":\"NOT_MONITORED\",\"lastChecked\":\"20140523T040300+0000\",\"href\":\"/httpAuth/app/rest/vcs-roots/id:Root_SampleVcsRoot\",\"project\":{\"id\":\"_Root\",\"name\":\"<Root project>\",\"href\":\"/httpAuth/app/rest/projects/id:_Root\",\"archived\":false,\"webUrl\":\"http://localhost:8111/project.html?projectId=_Root\"},\"properties\":{\"property\":[]},\"vcsRootInstances\":{\"href\":\"/httpAuth/app/rest/vcs-root-instances?locator=vcsRoot:(id:Root_SampleVcsRoot)\"}}"
223
222
  http_version:
224
- recorded_at: Fri, 23 May 2014 05:17:09 GMT
223
+ recorded_at: Fri, 23 May 2014 07:28:37 GMT
225
224
  - request:
226
225
  method: post
227
226
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/projects/id:SampleProject/buildTypes
@@ -237,33 +236,33 @@ http_interactions:
237
236
  code: 200
238
237
  message: OK
239
238
  headers:
240
- Cache-Control:
241
- - no-cache
242
- - no-store
243
239
  Set-Cookie:
244
240
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
245
- - TCSESSIONID=DB69044914CEC6CF226FAC9CE9459943; Path=/; HttpOnly
241
+ - TCSESSIONID=ED6278B2871CF800A5A0D0AB489AADF2; Path=/; HttpOnly
242
+ Pragma:
243
+ - no-cache
244
+ Content-Type:
245
+ - application/json
246
+ Server:
247
+ - Apache-Coyote/1.1
248
+ Date:
249
+ - Fri, 23 May 2014 07:28:36 GMT
246
250
  Expires:
247
251
  - Thu, 01 Jan 1970 00:00:00 GMT
248
252
  Transfer-Encoding:
249
253
  - chunked
250
- Server:
251
- - Apache-Coyote/1.1
252
- Pragma:
254
+ Cache-Control:
253
255
  - no-cache
254
- Date:
255
- - Fri, 23 May 2014 05:17:08 GMT
256
- Content-Type:
257
- - application/json
256
+ - no-store
258
257
  body:
259
258
  string: "{\"id\":\"SampleProject_SampleBuildConfiguration\",\"name\":\"Sample Build Configuration\",\"href\":\"/httpAuth/app/rest/buildTypes/id:SampleProject_SampleBuildConfiguration\",\"webUrl\":\"http://localhost:8111/viewType.html?buildTypeId=SampleProject_SampleBuildConfiguration\",\"paused\":false,\"project\":{\"id\":\"SampleProject\",\"name\":\"Sample Project\",\"href\":\"/httpAuth/app/rest/projects/id:SampleProject\",\"archived\":false,\"webUrl\":\"http://localhost:8111/project.html?projectId=SampleProject\",\"parentProjectId\":\"_Root\"},\"builds\":{\"href\":\"/httpAuth/app/rest/buildTypes/id:SampleProject_SampleBuildConfiguration/builds/\"},\"vcs-root-entries\":{\"vcs-root-entry\":[]},\"settings\":{\"property\":[{\"name\":\"allowExternalStatus\",\"value\":\"false\"},{\"name\":\"artifactRules\",\"value\":\"\"},{\"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\":[]}}"
260
259
  http_version:
261
- recorded_at: Fri, 23 May 2014 05:17:09 GMT
260
+ recorded_at: Fri, 23 May 2014 07:28:37 GMT
262
261
  - request:
263
262
  method: post
264
263
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/buildTypes/id:SampleProject_SampleBuildConfiguration/vcs-root-entries
265
264
  body:
266
- string: "{\"checkout-rules\":\"+:trunk => .\",\"vcs-root\":{\"id\":\"Root_SampleVcsRoot\"}}"
265
+ string: "{\"vcs-root\":{\"id\":\"Root_SampleVcsRoot\"},\"checkout-rules\":\"+:trunk => .\"}"
267
266
  headers:
268
267
  Accept:
269
268
  - application/json
@@ -274,28 +273,28 @@ http_interactions:
274
273
  code: 200
275
274
  message: OK
276
275
  headers:
277
- Cache-Control:
278
- - no-cache
279
- - no-store
280
276
  Set-Cookie:
281
277
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
282
- - TCSESSIONID=E7F827DEE4C4D3699850BE01DF63C64C; Path=/; HttpOnly
278
+ - TCSESSIONID=266533D9F9497A8FE5AD48F1FFD15384; Path=/; HttpOnly
279
+ Pragma:
280
+ - no-cache
281
+ Content-Type:
282
+ - application/json
283
+ Server:
284
+ - Apache-Coyote/1.1
285
+ Date:
286
+ - Fri, 23 May 2014 07:28:36 GMT
283
287
  Expires:
284
288
  - Thu, 01 Jan 1970 00:00:00 GMT
285
289
  Transfer-Encoding:
286
290
  - chunked
287
- Server:
288
- - Apache-Coyote/1.1
289
- Pragma:
291
+ Cache-Control:
290
292
  - no-cache
291
- Date:
292
- - Fri, 23 May 2014 05:17:08 GMT
293
- Content-Type:
294
- - application/json
293
+ - no-store
295
294
  body:
296
295
  string: "{\"id\":\"Root_SampleVcsRoot\",\"vcs-root\":{\"id\":\"Root_SampleVcsRoot\",\"name\":\"Sample VCS Root\",\"href\":\"/httpAuth/app/rest/vcs-roots/id:Root_SampleVcsRoot\"},\"checkout-rules\":\"+:trunk => .\"}"
297
296
  http_version:
298
- recorded_at: Fri, 23 May 2014 05:17:09 GMT
297
+ recorded_at: Fri, 23 May 2014 07:28:37 GMT
299
298
  - request:
300
299
  method: get
301
300
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/buildTypes/id:SampleProject_SampleBuildConfiguration/vcs-root-entries
@@ -311,25 +310,26 @@ http_interactions:
311
310
  code: 200
312
311
  message: OK
313
312
  headers:
314
- Cache-Control:
315
- - no-cache
316
- - no-store
317
313
  Set-Cookie:
318
314
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
319
- - TCSESSIONID=B3A2797D9FF1252175922E5CC5B2EBA6; Path=/; HttpOnly
315
+ - TCSESSIONID=184E06B4EB558410996160574B923D5A; Path=/; HttpOnly
316
+ Pragma:
317
+ - no-cache
318
+ Content-Type:
319
+ - application/json
320
+ Server:
321
+ - Apache-Coyote/1.1
322
+ Date:
323
+ - Fri, 23 May 2014 07:28:36 GMT
320
324
  Expires:
321
325
  - Thu, 01 Jan 1970 00:00:00 GMT
322
326
  Transfer-Encoding:
323
327
  - chunked
324
- Server:
325
- - Apache-Coyote/1.1
326
- Pragma:
328
+ Cache-Control:
327
329
  - no-cache
328
- Date:
329
- - Fri, 23 May 2014 05:17:08 GMT
330
- Content-Type:
331
- - application/json
330
+ - no-store
332
331
  body:
333
332
  string: "{\"vcs-root-entry\":[{\"id\":\"Root_SampleVcsRoot\",\"vcs-root\":{\"id\":\"Root_SampleVcsRoot\",\"name\":\"Sample VCS Root\",\"href\":\"/httpAuth/app/rest/vcs-roots/id:Root_SampleVcsRoot\"},\"checkout-rules\":\"+:trunk => .\"}]}"
334
333
  http_version:
335
- recorded_at: Fri, 23 May 2014 05:17:09 GMT
334
+ recorded_at: Fri, 23 May 2014 07:28:37 GMT
335
+ recorded_with: VCR 2.4.0