teamcity-ruby-client 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTE4MmFkNGIxMzQ3YTJlNmY4OTRkZGNmNGVkNzcwYmI0MjhiMzZlZQ==
4
+ YWZlZDY3OWQzYTgzNGUzNWU4ZGZjZDQ0ZDg0NjJmYmE4ZjgwNzlkMA==
5
5
  data.tar.gz: !binary |-
6
- MGRjMjFiMmE5NGJkZmIxNjUzZTczMjRiNzkwMDE5OGFmOGI4NDAxMA==
7
- !binary "U0hBNTEy":
6
+ OGFhMjM1YjVjYTMwODYzN2JmMzY2NmExODhiMGM5ZDQyMzViYzFkMw==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- Njc4OWRkZjRiMTE1NTkyYjY2YjEyNzZjYjZiZWU0Mzg5NmQwYTE0YzIwN2Y2
10
- OTBjNDVjYTdmOTM3ZmM1NjRkM2ZiNzg4YTUwNGI3MDk4OGQ1MTQ0MzJkODJj
11
- NmQ1NDA1YjViYTMyNDg1ZjVjNGEwNWZmNWNjNGNjYzkzMGM2MDQ=
9
+ YmZkZGE0MTA5Y2EwZWFmNmNiMjU5ZGM3NTI3OWIxNzU2ODVhODQ0YjMzNGNj
10
+ NGVjNDUwZmYwYzU4NTBhNTQ1MDIwZDEzOGNlMDJjNjRhYWRhZDdiMGQ0MjBk
11
+ MmJiZDAyNTk2NjIyNTFmMDVhMzRjZTY5ZWQ0Njg0NzBlY2VhYjE=
12
12
  data.tar.gz: !binary |-
