teamcity-ruby-client 0.4.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +8 -8
  2. data/CHANGELOG.md +15 -1
  3. data/README.md +4 -2
  4. data/lib/teamcity.rb +1 -0
  5. data/lib/teamcity/client/build_types.rb +25 -16
  6. data/lib/teamcity/client/builds.rb +19 -15
  7. data/lib/teamcity/client/common.rb +0 -12
  8. data/lib/teamcity/client/projects.rb +21 -17
  9. data/lib/teamcity/client/vcs_roots.rb +11 -13
  10. data/lib/teamcity/configuration.rb +1 -5
  11. data/lib/teamcity/connection.rb +7 -7
  12. data/lib/teamcity/headers.rb +47 -0
  13. data/lib/teamcity/request.rb +2 -8
  14. data/lib/teamcity/version.rb +1 -1
  15. data/spec/cassettes/BuildTypes/DELETE/_delete_agent_requirement/should_delete_the_agent_requirement.yml +51 -6
  16. data/spec/cassettes/BuildTypes/DELETE/_delete_buildtype/should_delete_a_buildtype.yml +8 -6
  17. data/spec/cassettes/BuildTypes/DELETE/_delete_buildtype_parameter/should_delete_a_buildtype_parameter.yml +49 -6
  18. data/spec/cassettes/BuildTypes/GET/_buildtype/should_fetch_the_details_of_a_buildtype_by_id.yml +51 -11
  19. data/spec/cassettes/BuildTypes/GET/_buildtype/should_raise_an_error_if_the_buildtype_does_not_exist.yml +8 -6
  20. data/spec/cassettes/BuildTypes/GET/_buildtype_agent_requirements/should_fetch_the_build_configuration_agent_requirements_for_a_buildtype.yml +9 -7
  21. data/spec/cassettes/BuildTypes/GET/_buildtype_agent_requirements/should_return_an_array.yml +9 -7
  22. data/spec/cassettes/BuildTypes/GET/_buildtype_agent_requirements/should_return_nil_if_there_are_no_agent_requirements_defined.yml +9 -7
  23. data/spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_fetch_the_build_configuration_artifact_dependencies_for_a_buildtype.yml +9 -7
  24. data/spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_return_an_array.yml +9 -7
  25. data/spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_return_nil_if_there_are_no_artifact_dependencies_defined.yml +9 -7
  26. data/spec/cassettes/BuildTypes/GET/_buildtype_features/should_fetch_the_build_configuration_features_for_a_buildtype.yml +9 -7
  27. data/spec/cassettes/BuildTypes/GET/_buildtype_features/should_return_an_array.yml +9 -7
  28. data/spec/cassettes/BuildTypes/GET/_buildtype_features/should_return_nil_if_there_are_no_features_defined.yml +9 -7
  29. data/spec/cassettes/BuildTypes/GET/_buildtype_investigations/should_get_investigation_details.yml +11 -11
  30. data/spec/cassettes/BuildTypes/GET/_buildtype_investigations/should_return_nil_if_no_one_is_investigating.yml +9 -7
  31. data/spec/cassettes/BuildTypes/GET/_buildtype_parameters/should_fetch_the_build_configuration_parameters_for_a_buildtype.yml +9 -7
  32. data/spec/cassettes/BuildTypes/GET/_buildtype_parameters/should_return_an_array.yml +9 -7
  33. data/spec/cassettes/BuildTypes/GET/_buildtype_parameters/should_return_nil_if_there_are_no_parameters_defined.yml +9 -7
  34. data/spec/cassettes/BuildTypes/GET/_buildtype_settings/should_fetch_the_settings_for_a_given_buildtype.yml +51 -6
  35. data/spec/cassettes/BuildTypes/GET/_buildtype_settings/should_return_an_array.yml +51 -6
  36. data/spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_fetch_the_build_configuration_snapshot_dependencies_for_a_buildtype.yml +9 -7
  37. data/spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_return_an_array.yml +9 -7
  38. data/spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_return_nil_if_there_are_no_snapshot_dependencies_defined.yml +9 -7
  39. data/spec/cassettes/BuildTypes/GET/_buildtype_state/should_fetch_the_state_of_the_buildtype.yml +89 -0
  40. data/spec/cassettes/BuildTypes/GET/_buildtype_steps/should_fetch_the_build_configuration_steps_for_a_buildtype.yml +10 -9
  41. data/spec/cassettes/BuildTypes/GET/_buildtype_steps/should_return_an_array.yml +9 -9
  42. data/spec/cassettes/BuildTypes/GET/_buildtype_steps/should_return_nil_if_there_are_no_steps_defined.yml +9 -7
  43. data/spec/cassettes/BuildTypes/GET/_buildtype_template/should_return_nil_if_the_buildtype_is_not_associated_with_a_template.yml +8 -6
  44. data/spec/cassettes/BuildTypes/GET/_buildtype_template/should_return_the_attributes_of_the_associated_template.yml +9 -8
  45. data/spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_fetch_the_build_configuration_triggers_for_a_buildtype.yml +8 -6
  46. data/spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_return_an_array.yml +8 -6
  47. data/spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_return_nil_if_there_are_no_triggers_defined.yml +9 -7
  48. data/spec/cassettes/BuildTypes/GET/_buildtype_vcs_root_entries/should_fetch_the_build_configuration_vcs_root_entries_for_a_buildtype.yml +10 -8
  49. data/spec/cassettes/BuildTypes/GET/_buildtype_vcs_root_entries/should_return_an_array.yml +10 -8
  50. data/spec/cassettes/BuildTypes/GET/_buildtype_vcs_root_entries/should_return_nil_if_there_are_no_vcs_root_entries_defined.yml +9 -7
  51. data/spec/cassettes/BuildTypes/GET/_buildtypes/should_fetch_all_the_buildtypes.yml +9 -12
  52. data/spec/cassettes/BuildTypes/POST/_attach_vcs_root/should_attach_a_vcs_root_to_a_buildtype.yml +9 -9
  53. data/spec/cassettes/BuildTypes/POST/_create_agent_requirement/should_create_an_agent_requirement_for_a_buildtype.yml +10 -9
  54. data/spec/cassettes/BuildTypes/PUT/_set_build_step_field/should_disable_a_build_step.yml +14 -10
  55. data/spec/cassettes/BuildTypes/PUT/_set_build_step_field/should_enable_a_build_step.yml +18 -10
  56. data/spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_pause_a_project.yml +14 -10
  57. data/spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_set_a_projects_description.yml +15 -11
  58. data/spec/cassettes/BuildTypes/PUT/_set_buildtype_field/should_set_the_buildtype_name.yml +15 -11
  59. data/spec/cassettes/BuildTypes/PUT/_set_buildtype_parameter/should_set_a_buildtype_parameter.yml +15 -11
  60. data/spec/cassettes/Builds/DELETE/_unpin_build/should_unpin_a_build.yml +51 -6
  61. data/spec/cassettes/Builds/GET/_build/should_fetch_the_build_details.yml +53 -11
  62. data/spec/cassettes/Builds/GET/_build/should_raise_an_error_if_the_build_does_not_exist.yml +16 -13
  63. data/spec/cassettes/Builds/GET/_build_pinned_/should_return_false_when_a_build_is_not_pinned.yml +126 -0
  64. data/spec/cassettes/Builds/GET/_build_pinned_/should_return_true_when_a_build_is_pinned.yml +126 -0
  65. data/spec/cassettes/Builds/GET/_build_statistics/should_return_statistics_for_a_build.yml +50 -5
  66. data/spec/cassettes/Builds/GET/_build_tags/should_fetch_the_build_tags.yml +51 -6
  67. data/spec/cassettes/Builds/GET/_build_tags/should_return_an_empty_array_if_there_are_no_build_tags_defined_for_a_build.yml +89 -0
  68. data/spec/cassettes/Builds/GET/_builds/should_allow_you_to_filter_by_multiple_build_locators.yml +9 -7
  69. data/spec/cassettes/Builds/GET/_builds/should_allow_you_to_filter_results_by_build_locators.yml +9 -7
  70. data/spec/cassettes/Builds/GET/_builds/should_fetch_all_the_builds.yml +9 -7
  71. data/spec/cassettes/Builds/GET/{_build_statistics/should_return_an_empty_string_for_a_build_with_no_statistics.yml → _builds/should_return_an_empty_array_if_no_results_are_found.yml} +9 -7
  72. data/spec/cassettes/Builds/PUT/_pin_build/should_pin_a_build.yml +49 -6
  73. data/spec/cassettes/Projects/DELETE/_delete_project/should_delete_a_project.yml +17 -14
  74. data/spec/cassettes/Projects/DELETE/_delete_project_parameter/should_delete_a_project_parameter.yml +91 -6
  75. data/spec/cassettes/Projects/GET/_project/should_fetch_a_single_project_by_id.yml +10 -10
  76. data/spec/cassettes/Projects/GET/_project/should_raise_an_error_if_the_project_does_not_exist.yml +9 -7
  77. data/spec/cassettes/Projects/GET/_project_buildtypes/should_fetch_all_the_buildTypes_for_a_project.yml +9 -8
  78. data/spec/cassettes/Projects/GET/{_projects/should_return_nil_if_there_are_no_projects.yml → _project_buildtypes/should_return_nil_if_the_project_does_not_have_any_build_types.yml} +9 -7
  79. data/spec/cassettes/Projects/GET/_project_parameters/should_fetch_all_the_paramters_for_a_given_project.yml +9 -7
  80. data/spec/cassettes/Projects/GET/_project_parameters/should_return_nil_if_there_are_no_parameters_defined_for_a_project.yml +9 -7
  81. data/spec/cassettes/Projects/GET/_projects/should_fetch_projects.yml +9 -9
  82. data/spec/cassettes/Projects/POST/_copy_project/should_copy_a_project.yml +61 -15
  83. data/spec/cassettes/Projects/POST/_create_project/should_create_a_project.yml +9 -8
  84. data/spec/cassettes/Projects/PUT/_set_project_field/should_archive_a_project.yml +56 -10
  85. data/spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_description.yml +56 -10
  86. data/spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_name.yml +56 -10
  87. data/spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter.yml +56 -10
  88. data/spec/cassettes/VCSRoots/GET/_vcs_root_details/should_fetch_the_vcs_root_details.yml +53 -6
  89. data/spec/cassettes/VCSRoots/GET/_vcs_roots/should_fetch_vcs_roots.yml +10 -7
  90. data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml +90 -0
  91. data/spec/spec_helper.rb +1 -1
  92. data/spec/teamcity/api_spec.rb +0 -1
  93. data/spec/teamcity/client/builds_spec.rb +36 -56
  94. data/spec/teamcity/client/buildtypes_spec.rb +78 -42
  95. data/spec/teamcity/client/projects_spec.rb +41 -32
  96. data/spec/teamcity/client/vcs_roots_spec.rb +9 -29
  97. data/spec/teamcity/client_spec.rb +5 -1
  98. data/spec/teamcity/headers_spec.rb +43 -0
  99. data/spec/teamcity_spec.rb +1 -28
  100. data/teamcity-ruby-client.gemspec +1 -0
  101. metadata +21 -23
  102. data/spec/cassettes/BuildTypes/GET/_buildtype_template/should_raise_an_exception_if_the_response_is_not_due_to_a_template_not_assigned.yml +0 -50
  103. data/spec/cassettes/Builds/GET/_build_tags/should_return_nil_if_there_are_no_build_tags_defined_for_a_build.yml +0 -44
  104. data/spec/cassettes/Builds/GET/_builds/should_allow_you_to_search_by_locator.yml +0 -44
  105. data/spec/cassettes/Projects/GET/_project_buildtypes/should_return_nil_if_the_project_does_not_have_any_build_build_types.yml +0 -44
  106. data/spec/cassettes/Projects/PUT/_set_project_field/should_un-archive_a_project.yml +0 -50
  107. data/spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter_with_a_boolean_value.yml +0 -40
  108. data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_shared_vcs_root.yml +0 -45
  109. data/spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_vcs_root_that_is_only_shared_within_a_project.yml +0 -48
