jenkins-remote-api_1 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +5 -0
  3. data/Gemfile +10 -0
  4. data/Gemfile.lock +27 -0
  5. data/LICENSE +19 -0
  6. data/README.md +177 -0
  7. data/Rakefile +10 -0
  8. data/fixtures/vcr_cassettes/TestHudsonBuildQueue_test_list.yml +38 -0
  9. data/fixtures/vcr_cassettes/TestHudsonBuild_setup.yml +407 -0
  10. data/fixtures/vcr_cassettes/TestHudsonBuild_test_build_info.yml +222 -0
  11. data/fixtures/vcr_cassettes/TestHudsonClient_test_build_job_.yml +52 -0
  12. data/fixtures/vcr_cassettes/TestHudsonClient_test_build_job_with_parameters_.yml +52 -0
  13. data/fixtures/vcr_cassettes/TestHudsonClient_test_build_queue_info.yml +38 -0
  14. data/fixtures/vcr_cassettes/TestHudsonClient_test_create_item_.yml +52 -0
  15. data/fixtures/vcr_cassettes/TestHudsonClient_test_delete_job_.yml +52 -0
  16. data/fixtures/vcr_cassettes/TestHudsonClient_test_job_build_info.yml +39 -0
  17. data/fixtures/vcr_cassettes/TestHudsonClient_test_job_config_info.yml +48 -0
  18. data/fixtures/vcr_cassettes/TestHudsonJob_test_build.yml +409 -0
  19. data/fixtures/vcr_cassettes/TestHudsonJob_test_build_with_params.yml +189 -0
  20. data/fixtures/vcr_cassettes/TestHudsonJob_test_builds_list.yml +192 -0
  21. data/fixtures/vcr_cassettes/TestHudsonJob_test_copy.yml +410 -0
  22. data/fixtures/vcr_cassettes/TestHudsonJob_test_create.yml +257 -0
  23. data/fixtures/vcr_cassettes/TestHudsonJob_test_desc_update.yml +281 -0
  24. data/fixtures/vcr_cassettes/TestHudsonJob_test_get.yml +191 -0
  25. data/fixtures/vcr_cassettes/TestHudsonJob_test_job_with_spaces.yml +260 -0
  26. data/fixtures/vcr_cassettes/TestHudsonJob_test_list.yml +39 -0
  27. data/fixtures/vcr_cassettes/TestHudsonJob_test_list_active.yml +39 -0
  28. data/fixtures/vcr_cassettes/TestHudsonJob_test_new.yml +561 -0
  29. data/fixtures/vcr_cassettes/TestHudsonJob_test_scm_url.yml +728 -0
  30. data/fixtures/vcr_cassettes/TestHudsonJob_test_triggers_delete.yml +588 -0
  31. data/fixtures/vcr_cassettes/TestHudsonJob_test_triggers_set.yml +346 -0
  32. data/fixtures/vcr_cassettes/TestHudsonJob_test_triggers_set_using_shortcut.yml +346 -0
  33. data/fixtures/vcr_cassettes/TestHudsonJob_test_url.yml +156 -0
  34. data/fixtures/vcr_cassettes/TestHudsonJob_test_wipe_out_workspace.yml +685 -0
  35. data/jenkins-remote-api_1.gemspec +23 -0
  36. data/lib/jenkins-remote-api_1.rb +5 -0
  37. data/lib/jenkins-remote-api_1/build.rb +24 -0
  38. data/lib/jenkins-remote-api_1/build_queue.rb +16 -0
  39. data/lib/jenkins-remote-api_1/client.rb +179 -0
  40. data/lib/jenkins-remote-api_1/errors.rb +3 -0
  41. data/lib/jenkins-remote-api_1/hudson_xml_api.rb +61 -0
  42. data/lib/jenkins-remote-api_1/job.rb +212 -0
  43. data/lib/jenkins-remote-api_1/multicast.rb +22 -0
  44. data/lib/jenkins-remote-api_1/new_job_config.xml +16 -0
  45. data/lib/jenkins-remote-api_1/parser/build_info.rb +37 -0
  46. data/lib/jenkins-remote-api_1/parser/build_queue_info.rb +19 -0
  47. data/lib/jenkins-remote-api_1/parser/job_config_info.rb +99 -0
  48. data/lib/jenkins-remote-api_1/parser/job_info.rb +62 -0
  49. data/lib/jenkins-remote-api_1/parser/multicast.rb +28 -0
  50. data/lib/jenkins-remote-api_1/parser/server_info.rb +49 -0
  51. data/lib/jenkins-remote-api_1/settings.rb +31 -0
  52. data/lib/jenkins-remote-api_1/version.rb +3 -0
  53. data/lib/jenkins-remote-api_1/xml_writer/job_config_info.rb +113 -0
  54. data/test/test_helper.rb +10 -0
  55. data/test/test_hudson_build.rb +28 -0
  56. data/test/test_hudson_build_queue.rb +11 -0
  57. data/test/test_hudson_client.rb +65 -0
  58. data/test/test_hudson_job.rb +162 -0
  59. data/test/test_hudson_multicast.rb +9 -0
  60. data/test/test_hudson_settings.rb +70 -0
  61. metadata +112 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fa0db038dc26d50d0674c74f9c941b0dac98fb91
