jenkins_api_client 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8cca7880ea1f165f17a95359673aa232cbf3988d
4
- data.tar.gz: fefde26f943d42e4d26e5f1565b5a2da6abbbd4a
3
+ metadata.gz: 12ca18252ff9b7f0212bea5bbd93c97d53c71e40
4
+ data.tar.gz: 245d727b1b2b6b0f284c19e4063ad807524b3bdb
5
5
  SHA512:
6
- metadata.gz: 07effbc0cfc48c29b1630e483e88b4ab14e7246278787ed452cfe277f33861fcac0653b3c9996e873222781dbbdf1f8d69c3f71e1b6e05713db880e3990d50c0
7
- data.tar.gz: 6dafbc1b4eed8f3070575ba08b9ba2d920353b9060b47e9b1565d691202a60d3ad0e005401572702321e76d2573194f9a37dba7abb6a85152c71c1a3c98e4820
6
+ metadata.gz: e2095ac27903424f5ff933517ccd929b4adc0a337f9f1b13b38ab931786bf14c0ed68b21dc07071ebc3d65b217a50bdd59c1112c43d41599dcff63949500376d
7
+ data.tar.gz: 5b4454172411959a0c5f7f9b801fe8046eb214275f03ce04ba5c275999c59817cfc23e3a6f9fe8303437630eba213d2f99cc84f78389e94fbb572eb9ba873b07
@@ -4,9 +4,13 @@ CHANGELOG
4
4
  upcoming
5
5
  --------
6
6
 
