teamcity_ruby 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
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=92E11DFE580861E3D734DE415A844731; Path=/; HttpOnly
20
+ - TCSESSIONID=BF77A4FE5FF9AED2BA0EC811E6D653EB; 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:37 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:09 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:09 GMT
39
+ recorded_at: Fri, 23 May 2014 07:28:37 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=D1707138DBFCFD7A269BE91BBD3186C4; Path=/; HttpOnly
57
+ - TCSESSIONID=0A1A59FFE4A172FF87429038FDA2A637; 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:37 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:09 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:09 GMT
79
+ recorded_at: Fri, 23 May 2014 07:28:37 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=09CECB0D08B8BEF13C071CA954DF8EDD; Path=/; HttpOnly
102
- Expires:
103
- - Thu, 01 Jan 1970 00:00:00 GMT
104
- Server:
105
- - Apache-Coyote/1.1
97
+ - TCSESSIONID=69D48F18BC2DC0A6980A2F1AF4C71770; 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:09 GMT
103
+ - Fri, 23 May 2014 07:28:37 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:09 GMT
112
+ recorded_at: Fri, 23 May 2014 07:28:37 GMT
114
113
  - request:
115
114
  method: post
116
115
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/projects
@@ -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=BD792D7B325D3F9EBDDF3DA52366302E; Path=/; HttpOnly
130
+ - TCSESSIONID=1A415E1F63B0868154CBB5B9F7C9BADE; 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:37 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:09 GMT
145
- Content-Type:
146
- - application/json
145
+ - no-store
147
146
  body:
148
147
  string: "{\"id\":\"Project1\",\"name\":\"Project 1\",\"href\":\"/httpAuth/app/rest/projects/id:Project1\",\"archived\":false,\"webUrl\":\"http://localhost:8111/project.html?projectId=Project1\",\"parentProjectId\":\"_Root\"}"
149
148
  http_version:
150
- recorded_at: Fri, 23 May 2014 05:17:09 GMT
149
+ recorded_at: Fri, 23 May 2014 07:28:37 GMT
151
150
  - request:
152
151
  method: post
153
152
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/projects
@@ -163,28 +162,28 @@ 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=B5F4EFFB6893365837D77A50E105CEE5; Path=/; HttpOnly
167
+ - TCSESSIONID=28BDD3EB153B415B471240D5A2931B1F; 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:37 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:09 GMT
182
- Content-Type:
183
- - application/json
182
+ - no-store
184
183
  body:
185
184
  string: "{\"id\":\"Project2\",\"name\":\"Project 2\",\"href\":\"/httpAuth/app/rest/projects/id:Project2\",\"archived\":false,\"webUrl\":\"http://localhost:8111/project.html?projectId=Project2\",\"parentProjectId\":\"_Root\"}"
186
185
  http_version:
187
- recorded_at: Fri, 23 May 2014 05:17:10 GMT
186
+ recorded_at: Fri, 23 May 2014 07:28:37 GMT
188
187
  - request:
189
188
  method: get
190
189
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/projects
@@ -200,25 +199,26 @@ 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=8329868C744909D61DA819AA1766B525; Path=/; HttpOnly
204
+ - TCSESSIONID=483855FF5233D24DE382C6DC7946A044; 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:37 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:09 GMT
219
- Content-Type:
220
- - application/json
219
+ - no-store
221
220
  body:
222
221
  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\":\"Project1\",\"name\":\"Project 1\",\"href\":\"/httpAuth/app/rest/projects/id:Project1\",\"archived\":false,\"webUrl\":\"http://localhost:8111/project.html?projectId=Project1\",\"parentProjectId\":\"_Root\"},{\"id\":\"Project2\",\"name\":\"Project 2\",\"href\":\"/httpAuth/app/rest/projects/id:Project2\",\"archived\":false,\"webUrl\":\"http://localhost:8111/project.html?projectId=Project2\",\"parentProjectId\":\"_Root\"}]}"
223
222
  http_version:
224
- recorded_at: Fri, 23 May 2014 05:17:10 GMT
223
+ recorded_at: Fri, 23 May 2014 07:28:37 GMT
224
+ recorded_with: VCR 2.4.0
@@ -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,33 +15,33 @@ 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=575DBEDCF15CD87110CECC4B31FCE259; Path=/; HttpOnly
20
+ - TCSESSIONID=8863CEC1CD1A4A2348B2053AA7637528; 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:38 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:10 GMT
35
- Content-Type:
36
- - application/json
35
+ - no-store
37
36
  body:
38
37
  string: "{\"count\":0,\"vcs-root\":[]}"
39
38
  http_version:
40
- recorded_at: Fri, 23 May 2014 05:17:10 GMT
39
+ recorded_at: Fri, 23 May 2014 07:28:38 GMT
41
40
  - request:
42
41
  method: post
43
42
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/vcs-roots
44
43
  body:
45
- string: "{\"vcsName\":\"jetbrains.git\",\"name\":\"VCS Root 1\",\"projectLocator\":\"id:_Root\",\"properties\":{\"property\":[{\"value\":\"git@example.com/repo.git\",\"name\":\"url\"}]}}"
44
+ string: "{\"projectLocator\":\"id:_Root\",\"vcsName\":\"jetbrains.git\",\"name\":\"VCS Root 1\",\"properties\":{\"property\":[{\"value\":\"git@example.com/repo.git\",\"name\":\"url\"}]}}"
46
45
  headers:
47
46
  Accept:
48
47
  - application/json
@@ -53,33 +52,33 @@ http_interactions:
53
52
  code: 200
54
53
  message: OK
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=1902A96CC6F3D43CAF03A94C19BA35C6; Path=/; HttpOnly
57
+ - TCSESSIONID=CEAF2B8B3148AD5C269D36BFD2D95421; Path=/; HttpOnly
58
+ Pragma:
59
+ - no-cache
60
+ Content-Type:
61
+ - application/json
62
+ Server:
63
+ - Apache-Coyote/1.1
64
+ Date:
65
+ - Fri, 23 May 2014 07:28:38 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:10 GMT
72
- Content-Type:
73
- - application/json
72
+ - no-store
74
73
  body:
75
74
  string: "{\"id\":\"Root_VcsRoot1\",\"name\":\"VCS Root 1\",\"vcsName\":\"jetbrains.git\",\"status\":\"NOT_MONITORED\",\"lastChecked\":\"20140523T040300+0000\",\"href\":\"/httpAuth/app/rest/vcs-roots/id:Root_VcsRoot1\",\"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\":[{\"name\":\"url\",\"value\":\"git@example.com/repo.git\"}]},\"vcsRootInstances\":{\"href\":\"/httpAuth/app/rest/vcs-root-instances?locator=vcsRoot:(id:Root_VcsRoot1)\"}}"
76
75
  http_version:
77
- recorded_at: Fri, 23 May 2014 05:17:10 GMT
76
+ recorded_at: Fri, 23 May 2014 07:28:38 GMT
78
77
  - request:
79
78
  method: post
80
79
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/vcs-roots
81
80
  body:
82
- string: "{\"vcsName\":\"jetbrains.git\",\"name\":\"VCS Root 2\",\"projectLocator\":\"id:_Root\",\"properties\":{\"property\":[{\"value\":\"git@example.com/repo.git\",\"name\":\"url\"}]}}"
81
+ string: "{\"projectLocator\":\"id:_Root\",\"vcsName\":\"jetbrains.git\",\"name\":\"VCS Root 2\",\"properties\":{\"property\":[{\"value\":\"git@example.com/repo.git\",\"name\":\"url\"}]}}"
83
82
  headers:
84
83
  Accept:
85
84
  - application/json
@@ -90,28 +89,28 @@ http_interactions:
90
89
  code: 200
91
90
  message: OK
92
91
  headers:
93
- Cache-Control:
94
- - no-cache
95
- - no-store
96
92
  Set-Cookie:
97
93
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
98
- - TCSESSIONID=01C779C3D166124BC2CD16DDA007F4B7; Path=/; HttpOnly
94
+ - TCSESSIONID=F17D6707D409A0F68DD9CA9F2D966876; Path=/; HttpOnly
95
+ Pragma:
96
+ - no-cache
97
+ Content-Type:
98
+ - application/json
99
+ Server:
100
+ - Apache-Coyote/1.1
101
+ Date:
102
+ - Fri, 23 May 2014 07:28:38 GMT
99
103
  Expires:
100
104
  - Thu, 01 Jan 1970 00:00:00 GMT
101
105
  Transfer-Encoding:
102
106
  - chunked
103
- Server:
104
- - Apache-Coyote/1.1
105
- Pragma:
107
+ Cache-Control:
106
108
  - no-cache
107
- Date:
108
- - Fri, 23 May 2014 05:17:10 GMT
109
- Content-Type:
110
- - application/json
109
+ - no-store
111
110
  body:
112
111
  string: "{\"id\":\"Root_VcsRoot2\",\"name\":\"VCS Root 2\",\"vcsName\":\"jetbrains.git\",\"status\":\"NOT_MONITORED\",\"lastChecked\":\"20140523T040300+0000\",\"href\":\"/httpAuth/app/rest/vcs-roots/id:Root_VcsRoot2\",\"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\":[{\"name\":\"url\",\"value\":\"git@example.com/repo.git\"}]},\"vcsRootInstances\":{\"href\":\"/httpAuth/app/rest/vcs-root-instances?locator=vcsRoot:(id:Root_VcsRoot2)\"}}"
113
112
  http_version:
114
- recorded_at: Fri, 23 May 2014 05:17:10 GMT
113
+ recorded_at: Fri, 23 May 2014 07:28:38 GMT
115
114
  - request:
116
115
  method: get
117
116
  uri: http://teamcity:teamcity@localhost:8111/httpAuth/app/rest/vcs-roots
@@ -127,25 +126,26 @@ http_interactions:
127
126
  code: 200
128
127
  message: OK
129
128
  headers:
130
- Cache-Control:
131
- - no-cache
132
- - no-store
133
129
  Set-Cookie:
134
130
  - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
135
- - TCSESSIONID=3EDBF45CA7566777F3C9C3BF4F410CDB; Path=/; HttpOnly
131
+ - TCSESSIONID=413E56C743F0A189E8635F1ADB69299B; Path=/; HttpOnly
132
+ Pragma:
133
+ - no-cache
134
+ Content-Type:
135
+ - application/json
136
+ Server:
137
+ - Apache-Coyote/1.1
138
+ Date:
139
+ - Fri, 23 May 2014 07:28:38 GMT
136
140
  Expires:
137
141
  - Thu, 01 Jan 1970 00:00:00 GMT
138
142
  Transfer-Encoding:
139
143
  - chunked
140
- Server:
141
- - Apache-Coyote/1.1
142
- Pragma:
144
+ Cache-Control:
143
145
  - no-cache
144
- Date:
145
- - Fri, 23 May 2014 05:17:10 GMT
146
- Content-Type:
147
- - application/json
146
+ - no-store
148
147
  body:
149
148
  string: "{\"count\":2,\"vcs-root\":[{\"id\":\"Root_VcsRoot1\",\"name\":\"VCS Root 1\",\"href\":\"/httpAuth/app/rest/vcs-roots/id:Root_VcsRoot1\"},{\"id\":\"Root_VcsRoot2\",\"name\":\"VCS Root 2\",\"href\":\"/httpAuth/app/rest/vcs-roots/id:Root_VcsRoot2\"}]}"
150
149
  http_version:
151
- recorded_at: Fri, 23 May 2014 05:17:10 GMT
150
+ recorded_at: Fri, 23 May 2014 07:28:38 GMT
151
+ recorded_with: VCR 2.4.0
data/spec/spec_helper.rb CHANGED
@@ -31,3 +31,9 @@ def delete_all_vcs_roots
31
31
  p.destroy!
32
32
  end
33
33
  end