4
+ data.tar.gz: 9ad582d8a1fef26f030252c66e2e124f31ced6bc
5
+ SHA512:
6
+ metadata.gz: eb219a5d7dbbd282aaf31576fd26c65b50372e48cf575ca4aa429230f3b0bf3198e5c3c6e96c511fd4d5af7848653dd6800a07a5365a6c30c7d0e87da0965c24
7
+ data.tar.gz: 8ecb5db1777d21eff3bfc33e61155ad1fb7c515a2f5d1b1f7f73d00c815ad6edb12190e24143cdba267a387463016adfd25bedc7d391d086cffb1d5e4ffcf310
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ .rbenv-version
2
+ hudson_settings.yml
3
+ *.gem
4
+ .DS_Store
5
+ .ruby-gemset
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # A sample Gemfile
2
+ source "https://rubygems.org"
3
+
4
+ gem 'rake'
5
+
6
+ group :test do
7
+ gem 'test-unit'
8
+ gem 'webmock', '1.20.3'
9
+ gem 'vcr', '2.9.3'
10
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,27 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ addressable (2.3.6)
5
+ crack (0.4.2)
6
+ safe_yaml (~> 1.0.0)
7
+ power_assert (0.2.6)
8
+ rake (0.9.2.2)
9
+ safe_yaml (1.0.4)
10
+ test-unit (3.1.5)
11
+ power_assert
12
+ vcr (2.9.3)
13
+ webmock (1.20.3)
14
+ addressable (>= 2.3.6)
15
+ crack (>= 0.3.2)
16
+
17
+ PLATFORMS
18
+ ruby
19
+
20
+ DEPENDENCIES
21
+ rake
22
+ test-unit
23
+ vcr (= 2.9.3)
24
+ webmock (= 1.20.3)
25
+
26
+ BUNDLED WITH
27
+ 1.11.2
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2010 Dru Ibarra
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,177 @@
1
+ [![Build Status](https://secure.travis-ci.org/Druwerd/jenkins-remote-api_1.png)](http://travis-ci.org/Druwerd/jenkins-remote-api_1)
2
+ # jenkins-remote-api_1
3
+ jenkins-remote-api_1 is ruby library to talk to Hudson's xml remote access api
4
+
5
+ ## Installation:
6
+
7
+ gem install jenkins-remote-api_1
8
+
9
+ ## Configuration:
10
+
11
+ ```ruby
12
+ require 'jenkins-remote-api_1'
13
+ ```
14
+
15
+ ```ruby
16
+ # Auto Configuration
17
+ # detects Hudson instance on your network & sets the host name
18
+ Hudson.auto_configure
19
+ ```
20
+ Or
21
+
22
+ ```ruby
23
+ # Manual Configuration
24
+ settings = {
25
+ :host => 'http://localhost:8080',
26
+ :user => 'hudson',
27
+ :password => 'password',
28
+ :version => '1.0',
29
+ :crumb => true, # To turn on/off checking for crumbIssuer
30
+ :proxy_host => 'your-proxy-host', # To turn on proxy access
31
+ :proxy_port => 888
32
+ }
33
+ Hudson.client(settings)
34
+
35
+ ```
36
+ ## Usage:
37
+
38
+ ### List jobs
39
+ ```ruby
40
+ # list all jobs
41
+ Hudson::Job.list
42
+
43
+ # list current active jobs
44
+ Hudson::Job.list_active
45
+ ```
46
+
47
+ ### Build Queue
48
+ ```ruby
49
+ # list all jobs in the build queue (waiting to run)
50
+ Hudson::BuildQueue.list
51
+ ```
52
+
53
+ ### Create (or load existing) job
54
+ ```ruby
55
+ j = Hudson::Job.new('my_new_job')
56
+ ```
57
+
58
+ ### Actions on a job
59
+ ```ruby
60
+ j = Hudson::Job.new('my_new_job')
61
+
62
+ # start a build
63
+ j.build
64
+
65
+ # start a parameterized build. Pass parameters as a Hash.
66
+ j.build({ :awesome_dev => "thomasbiddle" })
67
+
68
+ # create a copy of existing job
69
+ j.copy('copy_of_my_job')
70
+
71
+ # disable the job
72
+ j.disable
73
+
74
+ # enable the job
75
+ j.enable
76
+
77
+ # clear out the job's workspace
78
+ j.wipe_out_workspace
79
+
80
+ # wait (sleep) until the job has completed building
81
+ j.wait_for_build_to_finish
82
+
83
+ # delete the job
84
+ j.delete
85
+ ```
86
+
87
+ ### Information on a job
88
+ ```ruby
89
+ j = Hudson::Job.new('job_name')
90
+
91
+ # job's current build indicator color
92
+ puts j.color
93
+
94
+ # returns true if job is currently running
95
+ j.active?
96
+
97
+ # list of job's build numbers
98
+ puts j.builds_list
99
+
100
+ # latest build number
101
+ puts j.last_build
102
+
103
+ # latest successful build number
104
+ puts j.last_successful_build
105
+
106
+ # latest failed build number
107
+ puts j.last_failed_build
108
+
109
+ # next build number
110
+ puts j.next_build_number
111
+
112
+ # view current triggers
113
+ # returns hash containing trigger name in key and trigger spec in value.
114
+ # Example: {"hudson.triggers.TimerTrigger"=>"0 22 * * *", "hudson.triggers.SCMTrigger"=>"* * * * *"}
115
+ j.triggers
116
+ ```
117
+
118
+ ### Information on a build
119
+ ```ruby
120
+ # gets information on latest build
121
+ b = Hudson::Build.new('job_name')
122
+
123
+ # gets information on particular build number
124
+ b = Hudson::Build.new('job_name', 42)
125
+
126
+ # get commit revisions in this build
127
+ puts b.revisions
128
+
129
+ # get the result of this build
130
+ puts b.result
131
+
132
+ # get the culprit of this build
133
+ puts b.culprit
134
+ ```
135
+
136
+ ### Modifying a job
137
+
138
+ #### Set job description
139
+ ```ruby
140
+ j.description = "My new job description"
141
+ ```
142
+
143
+ #### Set repository
144
+ ```ruby
145
+ # Git
146
+ j.repository_url = { :url => 'https://github.com/beeplove/jenkins-remote-api_1-mkhan.git', :branch => 'origin/master' }
147
+ # or, only to change branch
148
+ j.repository_url = { :branch => 'origin/master' }
149
+
150
+ # SVN
151
+ j.repository_url = "http://svn.myrepo.com"
152
+ ```
153
+
154
+ #### Set build triggers
155
+ ```ruby
156
+ j.triggers = { 'hudson.triggers.SCMTrigger' => '* * * * *'}
157
+ # or, using shortcut
158
+ j.triggers = { 'SCMTrigger' => '* * * * *', 'TimerTrigger' => '0 22 * * *'}
159
+
160
+ # Add or update a trigger in existing triggers*
161
+ j.triggers = j.triggers.merge({ 'hudson.triggers.TimerTrigger' => '0 22 * * *'})
162
+
163
+ # Delete existing triggers
164
+ j.triggers = {}
165
+ # or,
166
+ j.triggers = nil
167
+
168
+ ```
169
+ *Avoid using shortcut form when editing a trigger in existing triggers
170
+
171
+ ## Contributing
172
+
173
+ 1. Fork it
174
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
175
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
176
+ 4. Push to the branch (`git push origin my-new-feature`)
177
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs << 'test'
7
+ end
8
+
9
+ desc "Run tests"
10
+ task :default => :test
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:8080/queue/api/xml
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Content-Type:
17
+ - text/xml
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ X-Jenkins:
24
+ - '1.583'
25
+ X-Jenkins-Session:
26
+ - 394516d7
27
+ Content-Type:
28
+ - application/xml;charset=UTF-8
29
+ Content-Length:
30
+ - '30'
31
+ Server:
32
+ - Jetty(8.y.z-SNAPSHOT)
33
+ body:
34
+ encoding: UTF-8
35
+ string: "<queue></queue>"
36
+ http_version:
37
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
38
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,407 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:8080/crumbIssuer/api/xml
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Content-Type:
17
+ - text/xml
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ X-Jenkins:
24
+ - '1.583'
25
+ X-Jenkins-Session:
26
+ - 394516d7
27
+ Content-Type:
28
+ - application/xml;charset=UTF-8
29
+ Content-Length:
30
+ - '107'
31
+ Server:
32
+ - Jetty(8.y.z-SNAPSHOT)
33
+ body:
34
+ encoding: UTF-8
35
+ string: "<defaultCrumbIssuer><crumb>d6162b9f2e248ec452bad69592fb87ea</crumb><crumbRequestField>.crumb</crumbRequestField></defaultCrumbIssuer>"
36
+ http_version:
37
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
38
+ - request:
39
+ method: get
40
+ uri: http://localhost:8080/api/xml
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ''
44
+ headers:
45
+ Accept-Encoding:
46
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
47
+ Accept:
48
+ - "*/*"
49
+ User-Agent:
50
+ - Ruby
51
+ Content-Type:
52
+ - text/xml
53
+ response:
54
+ status:
55
+ code: 200
56
+ message: OK
57
+ headers:
58
+ X-Jenkins:
59
+ - '1.583'
60
+ X-Jenkins-Session:
61
+ - 394516d7
62
+ Content-Type:
63
+ - application/xml;charset=UTF-8
64
+ Content-Length:
65
+ - '325'
66
+ Server:
67
+ - Jetty(8.y.z-SNAPSHOT)
68
+ body:
69
+ encoding: UTF-8
70
+ string: "<hudson><assignedLabel></assignedLabel><mode>NORMAL</mode><nodeDescription>the
71
+ master Jenkins node</nodeDescription><nodeName></nodeName><numExecutors>2</numExecutors><job><name>build_triggers</name><url>http://localhost:8080/job/build_triggers/</url><color>notbuilt</color></job><job><name>test_job</name><url>http://localhost:8080/job/test_job/</url><color>blue</color></job><job><name>test_svn_job</name><url>http://localhost:8080/job/test_svn_job/</url><color>blue</color></job><overallLoad></overallLoad><primaryView><name>All</name><url>http://localhost:8080/</url></primaryView><quietingDown>false</quietingDown><slaveAgentPort>0</slaveAgentPort><unlabeledLoad></unlabeledLoad><useCrumbs>true</useCrumbs><useSecurity>false</useSecurity><view><name>All</name><url>http://localhost:8080/</url></view></hudson>"
72
+ http_version:
73
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
74
+ - request:
75
+ method: get
76
+ uri: http://localhost:8080/job/test_job/config.xml
77
+ body:
78
+ encoding: US-ASCII
79
+ string: ''
80
+ headers:
81
+ Accept-Encoding:
82
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
83
+ Accept:
84
+ - "*/*"
85
+ User-Agent:
86
+ - Ruby
87
+ Content-Type:
88
+ - text/xml
89
+ response:
90
+ status:
91
+ code: 200
92
+ message: OK
93
+ headers:
94
+ Content-Type:
95
+ - application/xml
96
+ Content-Length:
97
+ - '498'
98
+ Server:
99
+ - Jetty(8.y.z-SNAPSHOT)
100
+ body:
101
+ encoding: UTF-8
102
+ string: |-
103
+ <?xml version="1.0" encoding="UTF-8"?><project>
104
+ <keepDependencies>false</keepDependencies>
105
+ <properties/>
106
+ <scm class="hudson.scm.NullSCM"/>
107
+ <canRoam>false</canRoam>
108
+ <disabled>false</disabled>
109
+ <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
110
+ <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
111
+ <triggers/>
112
+ <concurrentBuild>false</concurrentBuild>
113
+ <builders/>
114
+ <publishers/>
115
+ <buildWrappers/>
116
+ <description>test</description></project>
117
+ http_version:
118
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
119
+ - request:
120
+ method: get
121
+ uri: http://localhost:8080/job/test_job/api/xml
122
+ body:
123
+ encoding: US-ASCII
124
+ string: ''
125
+ headers:
126
+ Accept-Encoding:
127
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
128
+ Accept:
129
+ - "*/*"
130
+ User-Agent:
131
+ - Ruby
132
+ Content-Type:
133
+ - text/xml
134
+ response:
135
+ status:
136
+ code: 200
137
+ message: OK
138
+ headers:
139
+ X-Jenkins:
140
+ - '1.583'
141
+ X-Jenkins-Session:
142
+ - 394516d7
143
+ Content-Type:
144
+ - application/xml;charset=UTF-8
145
+ Content-Length:
146
+ - '376'
147
+ Server:
148
+ - Jetty(8.y.z-SNAPSHOT)
149
+ body:
150
+ encoding: UTF-8
151
+ string: "<freeStyleProject><description>test</description><displayName>test_job</displayName><name>test_job</name><url>http://localhost:8080/job/test_job/</url><buildable>true</buildable><build><number>2</number><url>http://localhost:8080/job/test_job/2/</url></build><build><number>1</number><url>http://localhost:8080/job/test_job/1/</url></build><color>blue</color><firstBuild><number>1</number><url>http://localhost:8080/job/test_job/1/</url></firstBuild><healthReport><description>Build
152
+ stability: No recent builds failed.</description><iconClassName>icon-health-80plus</iconClassName><iconUrl>health-80plus.png</iconUrl><score>100</score></healthReport><inQueue>false</inQueue><keepDependencies>false</keepDependencies><lastBuild><number>2</number><url>http://localhost:8080/job/test_job/2/</url></lastBuild><lastCompletedBuild><number>2</number><url>http://localhost:8080/job/test_job/2/</url></lastCompletedBuild><lastStableBuild><number>2</number><url>http://localhost:8080/job/test_job/2/</url></lastStableBuild><lastSuccessfulBuild><number>2</number><url>http://localhost:8080/job/test_job/2/</url></lastSuccessfulBuild><nextBuildNumber>3</nextBuildNumber><concurrentBuild>false</concurrentBuild><scm></scm></freeStyleProject>"
153
+ http_version:
154
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
155
+ - request:
156
+ method: post
157
+ uri: http://localhost:8080/job/test_job/build
158
+ body:
159
+ encoding: US-ASCII
160
+ string: delay=0sec
161
+ headers:
162
+ Accept-Encoding:
163
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
164
+ Accept:
165
+ - "*/*"
166
+ User-Agent:
167
+ - Ruby
168
+ Content-Type:
169
+ - application/x-www-form-urlencoded
170
+ ".crumb":
171
+ - d6162b9f2e248ec452bad69592fb87ea
172
+ response:
173
+ status:
174
+ code: 201
175
+ message: Created
176
+ headers:
177
+ Location:
178
+ - http://localhost:8080/queue/item/9/
179
+ Content-Length:
180
+ - '0'
181
+ Server:
182
+ - Jetty(8.y.z-SNAPSHOT)
183
+ body:
184
+ encoding: UTF-8
185
+ string: ''
186
+ http_version:
187
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
188
+ - request:
189
+ method: get
190
+ uri: http://localhost:8080/crumbIssuer/api/xml
191
+ body:
192
+ encoding: US-ASCII
193
+ string: ''
194
+ headers:
195
+ Accept-Encoding:
196
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
197
+ Accept:
198
+ - "*/*"
199
+ User-Agent:
200
+ - Ruby
201
+ Content-Type:
202
+ - text/xml
203
+ response:
204
+ status:
205
+ code: 200
206
+ message: OK
207
+ headers:
208
+ X-Jenkins:
209
+ - '1.583'
210
+ X-Jenkins-Session:
211
+ - 394516d7
212
+ Content-Type:
213
+ - application/xml;charset=UTF-8
214
+ Content-Length:
215
+ - '107'
216
+ Server:
217
+ - Jetty(8.y.z-SNAPSHOT)
218
+ body:
219
+ encoding: UTF-8
220
+ string: "<defaultCrumbIssuer><crumb>d6162b9f2e248ec452bad69592fb87ea</crumb><crumbRequestField>.crumb</crumbRequestField></defaultCrumbIssuer>"
221
+ http_version:
222
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
223
+ - request:
224
+ method: get
225
+ uri: http://localhost:8080/api/xml
226
+ body:
227
+ encoding: US-ASCII
228
+ string: ''
229
+ headers:
230
+ Accept-Encoding:
231
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
232
+ Accept:
233
+ - "*/*"
234
+ User-Agent:
235
+ - Ruby
236
+ Content-Type:
237
+ - text/xml
238
+ response:
239
+ status:
240
+ code: 200
241
+ message: OK
242
+ headers:
243
+ X-Jenkins:
244
+ - '1.583'
245
+ X-Jenkins-Session:
246
+ - 394516d7
247
+ Content-Type:
248
+ - application/xml;charset=UTF-8
249
+ Content-Length:
250
+ - '331'
251
+ Server:
252
+ - Jetty(8.y.z-SNAPSHOT)
253
+ body:
254
+ encoding: UTF-8
255
+ string: "<hudson><assignedLabel></assignedLabel><mode>NORMAL</mode><nodeDescription>the
256
+ master Jenkins node</nodeDescription><nodeName></nodeName><numExecutors>2</numExecutors><job><name>build_triggers</name><url>http://localhost:8080/job/build_triggers/</url><color>notbuilt</color></job><job><name>test_job</name><url>http://localhost:8080/job/test_job/</url><color>blue_anime</color></job><job><name>test_svn_job</name><url>http://localhost:8080/job/test_svn_job/</url><color>blue</color></job><overallLoad></overallLoad><primaryView><name>All</name><url>http://localhost:8080/</url></primaryView><quietingDown>false</quietingDown><slaveAgentPort>0</slaveAgentPort><unlabeledLoad></unlabeledLoad><useCrumbs>true</useCrumbs><useSecurity>false</useSecurity><view><name>All</name><url>http://localhost:8080/</url></view></hudson>"
257
+ http_version:
258
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
259
+ - request:
260
+ method: get
261
+ uri: http://localhost:8080/job/test_job/config.xml
262
+ body:
263
+ encoding: US-ASCII
264
+ string: ''
265
+ headers:
266
+ Accept-Encoding:
267
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
268
+ Accept:
269
+ - "*/*"
270
+ User-Agent:
271
+ - Ruby
272
+ Content-Type:
273
+ - text/xml
274
+ response:
275
+ status:
276
+ code: 200
277
+ message: OK
278
+ headers:
279
+ Content-Type:
280
+ - application/xml
281
+ Content-Length:
282
+ - '498'
283
+ Server:
284
+ - Jetty(8.y.z-SNAPSHOT)
285
+ body:
286
+ encoding: UTF-8
287
+ string: |-
288
+ <?xml version="1.0" encoding="UTF-8"?><project>
289
+ <keepDependencies>false</keepDependencies>
290
+ <properties/>
291
+ <scm class="hudson.scm.NullSCM"/>
292
+ <canRoam>false</canRoam>
293
+ <disabled>false</disabled>
294
+ <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
295
+ <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
296
+ <triggers/>
297
+ <concurrentBuild>false</concurrentBuild>
298
+ <builders/>
299
+ <publishers/>
300
+ <buildWrappers/>
301
+ <description>test</description></project>
302
+ http_version:
303
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
304
+ - request:
305
+ method: get
306
+ uri: http://localhost:8080/job/test_job/api/xml
307
+ body:
308
+ encoding: US-ASCII
309
+ string: ''
310
+ headers:
311
+ Accept-Encoding:
312
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
313
+ Accept:
314
+ - "*/*"
315
+ User-Agent:
316
+ - Ruby
317
+ Content-Type:
318
+ - text/xml
319
+ response:
320
+ status:
321
+ code: 200
322
+ message: OK
323
+ headers:
324
+ X-Jenkins:
325
+ - '1.583'
326
+ X-Jenkins-Session:
327
+ - 394516d7
328
+ Content-Type:
329
+ - application/xml;charset=UTF-8
330
+ Content-Length:
331
+ - '391'
332
+ Server:
333
+ - Jetty(8.y.z-SNAPSHOT)
334
+ body:
335
+ encoding: UTF-8
336
+ string: "<freeStyleProject><description>test</description><displayName>test_job</displayName><name>test_job</name><url>http://localhost:8080/job/test_job/</url><buildable>true</buildable><build><number>3</number><url>http://localhost:8080/job/test_job/3/</url></build><build><number>2</number><url>http://localhost:8080/job/test_job/2/</url></build><build><number>1</number><url>http://localhost:8080/job/test_job/1/</url></build><color>blue_anime</color><firstBuild><number>1</number><url>http://localhost:8080/job/test_job/1/</url></firstBuild><healthReport><description>Build
337
+ stability: No recent builds failed.</description><iconClassName>icon-health-80plus</iconClassName><iconUrl>health-80plus.png</iconUrl><score>100</score></healthReport><inQueue>false</inQueue><keepDependencies>false</keepDependencies><lastBuild><number>3</number><url>http://localhost:8080/job/test_job/3/</url></lastBuild><lastCompletedBuild><number>2</number><url>http://localhost:8080/job/test_job/2/</url></lastCompletedBuild><lastStableBuild><number>2</number><url>http://localhost:8080/job/test_job/2/</url></lastStableBuild><lastSuccessfulBuild><number>2</number><url>http://localhost:8080/job/test_job/2/</url></lastSuccessfulBuild><nextBuildNumber>4</nextBuildNumber><concurrentBuild>false</concurrentBuild><scm></scm></freeStyleProject>"
338
+ http_version:
339
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
340
+ - request:
341
+ method: get
342
+ uri: http://localhost:8080/job/test_job/3/api/xml
343
+ body:
344
+ encoding: US-ASCII
345
+ string: ''
346
+ headers:
347
+ Accept-Encoding:
348
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
349
+ Accept:
350
+ - "*/*"
351
+ User-Agent:
352
+ - Ruby
353
+ Content-Type:
354
+ - text/xml
355
+ response:
356
+ status:
357
+ code: 200
358
+ message: OK
359
+ headers:
360
+ X-Jenkins:
361
+ - '1.583'
362
+ X-Jenkins-Session:
363
+ - 394516d7
364
+ Content-Type:
365
+ - application/xml;charset=UTF-8
366
+ Content-Length:
367
+ - '296'
368
+ Server:
369
+ - Jetty(8.y.z-SNAPSHOT)
370
+ body:
371
+ encoding: UTF-8
372
+ string: "<freeStyleBuild><action><cause><shortDescription>Started by user anonymous</shortDescription><userName>anonymous</userName></cause></action><building>false</building><duration>16</duration><estimatedDuration>23</estimatedDuration><fullDisplayName>test_job
373
+ #3</fullDisplayName><id>2014-11-06_22-47-04</id><keepLog>false</keepLog><number>3</number><result>SUCCESS</result><timestamp>1415342824204</timestamp><url>http://localhost:8080/job/test_job/3/</url><builtOn></builtOn><changeSet></changeSet></freeStyleBuild>"
374
+ http_version:
375
+ recorded_at: Fri, 07 Nov 2014 06:47:04 GMT
376
+ - request:
377
+ method: get
378
+ uri: http://localhost:8080/job/test_job/build
379
+ body:
380
+ encoding: US-ASCII
381
+ string: ''
382
+ headers:
383
+ Accept-Encoding:
384
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
385
+ Accept:
386
+ - "*/*"
387
+ User-Agent:
388
+ - Ruby
389
+ Content-Type:
390
+ - text/xml
391
+ response:
392
+ status:
393
+ code: 201
394
+ message: Created
395
+ headers:
396
+ Location:
397
+ - http://localhost:8080/queue/item/15/
398
+ Content-Length:
399
+ - '0'
400
+ Server:
401
+ - Jetty(8.y.z-SNAPSHOT)
402
+ body:
403
+ encoding: UTF-8
404
+ string: ''
405
+ http_version:
406
+ recorded_at: Sat, 08 Nov 2014 21:44:17 GMT
407
+ recorded_with: VCR 2.9.3