7
+ v1.4.3 [07-JUN-2016]
8
+ ----------------------
9
+ * [#207][] Add support for SOCKS proxies. Credit: [@dylanmckay][]
10
+
7
11
  v1.4.2 [25-OCT-2015]
8
12
  ----------------------
9
- * [#188][] Added ability view jobs in a view with details. Credir: [@Tyrael][]
13
+ * [#188][] Added ability view jobs in a view with details. Credit: [@Tyrael][]
10
14
 
11
15
  v1.4.1 [21-SEP-2015]
12
16
  ----------------------
@@ -336,6 +340,7 @@ v0.0.1 [15-OCT-2012]
336
340
  [#179]: https://github.com/arangamani/jenkins_api_client/issues/179
337
341
  [#188]: https://github.com/arangamani/jenkins_api_client/issues/188
338
342
  [#191]: https://github.com/arangamani/jenkins_api_client/issues/191
343
+ [#207]: https://github.com/arangamani/jenkins_api_client/issues/207
339
344
  [@AndrewHanes]: https://github.com/AndrewHanes
340
345
  [@Loa]: https://github.com/Loa
341
346
  [@Niarfe]: https://github.com/Niarfe
@@ -353,6 +358,7 @@ v0.0.1 [15-OCT-2012]
353
358
  [@dkerwin]: https://github.com/dkerwin
354
359
  [@dougforpres]: https://github.com/dougforpres
355
360
  [@drnic]: https://github.com/drnic
361
+ [@dylanmckay]: https://github.com/dylanmckay
356
362
  [@gpetras]: https://github.com/gpetras
357
363
  [@hubert]: https://github.com/hubert
358
364
  [@jlucasps]: https://github.com/jlucasps
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ gem "thor", ">= 0.16.0"
5
5
  gem "json", ">= 0"
6
6
  gem "terminal-table", ">= 1.4.0"
7
7
  gem "mixlib-shellout", ">= 1.1.0"
8
+ gem 'socksify', ">= 1.7.0"
8
9
 
9
10
  group :development do
10
11
  gem "bundler", ">= 1.0"
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: jenkins_api_client 1.4.2 ruby lib
5
+ # stub: jenkins_api_client 1.4.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "jenkins_api_client"
9
- s.version = "1.4.2"
9
+ s.version = "1.4.3"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Kannan Manickam"]
14
- s.date = "2015-10-25"
14
+ s.date = "2016-06-08"
15
15
  s.description = "\nThis is a simple and easy-to-use Jenkins Api client with features focused on\nautomating Job configuration programaticaly and so forth"
16
16
  s.email = ["arangamani.kannan@gmail.com"]
17
17
  s.executables = ["jenkinscli"]
@@ -102,6 +102,7 @@ Gem::Specification.new do |s|
102
102
  s.add_runtime_dependency(%q<json>, [">= 0"])
103
103
  s.add_runtime_dependency(%q<terminal-table>, [">= 1.4.0"])
104
104
  s.add_runtime_dependency(%q<mixlib-shellout>, [">= 1.1.0"])
105
+ s.add_runtime_dependency(%q<socksify>, [">= 1.7.0"])
105
106
  s.add_development_dependency(%q<bundler>, [">= 1.0"])
106
107
  s.add_development_dependency(%q<jeweler>, [">= 1.6.4"])
107
108
  s.add_development_dependency(%q<rspec>, ["~> 2.14.1"])
@@ -115,6 +116,7 @@ Gem::Specification.new do |s|
115
116
  s.add_dependency(%q<json>, [">= 0"])
116
117
  s.add_dependency(%q<terminal-table>, [">= 1.4.0"])
117
118
  s.add_dependency(%q<mixlib-shellout>, [">= 1.1.0"])
119
+ s.add_dependency(%q<socksify>, [">= 1.7.0"])
118
120
  s.add_dependency(%q<bundler>, [">= 1.0"])
119
121
  s.add_dependency(%q<jeweler>, [">= 1.6.4"])
120
122
  s.add_dependency(%q<rspec>, ["~> 2.14.1"])
@@ -129,6 +131,7 @@ Gem::Specification.new do |s|
129
131
  s.add_dependency(%q<json>, [">= 0"])
130
132
  s.add_dependency(%q<terminal-table>, [">= 1.4.0"])
131
133
  s.add_dependency(%q<mixlib-shellout>, [">= 1.1.0"])
134
+ s.add_dependency(%q<socksify>, [">= 1.7.0"])
132
135
  s.add_dependency(%q<bundler>, [">= 1.0"])
133
136
  s.add_dependency(%q<jeweler>, [">= 1.6.4"])
134
137
  s.add_dependency(%q<rspec>, ["~> 2.14.1"])
@@ -29,6 +29,7 @@ require 'base64'
29
29
  require 'mixlib/shellout'
30
30
  require 'uri'
31
31
  require 'logger'
32
+ require 'socksify/http'
32
33
 
33
34
  # The main module that contains the Client class and all subclasses that
34
35
  # communicate with the Jenkins's Remote Access API.
@@ -53,6 +54,7 @@ module JenkinsApi
53
54
  "server_port",
54
55
  "proxy_ip",
55
56
  "proxy_port",
57
+ "proxy_protocol",
56
58
  "jenkins_path",
57
59
  "username",
58
60
  "password",
@@ -86,6 +88,7 @@ module JenkinsApi
86
88
  # <Server IP>:<Server Port>/user/<Username>/configure
87
89
  # @option args [String] :proxy_ip the proxy IP address
88
90
  # @option args [String] :proxy_port the proxy port
91
+ # @option args [String] :proxy_protocol the proxy protocol ('socks' or 'http' (defaults to HTTP)
89
92
  # @option args [String] :jenkins_path ("/") the optional context path for Jenkins
90
93
  # @option args [Boolean] :ssl (false) indicates if Jenkins is accessible over HTTPS
91
94
  # @option args [Boolean] :follow_redirects this argument causes the client to follow a redirect (jenkins can
@@ -146,6 +149,7 @@ module JenkinsApi
146
149
  @http_open_timeout = DEFAULT_HTTP_OPEN_TIMEOUT unless @http_open_timeout
147
150
  @http_read_timeout = DEFAULT_HTTP_READ_TIMEOUT unless @http_read_timeout
148
151
  @ssl ||= false
152
+ @proxy_protocol ||= 'http'
149
153
 
150
154
  # Setting log options
151
155
  if @logger
@@ -292,7 +296,14 @@ module JenkinsApi
292
296
  request['Cookie'] = @cookies if @cookies
293
297
 
294
298
  if @proxy_ip
295
- http = Net::HTTP::Proxy(@proxy_ip, @proxy_port).new(@server_ip, @server_port)
299
+ case @proxy_protocol
300
+ when 'http'
301
+ http = Net::HTTP::Proxy(@proxy_ip, @proxy_port).new(@server_ip, @server_port)
302
+ when 'socks'
303
+ http = Net::HTTP::SOCKSProxy(@proxy_ip, @proxy_port).start(@server_ip, @server_port)
304
+ else
305
+ raise "unknwon proxy protocol: '#{@proxy_protocol}'"
306
+ end
296
307
  else
297
308
  http = Net::HTTP.new(@server_ip, @server_port)
298
309
  end
@@ -27,7 +27,7 @@ module JenkinsApi
27
27
  # Minor version of the gem
28
28
  MINOR = 4
29
29
  # Tiny version of the gem used for patches
30
- TINY = 2
30
+ TINY = 3
31
31
  # Used for pre-releases
32
32
  PRE = nil
33
33
  # Version String of Jenkins API Client.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jenkins_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kannan Manickam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-25 00:00:00.000000000 Z
11
+ date: 2016-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.1.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: socksify
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 1.7.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 1.7.0
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: bundler
85
99
  requirement: !ruby/object:Gem::Requirement