34
+
35
+ def delete_all_agent_pools
36
+ TeamcityRuby::AgentPool.all.each do |p|
37
+ p.destroy!
38
+ end
39
+ end
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ module TeamcityRuby
4
+ describe AgentPool do
5
+ before do
6
+ delete_all_agent_pools
7
+ delete_all_projects
8
+ end
9
+
10
+ it "creates an agent pool", :vcr => true do
11
+ pool = AgentPool.create("Linux")
12
+
13
+ AgentPool.find(:id => pool.teamcity_id.to_s).should_not be_nil
14
+ end
15
+
16
+ it "adds a project to an agent pool" do
17
+ pool = AgentPool.create("Linux")
18
+ project = Project.create("Sample Project")
19
+
20
+ pool.add_project(:project_id => project.teamcity_id)
21
+
22
+ pool.projects.map(&:teamcity_id).should include(project.teamcity_id)
23
+ end
24
+ end
25
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamcity_ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jefferson Girao
@@ -164,12 +164,14 @@ files:
164
164
  - README.md
165
165
  - Rakefile
166
166
  - lib/teamcity_ruby.rb
167
+ - lib/teamcity_ruby/agent_pool.rb
167
168
  - lib/teamcity_ruby/build_configuration.rb
168
169
  - lib/teamcity_ruby/element_builder.rb
169
170
  - lib/teamcity_ruby/project.rb
170
171
  - lib/teamcity_ruby/resource.rb
171
172
  - lib/teamcity_ruby/vcs_root.rb
172
173
  - lib/teamcity_ruby/version.rb
174
+ - spec/cassettes/TeamcityRuby_AgentPool/creates_an_agent_pool.yml
173
175
  - spec/cassettes/TeamcityRuby_BuildConfiguration/an_existing_build_configuration/has_a_build_step_added_to_it.yml
174
176
  - spec/cassettes/TeamcityRuby_BuildConfiguration/an_existing_build_configuration/has_a_build_trigger_added_to_it.yml
175
177
  - spec/cassettes/TeamcityRuby_BuildConfiguration/an_existing_build_configuration/has_a_vcs_root_attached_to_it_with_specific_checkout_rules.yml
@@ -184,6 +186,7 @@ files:
184
186
  - spec/cassettes/TeamcityRuby_Project/lists_all_projects_including_root_built_in_on_TeamCity_.yml
185
187
  - spec/cassettes/TeamcityRuby_VcsRoot/lists_all_vcs_roots.yml
186
188
  - spec/spec_helper.rb
189
+ - spec/teamcity_ruby/agent_pool_spec.rb
187
190
  - spec/teamcity_ruby/build_configuration_spec.rb
188
191
  - spec/teamcity_ruby/element_builder_spec.rb
189
192
  - spec/teamcity_ruby/project_spec.rb
@@ -224,6 +227,7 @@ signing_key:
224
227
  specification_version: 3
225
228
  summary: TeamCity API Ruby Wrapper
226
229
  test_files:
230
+ - spec/cassettes/TeamcityRuby_AgentPool/creates_an_agent_pool.yml
227
231
  - spec/cassettes/TeamcityRuby_BuildConfiguration/an_existing_build_configuration/has_a_build_step_added_to_it.yml
228
232
  - spec/cassettes/TeamcityRuby_BuildConfiguration/an_existing_build_configuration/has_a_build_trigger_added_to_it.yml
229
233
  - spec/cassettes/TeamcityRuby_BuildConfiguration/an_existing_build_configuration/has_a_vcs_root_attached_to_it_with_specific_checkout_rules.yml
@@ -238,6 +242,7 @@ test_files:
238
242
  - spec/cassettes/TeamcityRuby_Project/lists_all_projects_including_root_built_in_on_TeamCity_.yml
239
243
  - spec/cassettes/TeamcityRuby_VcsRoot/lists_all_vcs_roots.yml
240
244
  - spec/spec_helper.rb
245
+ - spec/teamcity_ruby/agent_pool_spec.rb
241
246
  - spec/teamcity_ruby/build_configuration_spec.rb
242
247
  - spec/teamcity_ruby/element_builder_spec.rb
243
248
  - spec/teamcity_ruby/project_spec.rb