jenkins_api_client 0.12.0 → 0.12.1
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.
- data/CHANGELOG.md +6 -0
- data/jenkins_api_client.gemspec +2 -2
- data/lib/jenkins_api_client/client.rb +19 -10
- data/lib/jenkins_api_client/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ CHANGELOG
|
|
4
4
|
upcoming
|
5
5
|
--------
|
6
6
|
|
7
|
+
v0.12.1 [25-JUN-2013]
|
8
|
+
----------------------
|
9
|
+
* Fixed a bug where the SSL support was not working properly with Ruby
|
10
|
+
1.8.7/JRuby 1.6. Credit: @brettporter (For more info:
|
11
|
+
https://github.com/arangamani/jenkins_api_client/pull/85)
|
12
|
+
|
7
13
|
v0.12.0 [18-JUN-2013]
|
8
14
|
----------------------
|
9
15
|
* Authentication is now optional as not all Jenkins instances have
|
data/jenkins_api_client.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{jenkins_api_client}
|
8
|
-
s.version = "0.12.
|
8
|
+
s.version = "0.12.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kannan Manickam"]
|
12
|
-
s.date = %q{2013-06-
|
12
|
+
s.date = %q{2013-06-26}
|
13
13
|
s.default_executable = %q{jenkinscli}
|
14
14
|
s.description = %q{
|
15
15
|
This is a simple and easy-to-use Jenkins Api client with features focused on
|
@@ -23,6 +23,7 @@
|
|
23
23
|
require 'rubygems'
|
24
24
|
require 'json'
|
25
25
|
require 'net/http'
|
26
|
+
require 'net/https'
|
26
27
|
require 'nokogiri'
|
27
28
|
require 'base64'
|
28
29
|
require "mixlib/shellout"
|
@@ -173,18 +174,26 @@ module JenkinsApi
|
|
173
174
|
def make_http_request(request, follow_redirect = @follow_redirects)
|
174
175
|
request.basic_auth @username, @password if @username
|
175
176
|
|
176
|
-
if @
|
177
|
-
|
178
|
-
|
179
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if @ssl
|
180
|
-
response = http.request(request)
|
177
|
+
if @server_uri
|
178
|
+
host = @server_uri.host
|
179
|
+
port = @server_uri.port
|
181
180
|
else
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
181
|
+
host = @server_ip
|
182
|
+
port = @server_port
|
183
|
+
end
|
184
|
+
|
185
|
+
if @proxy_ip
|
186
|
+
http = Net::HTTP::Proxy(@proxy_ip, @proxy_port).new(host, port)
|
187
|
+
else
|
188
|
+
http = Net::HTTP.new(host, port)
|
187
189
|
end
|
190
|
+
|
191
|
+
if @ssl
|
192
|
+
http.use_ssl = true
|
193
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
194
|
+
end
|
195
|
+
|
196
|
+
response = http.request(request)
|
188
197
|
case response
|
189
198
|
when Net::HTTPRedirection then
|
190
199
|
# If we got a redirect request, follow it (if flag set), but don't
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 12
|
8
|
-
-
|
9
|
-
version: 0.12.
|
8
|
+
- 1
|
9
|
+
version: 0.12.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Kannan Manickam
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2013-06-
|
17
|
+
date: 2013-06-26 00:00:00 -07:00
|
18
18
|
default_executable: jenkinscli
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|