@@ -1,10 +1,14 @@
1
1
  require File.expand_path('../../spec_helper', __FILE__)
2
2
 
3
3
  describe TeamCity::Client do
4
+ before(:each) do
5
+ configure_client_with_authentication
6
+ end
7
+
4
8
  it "should connect using the endpoint configuration" do
5
9
  client = TeamCity::Client.new
6
10
  endpoint = URI.parse(client.endpoint)
7
11
  connection = client.send(:connection).build_url(nil).to_s
8
- (connection + '/').should == endpoint.to_s
12
+ connection.should eq(endpoint.to_s)
9
13
  end
10
14
  end
@@ -0,0 +1,43 @@
1
+ require File.expand_path('../../spec_helper', __FILE__)
2
+
3
+ describe TeamCity::Headers do
4
+
5
+ def build_headers(*args)
6
+ TeamCity::Headers.build(*args)
7
+ end
8
+
9
+ it "should default the accept header to json" do
10
+ build_headers.accept.should eq("application/json; charset=utf-8")
11
+ end
12
+
13
+ it "should default the content_type header to json" do
14
+ build_headers.content_type.should eq("application/json")
15
+ end
16
+
17
+ it "should allow you to set the accept" do
18
+ build_headers(:accept => :text).accept.should eq("text/plain")
19
+ end
20
+
21
+ it "should not set the content_type when setting accept" do
22
+ build_headers(:accept => :text).content_type.should eq("application/json")
23
+ end
24
+
25
+ it "should allow you to set the content type" do
26
+ build_headers(:content_type => :text).content_type.should eq("text/plain")
27
+ end
28
+
29
+ it "should not allow an invalid accept format" do
30
+ expect { build_headers(:accept => :invalid) }.to raise_exception(ArgumentError)
31
+ end
32
+
33
+ it "should not allow an invalid content_type format" do
34
+ expect { build_headers(:content_type => :invalid) }.to raise_exception(ArgumentError)
35
+ end
36
+
37
+ it "should return a hash of headers" do
38
+ build_headers.to_hash.should eq({
39
+ 'Accept' => 'application/json; charset=utf-8',
40
+ 'Content-Type' => 'application/json'
41
+ })
42
+ end
43
+ end
@@ -1,24 +1,10 @@
1
1
  require "spec_helper.rb"
