jenkins-capistrano 0.0.1 → 0.0.2
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.
@@ -12,17 +12,21 @@ module Jenkins
|
|
12
12
|
|
13
13
|
def initialize(host, opts = {})
|
14
14
|
self.class.base_uri host
|
15
|
-
|
15
|
+
self.class.basic_auth opts[:username], opts[:password] if opts[:username] and opts[:password]
|
16
16
|
end
|
17
17
|
|
18
18
|
def create_job(name, config)
|
19
19
|
res = self.class.post("/createItem/api/xml?name=#{CGI.escape(name)}", xml_body(config))
|
20
20
|
raise ServerError, parse_error_message(res) unless res.code.to_i == 200
|
21
|
+
rescue => e
|
22
|
+
raise ServerError, "Failed to create job: #{name}, make sure you have specified auth info properly"
|
21
23
|
end
|
22
24
|
|
23
25
|
def update_job(name, config)
|
24
26
|
res = self.class.post("/job/#{CGI.escape(name)}/config.xml", xml_body(config))
|
25
27
|
raise ServerError, parse_error_message(res) unless res.code.to_i == 200
|
28
|
+
rescue => e
|
29
|
+
raise ServerError, "Failed to create job: #{name}, make sure you have specified auth info properly"
|
26
30
|
end
|
27
31
|
|
28
32
|
def create_or_update_job(name, config)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jenkins-capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -105,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
segments:
|
107
107
|
- 0
|
108
|
-
hash:
|
108
|
+
hash: -981150246330867854
|
109
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
110
|
none: false
|
111
111
|
requirements:
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
version: '0'
|
115
115
|
segments:
|
116
116
|
- 0
|
117
|
-
hash:
|
117
|
+
hash: -981150246330867854
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
120
|
rubygems_version: 1.8.24
|