teamcity-ruby-client 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.yardopts +1 -0
- data/CHANGELOG.md +15 -3
- data/Guardfile +9 -0
- data/lib/teamcity.rb +1 -0
- data/lib/teamcity/client.rb +1 -2
- data/lib/teamcity/client/build_types.rb +94 -23
- data/lib/teamcity/client/projects.rb +37 -8
- data/lib/teamcity/client/vcs_roots.rb +9 -16
- data/lib/teamcity/element_builder.rb +27 -0
- data/lib/teamcity/version.rb +1 -1
- data/spec/cassettes/BuildTypes/POST/_attach_vcs_root/should_attach_a_vcs_root_to_a_buildtype.yml +12 -10
- data/spec/cassettes/BuildTypes/POST/_create_agent_requirement/should_create_an_agent_requirement_for_a_buildtype.yml +11 -11
- data/spec/cassettes/BuildTypes/POST/_create_build_step/should_create_a_build_step_for_a_given_build_type.yml +46 -0
- data/spec/cassettes/BuildTypes/POST/_create_build_trigger/should_create_a_build_trigger_for_a_given_build_type.yml +46 -0
- data/spec/cassettes/BuildTypes/POST/_create_buildtype/should_create_a_build_type.yml +86 -0
- data/spec/cassettes/BuildTypes/PUT/_set_buildtype_setting/should_set_if_it_should_perform_clean_builds.yml +46 -0
- data/spec/cassettes/BuildTypes/PUT/_set_buildtype_setting/should_set_what_is_the_timeout_in_minutes_when_executing_builds.yml +46 -0
- data/spec/cassettes/BuildTypes/PUT/_set_buildtype_setting/should_set_where_the_checkout_happens_when_building.yml +46 -0
- data/spec/cassettes/Projects/GET/_parent_project/should_fetch_the_parent_project_for_a_given_project.yml +46 -0
- data/spec/cassettes/Projects/GET/_parent_project/should_return_nil_if_there_is_no_parent_project_for_a_given_project.yml +46 -0
- data/spec/cassettes/Projects/POST/_copy_project/should_copy_a_project.yml +27 -24
- data/spec/cassettes/Projects/PUT/_set_parent_project/should_set_a_parent_project_for_a_given_project.yml +134 -0
- data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_git_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml +89 -0
- data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_subversion_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml +89 -0
- data/spec/teamcity/api_spec.rb +1 -1
- data/spec/teamcity/client/buildtypes_spec.rb +58 -2
- data/spec/teamcity/client/projects_spec.rb +36 -2
- data/spec/teamcity/client/vcs_roots_spec.rb +17 -3
- data/spec/teamcity/client_spec.rb +2 -2
- data/spec/teamcity/element_builder_spec.rb +30 -0
- data/spec/teamcity/headers_spec.rb +2 -2
- data/teamcity-ruby-client.gemspec +2 -3
- metadata +44 -33
- data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml +0 -90
@@ -44,6 +44,7 @@ describe 'Projects' do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
|
47
48
|
describe '.project_buildtypes' do
|
48
49
|
|
49
50
|
it 'should fetch all the buildTypes for a project' do
|
@@ -74,6 +75,20 @@ describe 'Projects' do
|
|
74
75
|
expect { @tc.project_parameters(id: 'missing')}
|
75
76
|
end
|
76
77
|
end
|
78
|
+
|
79
|
+
describe '.parent_project' do
|
80
|
+
it 'should fetch the parent project for a given project' do
|
81
|
+
parent = @tc.parent_project(id: 'GetProjectWithParent').should_not be_nil
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'should return nil if there is no parent project for a given project' do
|
85
|
+
parent = @tc.parent_project(id: 'GetProjectWithNoParent').should be_nil
|
86
|
+
end
|
87
|
+
|
88
|
+
it 'should raise an error if the project does not exist' do
|
89
|
+
expect { @tc.parent_project(id: 'missing') }
|
90
|
+
end
|
91
|
+
end
|
77
92
|
end
|
78
93
|
|
79
94
|
# POST Requests
|
@@ -147,7 +162,6 @@ describe 'Projects' do
|
|
147
162
|
end
|
148
163
|
|
149
164
|
describe '.set_project_field' do
|
150
|
-
|
151
165
|
it 'should set a projects name' do
|
152
166
|
project_id = 'PutSetProjectNameField'
|
153
167
|
@tc.create_project(project_id)
|
@@ -169,5 +183,25 @@ describe 'Projects' do
|
|
169
183
|
@tc.set_project_field(project_id, 'archived', field_value).should eq(field_value)
|
170
184
|
end
|
171
185
|
end
|
186
|
+
|
187
|
+
describe '.set_parent_project' do
|
188
|
+
it 'should set a parent project for a given project' do
|
189
|
+
project_id = 'PutSetParentProject'
|
190
|
+
@tc.create_project(project_id)
|
191
|
+
|
192
|
+
parent_project_id = 'PutParentProject'
|
193
|
+
@tc.create_project(parent_project_id)
|
194
|
+
|
195
|
+
@tc.set_parent_project(project_id, parent_project_id)['id'].should eq(project_id)
|
196
|
+
end
|
197
|
+
|
198
|
+
it 'should raise an error if the parent project does not exist' do
|
199
|
+
expect { @tc.parent_project('GetProjectWithoutParent', 'missing') }.to raise_error
|
200
|
+
end
|
201
|
+
|
202
|
+
it 'should raise an error if the child project does not exist' do
|
203
|
+
expect { @tc.parent_project('missing', 'GetParentProject') }.to raise_error
|
204
|
+
end
|
205
|
+
end
|
172
206
|
end
|
173
|
-
end
|
207
|
+
end
|
@@ -26,9 +26,9 @@ describe 'VCSRoots' do
|
|
26
26
|
|
27
27
|
describe 'POST', :vcr do
|
28
28
|
describe '.create_vcs_root' do
|
29
|
-
it 'should create a vcs root that is shared with the project and sub-projects' do
|
29
|
+
it 'should create a git vcs root that is shared with the project and sub-projects' do
|
30
30
|
project_id = @tc.projects[1].id
|
31
|
-
vcs_name = '
|
31
|
+
vcs_name = 'PostCreateVCSRootGit'
|
32
32
|
vcs_type = 'git'
|
33
33
|
response = @tc.create_vcs_root(vcs_name: vcs_name, vcs_type: vcs_type, project_id: project_id) do |properties|
|
34
34
|
properties['branch'] = 'master'
|
@@ -39,6 +39,20 @@ describe 'VCSRoots' do
|
|
39
39
|
response.name.should eq(vcs_name)
|
40
40
|
response.vcsName.should match(/#{vcs_type}/)
|
41
41
|
end
|
42
|
+
|
43
|
+
it 'should create a subversion vcs root that is shared with the project and sub-projects' do
|
44
|
+
project_id = @tc.projects[1].id
|
45
|
+
vcs_name = 'PostCreateVCSRootSvn'
|
46
|
+
vcs_type = 'svn'
|
47
|
+
response = @tc.create_vcs_root(vcs_name: vcs_name, vcs_type: vcs_type, project_id: project_id) do |properties|
|
48
|
+
properties['branch'] = 'master'
|
49
|
+
properties['url'] = 'http://svn.example.com/jperry/teamcity-ruby-client'
|
50
|
+
properties['authMethod'] = 'PRIVATE_KEY_DEFAULT'
|
51
|
+
properties['ignoreKnownHosts'] = true
|
52
|
+
end
|
53
|
+
response.name.should eq(vcs_name)
|
54
|
+
response.vcsName.should match(/#{vcs_type}/)
|
55
|
+
end
|
42
56
|
end
|
43
57
|
end
|
44
|
-
end
|
58
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_relative '../spec_helper'
|
2
2
|
|
3
3
|
describe TeamCity::Client do
|
4
4
|
before(:each) do
|
@@ -11,4 +11,4 @@ describe TeamCity::Client do
|
|
11
11
|
connection = client.send(:connection).build_url(nil).to_s
|
12
12
|
connection.should eq(endpoint.to_s)
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
2
|
+
require_relative '../spec_helper'
|
3
|
+
|
4
|
+
describe TeamCity::ElementBuilder do
|
5
|
+
it 'outputs json following TeamCity convention for elements and properties' do
|
6
|
+
builder = TeamCity::ElementBuilder.new(:attr1 => 'x') do |properties|
|
7
|
+
properties['property1'] = 'z'
|
8
|
+
end
|
9
|
+
|
10
|
+
builder.to_request_body.should == {
|
11
|
+
:attr1 => 'x',
|
12
|
+
:properties => {
|
13
|
+
:property => [
|
14
|
+
{
|
15
|
+
:name => 'property1',
|
16
|
+
:value => 'z'
|
17
|
+
}
|
18
|
+
]
|
19
|
+
}
|
20
|
+
}.to_json
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'outputs json following TeamCity convention for elements even if no properties are defined' do
|
24
|
+
builder = TeamCity::ElementBuilder.new(:attr1 => 'x')
|
25
|
+
|
26
|
+
builder.to_request_body.should == {
|
27
|
+
:attr1 => 'x'
|
28
|
+
}.to_json
|
29
|
+
end
|
30
|
+
end
|
@@ -19,16 +19,15 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.require_paths = ['lib']
|
20
20
|
|
21
21
|
# Dependencies
|
22
|
-
gem.add_development_dependency('rspec', '~> 2.
|
22
|
+
gem.add_development_dependency('rspec', '~> 2.14.1')
|
23
23
|
gem.add_development_dependency('webmock', '~> 1.8.0')
|
24
24
|
gem.add_development_dependency('rake', '~> 10.0.3')
|
25
25
|
gem.add_development_dependency('pry', '~> 0.9.12')
|
26
26
|
gem.add_development_dependency('vcr', '~> 2.4.0')
|
27
27
|
gem.add_development_dependency('yard', '~> 0.8.5.2')
|
28
28
|
gem.add_development_dependency('redcarpet', '~> 2.2.2')
|
29
|
+
gem.add_development_dependency('guard-rspec', '~> 4.0.2')
|
29
30
|
gem.add_runtime_dependency('faraday', '~> 0.8.5')
|
30
31
|
gem.add_runtime_dependency('faraday_middleware', '~> 0.9.0')
|
31
32
|
gem.add_runtime_dependency('hashie', '~> 2.0.0')
|
32
|
-
gem.add_runtime_dependency('linguistics', '~> 2.0.2')
|
33
|
-
gem.add_runtime_dependency('builder', '>=3.0')
|
34
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teamcity-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.14.1
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.14.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: webmock
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,75 +109,61 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 2.2.2
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: guard-rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
118
|
-
type: :
|
117
|
+
version: 4.0.2
|
118
|
+
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 4.0.2
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: faraday
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.8.5
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 0.8.5
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: faraday_middleware
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ~>
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 0.9.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 0.9.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: hashie
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - ~>
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 2.0.
|
159
|
+
version: 2.0.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - ~>
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 2.0.
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: builder
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ! '>='
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '3.0'
|
174
|
-
type: :runtime
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ! '>='
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '3.0'
|
166
|
+
version: 2.0.0
|
181
167
|
description: A Ruby wrapper for the TeamCity Rest API
|
182
168
|
email:
|
183
169
|
- bosoxjay@gmail.com
|
@@ -187,8 +173,10 @@ extra_rdoc_files: []
|
|
187
173
|
files:
|
188
174
|
- .gitignore
|
189
175
|
- .rvmrc
|
176
|
+
- .yardopts
|
190
177
|
- CHANGELOG.md
|
191
178
|
- Gemfile
|
179
|
+
- Guardfile
|
192
180
|
- LICENSE.txt
|
193
181
|
- README.md
|
194
182
|
- Rakefile
|
@@ -203,6 +191,7 @@ files:
|
|
203
191
|
- lib/teamcity/client/vcs_roots.rb
|
204
192
|
- lib/teamcity/configuration.rb
|
205
193
|
- lib/teamcity/connection.rb
|
194
|
+
- lib/teamcity/element_builder.rb
|
206
195
|
- lib/teamcity/headers.rb
|
207
196
|
- lib/teamcity/request.rb
|
208
197
|
- lib/teamcity/version.rb
|
@@ -245,12 +234,18 @@ files:
|
|
245
234
|
- spec/cassettes/BuildTypes/GET/_buildtypes/should_fetch_all_the_buildtypes.yml
|
246
235
|
- spec/cassettes/BuildTypes/POST/_attach_vcs_root/should_attach_a_vcs_root_to_a_buildtype.yml
|
247
236
|
- spec/cassettes/BuildTypes/POST/_create_agent_requirement/should_create_an_agent_requirement_for_a_buildtype.yml
|
237
|
+
- spec/cassettes/BuildTypes/POST/_create_build_step/should_create_a_build_step_for_a_given_build_type.yml
|
238
|
+
- spec/cassettes/BuildTypes/POST/_create_build_trigger/should_create_a_build_trigger_for_a_given_build_type.yml
|
239
|
+
- spec/cassettes/BuildTypes/POST/_create_buildtype/should_create_a_build_type.yml
|
248
240
|
- spec/cassettes/BuildTypes/PUT/_set_build_step_field/should_disable_a_build_step.yml
|
249
241
|
- spec/cassettes/BuildTypes/PUT/_set_build_step_field/should_enable_a_build_step.yml
|
250
242
|
- spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_pause_a_project.yml
|
251
243
|
- spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_set_a_projects_description.yml
|
252
244
|
- spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_set_the_buildtype_name.yml
|
253
245
|
- spec/cassettes/BuildTypes/PUT/_set_buildtype_parameter/should_set_a_buildtype_parameter.yml
|
246
|
+
- spec/cassettes/BuildTypes/PUT/_set_buildtype_setting/should_set_if_it_should_perform_clean_builds.yml
|
247
|
+
- spec/cassettes/BuildTypes/PUT/_set_buildtype_setting/should_set_what_is_the_timeout_in_minutes_when_executing_builds.yml
|
248
|
+
- spec/cassettes/BuildTypes/PUT/_set_buildtype_setting/should_set_where_the_checkout_happens_when_building.yml
|
254
249
|
- spec/cassettes/Builds/DELETE/_unpin_build/should_unpin_a_build.yml
|
255
250
|
- spec/cassettes/Builds/GET/_build/should_fetch_the_build_details.yml
|
256
251
|
- spec/cassettes/Builds/GET/_build/should_raise_an_error_if_the_build_does_not_exist.yml
|
@@ -267,6 +262,8 @@ files:
|
|
267
262
|
- spec/cassettes/Builds/PUT/_pin_build/should_pin_a_build.yml
|
268
263
|
- spec/cassettes/Projects/DELETE/_delete_project/should_delete_a_project.yml
|
269
264
|
- spec/cassettes/Projects/DELETE/_delete_project_parameter/should_delete_a_project_parameter.yml
|
265
|
+
- spec/cassettes/Projects/GET/_parent_project/should_fetch_the_parent_project_for_a_given_project.yml
|
266
|
+
- spec/cassettes/Projects/GET/_parent_project/should_return_nil_if_there_is_no_parent_project_for_a_given_project.yml
|
270
267
|
- spec/cassettes/Projects/GET/_project/should_fetch_a_single_project_by_id.yml
|
271
268
|
- spec/cassettes/Projects/GET/_project/should_raise_an_error_if_the_project_does_not_exist.yml
|
272
269
|
- spec/cassettes/Projects/GET/_project_buildtypes/should_fetch_all_the_buildTypes_for_a_project.yml
|
@@ -276,13 +273,15 @@ files:
|
|
276
273
|
- spec/cassettes/Projects/GET/_projects/should_fetch_projects.yml
|
277
274
|
- spec/cassettes/Projects/POST/_copy_project/should_copy_a_project.yml
|
278
275
|
- spec/cassettes/Projects/POST/_create_project/should_create_a_project.yml
|
276
|
+
- spec/cassettes/Projects/PUT/_set_parent_project/should_set_a_parent_project_for_a_given_project.yml
|
279
277
|
- spec/cassettes/Projects/PUT/_set_project_field/should_archive_a_project.yml
|
280
278
|
- spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_description.yml
|
281
279
|
- spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_name.yml
|
282
280
|
- spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter.yml
|
283
281
|
- spec/cassettes/VCSRoots/GET/_vcs_root_details/should_fetch_the_vcs_root_details.yml
|
284
282
|
- spec/cassettes/VCSRoots/GET/_vcs_roots/should_fetch_vcs_roots.yml
|
285
|
-
- spec/cassettes/VCSRoots/POST/_create_vcs_root/
|
283
|
+
- spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_git_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml
|
284
|
+
- spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_subversion_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml
|
286
285
|
- spec/faraday/null_response_body_spec.rb
|
287
286
|
- spec/spec_helper.rb
|
288
287
|
- spec/support/vcr_setup.rb
|
@@ -292,6 +291,7 @@ files:
|
|
292
291
|
- spec/teamcity/client/projects_spec.rb
|
293
292
|
- spec/teamcity/client/vcs_roots_spec.rb
|
294
293
|
- spec/teamcity/client_spec.rb
|
294
|
+
- spec/teamcity/element_builder_spec.rb
|
295
295
|
- spec/teamcity/headers_spec.rb
|
296
296
|
- spec/teamcity/version_spec.rb
|
297
297
|
- spec/teamcity_spec.rb
|
@@ -360,12 +360,18 @@ test_files:
|
|
360
360
|
- spec/cassettes/BuildTypes/GET/_buildtypes/should_fetch_all_the_buildtypes.yml
|
361
361
|
- spec/cassettes/BuildTypes/POST/_attach_vcs_root/should_attach_a_vcs_root_to_a_buildtype.yml
|
362
362
|
- spec/cassettes/BuildTypes/POST/_create_agent_requirement/should_create_an_agent_requirement_for_a_buildtype.yml
|
363
|
+
- spec/cassettes/BuildTypes/POST/_create_build_step/should_create_a_build_step_for_a_given_build_type.yml
|
364
|
+
- spec/cassettes/BuildTypes/POST/_create_build_trigger/should_create_a_build_trigger_for_a_given_build_type.yml
|
365
|
+
- spec/cassettes/BuildTypes/POST/_create_buildtype/should_create_a_build_type.yml
|
363
366
|
- spec/cassettes/BuildTypes/PUT/_set_build_step_field/should_disable_a_build_step.yml
|
364
367
|
- spec/cassettes/BuildTypes/PUT/_set_build_step_field/should_enable_a_build_step.yml
|
365
368
|
- spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_pause_a_project.yml
|
366
369
|
- spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_set_a_projects_description.yml
|
367
370
|
- spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_set_the_buildtype_name.yml
|
368
371
|
- spec/cassettes/BuildTypes/PUT/_set_buildtype_parameter/should_set_a_buildtype_parameter.yml
|
372
|
+
- spec/cassettes/BuildTypes/PUT/_set_buildtype_setting/should_set_if_it_should_perform_clean_builds.yml
|
373
|
+
- spec/cassettes/BuildTypes/PUT/_set_buildtype_setting/should_set_what_is_the_timeout_in_minutes_when_executing_builds.yml
|
374
|
+
- spec/cassettes/BuildTypes/PUT/_set_buildtype_setting/should_set_where_the_checkout_happens_when_building.yml
|
369
375
|
- spec/cassettes/Builds/DELETE/_unpin_build/should_unpin_a_build.yml
|
370
376
|
- spec/cassettes/Builds/GET/_build/should_fetch_the_build_details.yml
|
371
377
|
- spec/cassettes/Builds/GET/_build/should_raise_an_error_if_the_build_does_not_exist.yml
|
@@ -382,6 +388,8 @@ test_files:
|
|
382
388
|
- spec/cassettes/Builds/PUT/_pin_build/should_pin_a_build.yml
|
383
389
|
- spec/cassettes/Projects/DELETE/_delete_project/should_delete_a_project.yml
|
384
390
|
- spec/cassettes/Projects/DELETE/_delete_project_parameter/should_delete_a_project_parameter.yml
|
391
|
+
- spec/cassettes/Projects/GET/_parent_project/should_fetch_the_parent_project_for_a_given_project.yml
|
392
|
+
- spec/cassettes/Projects/GET/_parent_project/should_return_nil_if_there_is_no_parent_project_for_a_given_project.yml
|
385
393
|
- spec/cassettes/Projects/GET/_project/should_fetch_a_single_project_by_id.yml
|
386
394
|
- spec/cassettes/Projects/GET/_project/should_raise_an_error_if_the_project_does_not_exist.yml
|
387
395
|
- spec/cassettes/Projects/GET/_project_buildtypes/should_fetch_all_the_buildTypes_for_a_project.yml
|
@@ -391,13 +399,15 @@ test_files:
|
|
391
399
|
- spec/cassettes/Projects/GET/_projects/should_fetch_projects.yml
|
392
400
|
- spec/cassettes/Projects/POST/_copy_project/should_copy_a_project.yml
|
393
401
|
- spec/cassettes/Projects/POST/_create_project/should_create_a_project.yml
|
402
|
+
- spec/cassettes/Projects/PUT/_set_parent_project/should_set_a_parent_project_for_a_given_project.yml
|
394
403
|
- spec/cassettes/Projects/PUT/_set_project_field/should_archive_a_project.yml
|
395
404
|
- spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_description.yml
|
396
405
|
- spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_name.yml
|
397
406
|
- spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter.yml
|
398
407
|
- spec/cassettes/VCSRoots/GET/_vcs_root_details/should_fetch_the_vcs_root_details.yml
|
399
408
|
- spec/cassettes/VCSRoots/GET/_vcs_roots/should_fetch_vcs_roots.yml
|
400
|
-
- spec/cassettes/VCSRoots/POST/_create_vcs_root/
|
409
|
+
- spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_git_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml
|
410
|
+
- spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_subversion_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml
|
401
411
|
- spec/faraday/null_response_body_spec.rb
|
402
412
|
- spec/spec_helper.rb
|
403
413
|
- spec/support/vcr_setup.rb
|
@@ -407,6 +417,7 @@ test_files:
|
|
407
417
|
- spec/teamcity/client/projects_spec.rb
|
408
418
|
- spec/teamcity/client/vcs_roots_spec.rb
|
409
419
|
- spec/teamcity/client_spec.rb
|
420
|
+
- spec/teamcity/element_builder_spec.rb
|
410
421
|
- spec/teamcity/headers_spec.rb
|
411
422
|
- spec/teamcity/version_spec.rb
|
412
423
|
- spec/teamcity_spec.rb
|
@@ -1,90 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/projects
|
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=637F24F5193BAEE7E2E22A2F1DF0F4F2; 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 15:18:38 GMT
|
41
|
-
body:
|
42
|
-
encoding: US-ASCII
|
43
|
-
string: ! '{"project":[{"id":"_Root","name":"<Root project>","href":"/httpAuth/app/rest/projects/id:_Root"},{"id":"BuildTests","name":"BuildTests","href":"/httpAuth/app/rest/projects/id:BuildTests"},{"id":"BuildTypeTests","name":"BuildTypeTests","href":"/httpAuth/app/rest/projects/id:BuildTypeTests"},{"id":"DeleteProjectParameters","name":"DeleteProjectParameters","href":"/httpAuth/app/rest/projects/id:DeleteProjectParameters"},{"id":"GetProjectBuildTypes","name":"GetProjectBuildTypes","href":"/httpAuth/app/rest/projects/id:GetProjectBuildTypes"},{"id":"GetProjectRequest","name":"GetProjectRequest","href":"/httpAuth/app/rest/projects/id:GetProjectRequest"},{"id":"GetProjectWithNoBuildTypes","name":"GetProjectWithNoBuildTypes","href":"/httpAuth/app/rest/projects/id:GetProjectWithNoBuildTypes"},{"id":"GetProjectWithNoParameters","name":"GetProjectWithNoParameters","href":"/httpAuth/app/rest/projects/id:GetProjectWithNoParameters"},{"id":"GetProjectWithParameters","name":"GetProjectWithParameters","href":"/httpAuth/app/rest/projects/id:GetProjectWithParameters"},{"id":"PostCopyProject","name":"PostCopyProject","href":"/httpAuth/app/rest/projects/id:PostCopyProject"},{"id":"PostCreateProject","name":"PostCreateProject","href":"/httpAuth/app/rest/projects/id:PostCreateProject"},{"id":"PostProjectToBeCopied","name":"PostProjectToBeCopied","href":"/httpAuth/app/rest/projects/id:PostProjectToBeCopied"},{"id":"PutCreateProjectParam","name":"PutCreateProjectParam","href":"/httpAuth/app/rest/projects/id:PutCreateProjectParam"},{"id":"PutSetProjectNameField","name":"PutNewProjectName","href":"/httpAuth/app/rest/projects/id:PutSetProjectNameField"},{"id":"PutSetProjectDescriptionField","name":"PutSetProjectDescriptionField","href":"/httpAuth/app/rest/projects/id:PutSetProjectDescriptionField"},{"id":"PutSetProjectArchiveField","name":"PutSetProjectArchiveField","href":"/httpAuth/app/rest/projects/id:PutSetProjectArchiveField"}]}'
|
44
|
-
http_version:
|
45
|
-
recorded_at: Wed, 14 Aug 2013 15:18:38 GMT
|
46
|
-
- request:
|
47
|
-
method: post
|
48
|
-
uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/vcs-roots
|
49
|
-
body:
|
50
|
-
encoding: US-ASCII
|
51
|
-
string: <vcs-root name="PostCreateVCSRoot" vcsName="jetbrains.git" projectLocator="BuildTests"><properties><property
|
52
|
-
name="branch" value="master"/><property name="url" value="git@github.com:jperry/teamcity-ruby-client.git"/><property
|
53
|
-
name="authMethod" value="PRIVATE_KEY_DEFAULT"/><property name="ignoreKnownHosts"
|
54
|
-
value="true"/></properties></vcs-root>
|
55
|
-
headers:
|
56
|
-
User-Agent:
|
57
|
-
- TeamCity Ruby Client 0.4.0
|
58
|
-
Accept:
|
59
|
-
- application/json; charset=utf-8
|
60
|
-
Content-Type:
|
61
|
-
- application/xml
|
62
|
-
response:
|
63
|
-
status:
|
64
|
-
code: 200
|
65
|
-
message: OK
|
66
|
-
headers:
|
67
|
-
Server:
|
68
|
-
- Apache-Coyote/1.1
|
69
|
-
Set-Cookie:
|
70
|
-
- RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
71
|
-
- TCSESSIONID=97DCE4F1BCDD9F6AB117265DA0CAF7FB; Path=/; HttpOnly
|
72
|
-
Pragma:
|
73
|
-
- no-cache
|
74
|
-
Expires:
|
75
|
-
- Thu, 01 Jan 1970 00:00:00 GMT
|
76
|
-
Cache-Control:
|
77
|
-
- no-cache
|
78
|
-
- no-store
|
79
|
-
Content-Type:
|
80
|
-
- application/json
|
81
|
-
Transfer-Encoding:
|
82
|
-
- chunked
|
83
|
-
Date:
|
84
|
-
- Wed, 14 Aug 2013 15:18:38 GMT
|
85
|
-
body:
|
86
|
-
encoding: US-ASCII
|
87
|
-
string: ! '{"id":"BuildTests_PostCreateVCSRoot","name":"PostCreateVCSRoot","vcsName":"jetbrains.git","status":"NOT_MONITORED","lastChecked":"20130813T212053-0400","href":"/httpAuth/app/rest/vcs-roots/id:BuildTests_PostCreateVCSRoot","project":{"id":"BuildTests","name":"BuildTests","href":"/httpAuth/app/rest/projects/id:BuildTests"},"properties":{"property":[{"name":"authMethod","value":"PRIVATE_KEY_DEFAULT"},{"name":"branch","value":"master"},{"name":"ignoreKnownHosts","value":"true"},{"name":"url","value":"git@github.com:jperry/teamcity-ruby-client.git"}]},"vcsRootInstances":{"href":"/httpAuth/app/rest/vcs-root-instances?locator=vcsRoot:(id:BuildTests_PostCreateVCSRoot)"}}'
|
88
|
-
http_version:
|
89
|
-
recorded_at: Wed, 14 Aug 2013 15:18:38 GMT
|
90
|
-
recorded_with: VCR 2.4.0
|