2
2
 
3
3
  describe TeamCity do
4
- after do
4
+ before(:each) do
5
5
  TeamCity.reset
6
6
  end
7
7
 
8
- context "when delegating to a client" do
9
- before(:each) do
10
- @url = "#{TeamCity::Configuration::DEFAULT_ENDPOINT}projects/id:project1"
11
- stub_request(:get, @url).to_return(:body => "", :headers => {:content_type => "application/json; charset=utf-8"})
12
- end
13
-
14
- it "should get the correct resource" do
15
- VCR.turned_off do
16
- TeamCity.project(id: "project1")
17
- a_request(:get, @url).should have_been_made
18
- end
19
- end
20
- end
21
-
22
8
  describe ".client" do
23
9
  it "should be a TeamCity::Client" do
24
10
  TeamCity.client.should be_a TeamCity::Client
@@ -77,19 +63,6 @@ describe TeamCity do
77
63
  end
78
64
  end
79
65
 
80
- describe ".format" do
81
- it "should return the default format" do
82
- TeamCity.format.should == TeamCity::Configuration::DEFAULT_FORMAT
83
- end
84
- end
85
-
86
- describe ".format=" do
87
- it "should set the format" do
88
- TeamCity.format = :xml
89
- TeamCity.format.should == :xml
90
- end
91
- end
92
-
93
66
  describe ".user_agent" do