13
- NDlmMWZjNTJjMzc3YmJhZjM3ODE1NDA4MzdmYjkyYmJmYTgxOWJjZGVhNTlh
14
- NjExOWI4YmQ5NDE1ZmIwOTA4MTcxMjhjNGViZWRhNzA1ZDRiZTQ1NDVmYjgy
15
- ODFlNjBjMjdjMGU2OGE1YmRlZWUxNGVhYjA1YTlhMzhiMjExNWU=
13
+ N2Y5N2E2M2M5YTI4MTJiYzZkZDFhNDg3OTQ0OGFhOTk1YjMwMjhiYWJlY2Ni
14
+ ZGI2ZTliZTkxMmE3MGE0NTU2ODMxNjQ1N2ViOGY1ZjcwZjI4MDU0NDRhZjc4
15
+ ZmQzYWMxNDk2ZDRhZjUzNWFmMGU4Mjg5NzEwZWVjZDFlMzMxNzU=
@@ -1,3 +1,13 @@
1
+ ## 1.0.1 (Nov 1, 2013)
2
+
3
+ * Features:
4
+ * Added ```build_artifacts``` (Provides the ability to fetch the
5
+ contents of an aritfact), courtesy of [@orikremer](https://github.com/orikremer)
6
+
7
+ * Gem Updates
8
+ * Upgraded webmock to remove deprecation warning, courtesy of
9
+ [@akiellor](https://github.com/akiellor)
10
+
1
11
  ## 1.0.0 (Aug 26, 2013)
2
12
 
3
13
  * Features:
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # The TeamCity Ruby Gem
1
+ # The TeamCity Ruby Gem [![Gem Version](https://badge.fury.io/rb/teamcity-ruby-client.png)](http://badge.fury.io/rb/teamcity-ruby-client)
2
2
  [![Build Status](https://secure.travis-ci.org/jperry/teamcity-ruby-client.png?branch=master)](http://travis-ci.org/jperry/teamcity-ruby-client) [![Code Climate](https://codeclimate.com/github/jperry/teamcity-ruby-client.png)](https://codeclimate.com/github/jperry/teamcity-ruby-client) [![Dependency Status](https://gemnasium.com/jperry/teamcity-ruby-client.png)](https://gemnasium.com/jperry/teamcity-ruby-client)
3
3
 
4
4
  Ruby wrapper for the TeamCity Rest API
@@ -53,6 +53,15 @@ module TeamCity
53
53
  response == 'true'
54
54
  end
55
55
 
56
+ # Get build artifacts
57
+ #
58
+ # @param build_id [String]
59
+ # @return [Array<Hashie::Mash>]
60
+ def build_artifacts(build_id)
61
+ response = get("builds/#{build_id}/artifacts")
62
+ response['files']
63
+ end
64
+
56
65
  # HTTP PUT
57
66
 
58
67
  # Pin a build
@@ -79,4 +88,4 @@ module TeamCity
79
88
  end
80
89
  end
81
90
  end
82
- end
91
+ end
@@ -1,3 +1,3 @@
1
1
  module TeamCity
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - TeamCity Ruby Client 0.4.0
12
+ Accept:
13
+ - application/json; charset=utf-8
14
+ Content-Type:
15
+ - application/json
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - Apache-Coyote/1.1
25
+ Set-Cookie:
26
+ - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
27
+ - TCSESSIONID=1CE4A6AA2D89A14C00DEF4649365415A; Path=/; HttpOnly
28
+ Pragma:
29
+ - no-cache
30
+ Expires:
31
+ - Thu, 01 Jan 1970 00:00:00 GMT
32
+ Cache-Control:
33
+ - no-cache
34
+ - no-store
35
+ Content-Type:
36
+ - application/json
37
+ Transfer-Encoding:
38
+ - chunked
39
+ Date:
40
+ - Wed, 14 Aug 2013 14:42:50 GMT
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ! '{"count":6,"build":[{"id":36,"number":"4","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T101733-0400","href":"/httpAuth/app/rest/builds/id:36","webUrl":"http://localhost:8111/viewLog.html?buildId=36&buildTypeId=BuildTests_GetBuildTests"},{"id":35,"number":"3","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100159-0400","href":"/httpAuth/app/rest/builds/id:35","webUrl":"http://localhost:8111/viewLog.html?buildId=35&buildTypeId=BuildTests_GetBuildTests"},{"id":34,"number":"2","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100151-0400","href":"/httpAuth/app/rest/builds/id:34","webUrl":"http://localhost:8111/viewLog.html?buildId=34&buildTypeId=BuildTests_GetBuildTests"},{"id":33,"number":"1","status":"SUCCESS","buildTypeId":"BuildTests_GetBuildTests","startDate":"20130814T100134-0400","href":"/httpAuth/app/rest/builds/id:33","webUrl":"http://localhost:8111/viewLog.html?buildId=33&buildTypeId=BuildTests_GetBuildTests"},{"id":32,"number":"2","status":"FAILURE","buildTypeId":"BuildTypeTests_GetBuildTypeWithInvestigations","startDate":"20130814T073131-0400","href":"/httpAuth/app/rest/builds/id:32","webUrl":"http://localhost:8111/viewLog.html?buildId=32&buildTypeId=BuildTypeTests_GetBuildTypeWithInvestigations"},{"id":31,"number":"1","status":"FAILURE","buildTypeId":"BuildTypeTests_GetBuildTypeWithInvestigations","startDate":"20130814T073100-0400","href":"/httpAuth/app/rest/builds/id:31","webUrl":"http://localhost:8111/viewLog.html?buildId=31&buildTypeId=BuildTypeTests_GetBuildTypeWithInvestigations"}]}'
44
+ http_version:
45
+ recorded_at: Wed, 14 Aug 2013 14:42:50 GMT
46
+ - request:
47
+ method: get
48
+ uri: http://teamcity-ruby-client:teamcity@localhost:8111/httpAuth/app/rest/builds/36/artifacts
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ User-Agent:
54
+ - TeamCity Ruby Client 0.4.0
55
+ Accept:
56
+ - application/json; charset=utf-8
57
+ Content-Type:
58
+ - application/json
59
+ Accept-Encoding:
60
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
61
+ response:
62
+ status:
63
+ code: 200
64
+ message: OK
65
+ headers:
66
+ Server:
67
+ - Apache-Coyote/1.1
68
+ Set-Cookie:
69
+ - RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
70
+ - TCSESSIONID=31DD1D2449D527108E6A34EFCEE6AB4A; Path=/; HttpOnly
71
+ Pragma:
72
+ - no-cache
73
+ Expires:
74
+ - Thu, 01 Jan 1970 00:00:00 GMT
75
+ Cache-Control:
76
+ - no-cache
77
+ - no-store
78
+ Content-Type:
79
+ - application/json
80
+ Transfer-Encoding:
81
+ - chunked
82
+ Date:
83
+ - Wed, 14 Aug 2013 14:02:16 GMT
84
+ body:
85
+ encoding: US-ASCII
86
+ string: ! '{ "files": [ { "size": 92933897, "modificationTime": "20130924T013600-0400", "content": { "href": "/httpAuth/app/rest/builds/id:36/artifacts/content/artifact1.zip" }, "children": { "href": "/httpAuth/app/rest/builds/id:36/artifacts/children/artifact1.zip" }, "name": "artifact1.zip", "href": "/httpAuth/app/rest/builds/id:36/artifacts/metadata/artifact1.zip" }, { "size": 6504, "modificationTime": "20130924T013608-0400", "content": { "href": "/httpAuth/app/rest/builds/id:36/artifacts/content/artifact2.html" }, "name": "artifact2.html", "href": "/httpAuth/app/rest/builds/id:36/artifacts/artifact2.html" } ] }'
87
+ http_version:
88
+ recorded_at: Wed, 14 Aug 2013 14:02:16 GMT
89
+ recorded_with: VCR 2.4.0
@@ -82,6 +82,14 @@ describe 'Builds' do
82
82
  results.should have_at_least(1).items
83
83
  end
84
84
  end
85
+
86
+ describe '.build_artifacts' do
87
+ it 'should fetch all the artifacts' do
88
+ build = @tc.builds.first
89
+ artifacts = @tc.build_artifacts(build.id)
90
+ artifacts.should have_at_least(2).items
91
+ end
92
+ end
85
93
  end
86
94
 
87
95
  describe 'PUT', :vcr do
@@ -102,4 +110,4 @@ describe 'Builds' do
102
110
  end
103
111
  end
104
112
  end
105
- end
113
+ end
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
20
20
 
21
21
  # Dependencies
22
22
  gem.add_development_dependency('rspec', '~> 2.12')
23
- gem.add_development_dependency('webmock', '~> 1.11.0')
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')
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.0.0
4
+ version: 1.0.1
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-08-26 00:00:00.000000000 Z
11
+ date: 2013-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 1.11.0
33
+ version: 1.8.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: 1.11.0
40
+ version: 1.8.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -254,6 +254,7 @@ files:
254
254
  - spec/cassettes/Builds/DELETE/_unpin_build/should_unpin_a_build.yml
255
255
  - spec/cassettes/Builds/GET/_build/should_fetch_the_build_details.yml
256
256
  - spec/cassettes/Builds/GET/_build/should_raise_an_error_if_the_build_does_not_exist.yml
257
+ - spec/cassettes/Builds/GET/_build_artifacts/should_fetch_all_the_artifacts.yml
257
258
  - spec/cassettes/Builds/GET/_build_pinned_/should_return_false_when_a_build_is_not_pinned.yml
258
259
  - spec/cassettes/Builds/GET/_build_pinned_/should_return_true_when_a_build_is_pinned.yml
259
260
  - spec/cassettes/Builds/GET/_build_statistics/should_return_statistics_for_a_build.yml
@@ -315,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
316
  version: '0'
316
317
  requirements: []
317
318
  rubyforge_project:
318
- rubygems_version: 2.0.3
319
+ rubygems_version: 2.1.10
319
320
  signing_key:
320
321
  specification_version: 4
321
322
  summary: Ruby wrapper for the TeamCity API
@@ -368,6 +369,7 @@ test_files:
368
369
  - spec/cassettes/Builds/DELETE/_unpin_build/should_unpin_a_build.yml
369
370
  - spec/cassettes/Builds/GET/_build/should_fetch_the_build_details.yml
370
371
  - spec/cassettes/Builds/GET/_build/should_raise_an_error_if_the_build_does_not_exist.yml
372
+ - spec/cassettes/Builds/GET/_build_artifacts/should_fetch_all_the_artifacts.yml
371
373
  - spec/cassettes/Builds/GET/_build_pinned_/should_return_false_when_a_build_is_not_pinned.yml
372
374
  - spec/cassettes/Builds/GET/_build_pinned_/should_return_true_when_a_build_is_pinned.yml
373
375
  - spec/cassettes/Builds/GET/_build_statistics/should_return_statistics_for_a_build.yml