94
67
  it "should return the default user agent" do
95
68
  TeamCity.user_agent.should == TeamCity::Configuration::DEFAULT_USER_AGENT
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
11
11
  gem.description = %q{A Ruby wrapper for the TeamCity Rest API}
12
12
  gem.summary = %q{Ruby wrapper for the TeamCity API}
13
13
  gem.homepage = 'https://github.com/jperry/teamcity-ruby-client'
14
+ gem.licenses = ['MIT']
14
15
 
15
16
  gem.files = `git ls-files`.split($/)
16
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
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: 0.4.0
4
+ version: 1.0.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-07-15 00:00:00.000000000 Z
11
+ date: 2013-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -203,6 +203,7 @@ files:
203
203
  - lib/teamcity/client/vcs_roots.rb
204
204
  - lib/teamcity/configuration.rb
205
205
  - lib/teamcity/connection.rb
206
+ - lib/teamcity/headers.rb
206
207
  - lib/teamcity/request.rb
207
208
  - lib/teamcity/version.rb
208
209
  - spec/cassettes/BuildTypes/DELETE/_delete_agent_requirement/should_delete_the_agent_requirement.yml
@@ -229,10 +230,10 @@ files:
229
230
  - spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_fetch_the_build_configuration_snapshot_dependencies_for_a_buildtype.yml
230
231
  - spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_return_an_array.yml
231
232
  - spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_return_nil_if_there_are_no_snapshot_dependencies_defined.yml
233
+ - spec/cassettes/BuildTypes/GET/_buildtype_state/should_fetch_the_state_of_the_buildtype.yml
232
234
  - spec/cassettes/BuildTypes/GET/_buildtype_steps/should_fetch_the_build_configuration_steps_for_a_buildtype.yml
233
235
  - spec/cassettes/BuildTypes/GET/_buildtype_steps/should_return_an_array.yml
234
236
  - spec/cassettes/BuildTypes/GET/_buildtype_steps/should_return_nil_if_there_are_no_steps_defined.yml
235
- - spec/cassettes/BuildTypes/GET/_buildtype_template/should_raise_an_exception_if_the_response_is_not_due_to_a_template_not_assigned.yml
236
237
  - spec/cassettes/BuildTypes/GET/_buildtype_template/should_return_nil_if_the_buildtype_is_not_associated_with_a_template.yml
237
238
  - spec/cassettes/BuildTypes/GET/_buildtype_template/should_return_the_attributes_of_the_associated_template.yml
238
239
  - spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_fetch_the_build_configuration_triggers_for_a_buildtype.yml
@@ -253,37 +254,34 @@ files:
253
254
  - spec/cassettes/Builds/DELETE/_unpin_build/should_unpin_a_build.yml
254
255
  - spec/cassettes/Builds/GET/_build/should_fetch_the_build_details.yml
255
256
  - spec/cassettes/Builds/GET/_build/should_raise_an_error_if_the_build_does_not_exist.yml
256
- - spec/cassettes/Builds/GET/_build_statistics/should_return_an_empty_string_for_a_build_with_no_statistics.yml
257
+ - spec/cassettes/Builds/GET/_build_pinned_/should_return_false_when_a_build_is_not_pinned.yml
258
+ - spec/cassettes/Builds/GET/_build_pinned_/should_return_true_when_a_build_is_pinned.yml
257
259
  - spec/cassettes/Builds/GET/_build_statistics/should_return_statistics_for_a_build.yml
258
260
  - spec/cassettes/Builds/GET/_build_tags/should_fetch_the_build_tags.yml
259
- - spec/cassettes/Builds/GET/_build_tags/should_return_nil_if_there_are_no_build_tags_defined_for_a_build.yml
261
+ - spec/cassettes/Builds/GET/_build_tags/should_return_an_empty_array_if_there_are_no_build_tags_defined_for_a_build.yml
260
262
  - spec/cassettes/Builds/GET/_builds/should_allow_you_to_filter_by_multiple_build_locators.yml
261
263
  - spec/cassettes/Builds/GET/_builds/should_allow_you_to_filter_results_by_build_locators.yml
262
- - spec/cassettes/Builds/GET/_builds/should_allow_you_to_search_by_locator.yml
263
264
  - spec/cassettes/Builds/GET/_builds/should_fetch_all_the_builds.yml
265
+ - spec/cassettes/Builds/GET/_builds/should_return_an_empty_array_if_no_results_are_found.yml
264
266
  - spec/cassettes/Builds/PUT/_pin_build/should_pin_a_build.yml
265
267
  - spec/cassettes/Projects/DELETE/_delete_project/should_delete_a_project.yml
266
268
  - spec/cassettes/Projects/DELETE/_delete_project_parameter/should_delete_a_project_parameter.yml
267
269
  - spec/cassettes/Projects/GET/_project/should_fetch_a_single_project_by_id.yml
268
270
  - spec/cassettes/Projects/GET/_project/should_raise_an_error_if_the_project_does_not_exist.yml
269
271
  - spec/cassettes/Projects/GET/_project_buildtypes/should_fetch_all_the_buildTypes_for_a_project.yml
270
- - spec/cassettes/Projects/GET/_project_buildtypes/should_return_nil_if_the_project_does_not_have_any_build_build_types.yml
272
+ - spec/cassettes/Projects/GET/_project_buildtypes/should_return_nil_if_the_project_does_not_have_any_build_types.yml
271
273
  - spec/cassettes/Projects/GET/_project_parameters/should_fetch_all_the_paramters_for_a_given_project.yml
272
274
  - spec/cassettes/Projects/GET/_project_parameters/should_return_nil_if_there_are_no_parameters_defined_for_a_project.yml
273
275
  - spec/cassettes/Projects/GET/_projects/should_fetch_projects.yml
274
- - spec/cassettes/Projects/GET/_projects/should_return_nil_if_there_are_no_projects.yml
275
276
  - spec/cassettes/Projects/POST/_copy_project/should_copy_a_project.yml
276
277
  - spec/cassettes/Projects/POST/_create_project/should_create_a_project.yml
277
278
  - spec/cassettes/Projects/PUT/_set_project_field/should_archive_a_project.yml
278
279
  - spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_description.yml
279
280
  - spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_name.yml
280
- - spec/cassettes/Projects/PUT/_set_project_field/should_un-archive_a_project.yml
281
281
  - spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter.yml
282
- - spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter_with_a_boolean_value.yml
283
282
  - spec/cassettes/VCSRoots/GET/_vcs_root_details/should_fetch_the_vcs_root_details.yml
284
283
  - spec/cassettes/VCSRoots/GET/_vcs_roots/should_fetch_vcs_roots.yml
285
- - spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_shared_vcs_root.yml
286
- - spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_vcs_root_that_is_only_shared_within_a_project.yml
284
+ - spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml
287
285
  - spec/faraday/null_response_body_spec.rb
288
286
  - spec/spec_helper.rb
289
287
  - spec/support/vcr_setup.rb
@@ -293,11 +291,13 @@ files:
293
291
  - spec/teamcity/client/projects_spec.rb
294
292
  - spec/teamcity/client/vcs_roots_spec.rb
295
293
  - spec/teamcity/client_spec.rb
294
+ - spec/teamcity/headers_spec.rb
296
295
  - spec/teamcity/version_spec.rb
297
296
  - spec/teamcity_spec.rb
298
297
  - teamcity-ruby-client.gemspec
299
298
  homepage: https://github.com/jperry/teamcity-ruby-client
300
- licenses: []
299
+ licenses:
300
+ - MIT
301
301
  metadata: {}
302
302
  post_install_message:
303
303
  rdoc_options: []
@@ -344,10 +344,10 @@ test_files:
344
344
  - spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_fetch_the_build_configuration_snapshot_dependencies_for_a_buildtype.yml
345
345
  - spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_return_an_array.yml
346
346
  - spec/cassettes/BuildTypes/GET/_buildtype_snapshot_dependencies/should_return_nil_if_there_are_no_snapshot_dependencies_defined.yml
347
+ - spec/cassettes/BuildTypes/GET/_buildtype_state/should_fetch_the_state_of_the_buildtype.yml
347
348
  - spec/cassettes/BuildTypes/GET/_buildtype_steps/should_fetch_the_build_configuration_steps_for_a_buildtype.yml
348
349
  - spec/cassettes/BuildTypes/GET/_buildtype_steps/should_return_an_array.yml
349
350
  - spec/cassettes/BuildTypes/GET/_buildtype_steps/should_return_nil_if_there_are_no_steps_defined.yml
350
- - spec/cassettes/BuildTypes/GET/_buildtype_template/should_raise_an_exception_if_the_response_is_not_due_to_a_template_not_assigned.yml
351
351
  - spec/cassettes/BuildTypes/GET/_buildtype_template/should_return_nil_if_the_buildtype_is_not_associated_with_a_template.yml
352
352
  - spec/cassettes/BuildTypes/GET/_buildtype_template/should_return_the_attributes_of_the_associated_template.yml
353
353
  - spec/cassettes/BuildTypes/GET/_buildtype_triggers/should_fetch_the_build_configuration_triggers_for_a_buildtype.yml
@@ -368,37 +368,34 @@ test_files:
368
368
  - spec/cassettes/Builds/DELETE/_unpin_build/should_unpin_a_build.yml
369
369
  - spec/cassettes/Builds/GET/_build/should_fetch_the_build_details.yml
370
370
  - spec/cassettes/Builds/GET/_build/should_raise_an_error_if_the_build_does_not_exist.yml
371
- - spec/cassettes/Builds/GET/_build_statistics/should_return_an_empty_string_for_a_build_with_no_statistics.yml
371
+ - spec/cassettes/Builds/GET/_build_pinned_/should_return_false_when_a_build_is_not_pinned.yml
372
+ - spec/cassettes/Builds/GET/_build_pinned_/should_return_true_when_a_build_is_pinned.yml
372
373
  - spec/cassettes/Builds/GET/_build_statistics/should_return_statistics_for_a_build.yml
373
374
  - spec/cassettes/Builds/GET/_build_tags/should_fetch_the_build_tags.yml
374
- - spec/cassettes/Builds/GET/_build_tags/should_return_nil_if_there_are_no_build_tags_defined_for_a_build.yml
375
+ - spec/cassettes/Builds/GET/_build_tags/should_return_an_empty_array_if_there_are_no_build_tags_defined_for_a_build.yml
375
376
  - spec/cassettes/Builds/GET/_builds/should_allow_you_to_filter_by_multiple_build_locators.yml
376
377
  - spec/cassettes/Builds/GET/_builds/should_allow_you_to_filter_results_by_build_locators.yml
377
- - spec/cassettes/Builds/GET/_builds/should_allow_you_to_search_by_locator.yml
378
378
  - spec/cassettes/Builds/GET/_builds/should_fetch_all_the_builds.yml
379
+ - spec/cassettes/Builds/GET/_builds/should_return_an_empty_array_if_no_results_are_found.yml
379
380
  - spec/cassettes/Builds/PUT/_pin_build/should_pin_a_build.yml
380
381
  - spec/cassettes/Projects/DELETE/_delete_project/should_delete_a_project.yml
381
382
  - spec/cassettes/Projects/DELETE/_delete_project_parameter/should_delete_a_project_parameter.yml
382
383
  - spec/cassettes/Projects/GET/_project/should_fetch_a_single_project_by_id.yml
383
384
  - spec/cassettes/Projects/GET/_project/should_raise_an_error_if_the_project_does_not_exist.yml
384
385
  - spec/cassettes/Projects/GET/_project_buildtypes/should_fetch_all_the_buildTypes_for_a_project.yml
385
- - spec/cassettes/Projects/GET/_project_buildtypes/should_return_nil_if_the_project_does_not_have_any_build_build_types.yml
386
+ - spec/cassettes/Projects/GET/_project_buildtypes/should_return_nil_if_the_project_does_not_have_any_build_types.yml
386
387
  - spec/cassettes/Projects/GET/_project_parameters/should_fetch_all_the_paramters_for_a_given_project.yml
387
388
  - spec/cassettes/Projects/GET/_project_parameters/should_return_nil_if_there_are_no_parameters_defined_for_a_project.yml
388
389
  - spec/cassettes/Projects/GET/_projects/should_fetch_projects.yml
389
- - spec/cassettes/Projects/GET/_projects/should_return_nil_if_there_are_no_projects.yml
390
390
  - spec/cassettes/Projects/POST/_copy_project/should_copy_a_project.yml
391
391
  - spec/cassettes/Projects/POST/_create_project/should_create_a_project.yml
392
392
  - spec/cassettes/Projects/PUT/_set_project_field/should_archive_a_project.yml
393
393
  - spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_description.yml
394
394
  - spec/cassettes/Projects/PUT/_set_project_field/should_set_a_projects_name.yml
395
- - spec/cassettes/Projects/PUT/_set_project_field/should_un-archive_a_project.yml
396
395
  - spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter.yml
397
- - spec/cassettes/Projects/PUT/_set_project_parameter/should_set_a_project_parameter_with_a_boolean_value.yml
398
396
  - spec/cassettes/VCSRoots/GET/_vcs_root_details/should_fetch_the_vcs_root_details.yml
399
397
  - spec/cassettes/VCSRoots/GET/_vcs_roots/should_fetch_vcs_roots.yml
400
- - spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_shared_vcs_root.yml
401
- - spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_vcs_root_that_is_only_shared_within_a_project.yml
398
+ - spec/cassettes/VCSRoots/POST/_create_vcs_root/should_create_a_vcs_root_that_is_shared_with_the_project_and_sub-projects.yml
402
399
  - spec/faraday/null_response_body_spec.rb
403
400
  - spec/spec_helper.rb
404
401
  - spec/support/vcr_setup.rb
@@ -408,6 +405,7 @@ test_files:
408
405
  - spec/teamcity/client/projects_spec.rb
409
406
  - spec/teamcity/client/vcs_roots_spec.rb
410
407
  - spec/teamcity/client_spec.rb
408
+ - spec/teamcity/headers_spec.rb
411
409
  - spec/teamcity/version_spec.rb
412
410
  - spec/teamcity_spec.rb
413
411
  has_rdoc:
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:8111/guestAuth/app/rest/7.0/buildTypes/id:bt500/template
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json; charset=utf-8
12
- User-Agent:
13
- - TeamCity Ruby Client 0.0.1
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- response:
17
- status:
18
- code: 404
19
- message: Not Found
20
- headers:
21
- Server:
22
- - Apache-Coyote/1.1
23
- Set-Cookie:
24
- - JSESSIONID=5F815E9764DA5007AF036D390890370A; Path=/; HttpOnly
25
- - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
26
- Pragma:
27
- - no-cache
28
- Expires:
29
- - Thu, 01 Jan 1970 00:00:00 GMT
30
- Cache-Control:
31
- - no-cache
32
- - no-store
33
- Content-Type:
34
- - text/plain
35
- Transfer-Encoding:
36
- - chunked
37
- Date:
38
- - Tue, 23 Apr 2013 15:14:22 GMT
39
- body:
40
- encoding: US-ASCII
41
- string: ! 'Error has occurred during request processing (Not Found).
42
-
43
- Error: jetbrains.buildServer.server.rest.errors.NotFoundException: No build
44
- type nor template is found by id ''bt500''.
45
-
46
- Could not find the entity requested. Check the reference is correct and the
47
- user has permissions to access the entity.'
48
- http_version:
49
- recorded_at: Tue, 23 Apr 2013 15:14:22 GMT
50
- recorded_with: VCR 2.4.0
@@ -1,44 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:8111/guestAuth/app/rest/7.0/builds/id:1/tags
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json; charset=utf-8
12
- User-Agent:
13
- - TeamCity Ruby Client 0.0.1
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Server:
22
- - Apache-Coyote/1.1
23
- Set-Cookie:
24
- - JSESSIONID=0C8ECFD78E515BEB320F6082D8209811; Path=/; HttpOnly
25
- - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
26
- Pragma:
27
- - no-cache
28
- Expires:
29
- - Thu, 01 Jan 1970 00:00:00 GMT
30
- Cache-Control:
31
- - no-cache
32
- - no-store
33
- Content-Type:
34
- - application/json
35
- Transfer-Encoding:
36
- - chunked
37
- Date:
38
- - Tue, 23 Apr 2013 15:36:27 GMT
39
- body:
40
- encoding: US-ASCII
41
- string: 'null'
42
- http_version:
43
- recorded_at: Tue, 23 Apr 2013 15:36:27 GMT
44
- recorded_with: VCR 2.4.0
@@ -1,44 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:8111/guestAuth/app/rest/7.0/builds?locator=count:2
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json; charset=utf-8
12
- User-Agent:
13
- - TeamCity Ruby Client 0.0.1
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Server:
22
- - Apache-Coyote/1.1
23
- Set-Cookie:
24
- - JSESSIONID=456C923C3ED6E240B92CE602E0678C32; Path=/; HttpOnly
25
- - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
26
- Pragma:
27
- - no-cache
28
- Expires:
29
- - Thu, 01 Jan 1970 00:00:00 GMT
30
- Cache-Control:
31
- - no-cache
32
- - no-store
33
- Content-Type:
34
- - application/json
35
- Transfer-Encoding:
36
- - chunked
37
- Date:
38
- - Tue, 23 Apr 2013 18:43:45 GMT
39
- body:
40
- encoding: US-ASCII
41
- string: ! '{"count":2,"nextHref":"/guestAuth/app/rest/7.0/builds?locator=count:2&count=2&start=2","build":[{"id":4,"number":"1","status":"FAILURE","buildTypeId":"bt4","startDate":"20130423T142954-0400","href":"/guestAuth/app/rest/7.0/builds/id:4","webUrl":"http://localhost:8111/viewLog.html?buildId=4&buildTypeId=bt4"},{"id":3,"number":"1","status":"FAILURE","buildTypeId":"bt2","startDate":"20130423T142629-0400","href":"/guestAuth/app/rest/7.0/builds/id:3","webUrl":"http://localhost:8111/viewLog.html?buildId=3&buildTypeId=bt2"}]}'
42
- http_version:
43
- recorded_at: Tue, 23 Apr 2013 18:43:45 GMT
44
- recorded_with: VCR 2.4.0
@@ -1,44 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:8111/guestAuth/app/rest/7.0/projects/id:project5/buildTypes
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json; charset=utf-8
12
- User-Agent:
13
- - TeamCity Ruby Client 0.0.1
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Server:
22
- - Apache-Coyote/1.1
23
- Set-Cookie:
24
- - JSESSIONID=A8CE54A1F37D36EB7C9300AA1456389C; Path=/; HttpOnly
25
- - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
26
- Pragma:
27
- - no-cache
28
- Expires:
29
- - Thu, 01 Jan 1970 00:00:00 GMT
30
- Cache-Control:
31
- - no-cache
32
- - no-store
33
- Content-Type:
34
- - application/json
35
- Transfer-Encoding:
36
- - chunked
37
- Date:
38
- - Tue, 26 Feb 2013 03:46:46 GMT
39
- body:
40
- encoding: US-ASCII
41
- string: 'null'
42
- http_version:
43
- recorded_at: Tue, 26 Feb 2013 03:46:46 GMT
44
- recorded_with: VCR 2.4.0