jenkins_api_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 +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +5 -1
- data/config/login.yml.example +1 -1
- data/jenkins_api_client.gemspec +3 -3
- data/lib/jenkins_api_client/client.rb +2 -2
- data/lib/jenkins_api_client/version.rb +1 -1
- data/spec/unit_tests/client_spec.rb +25 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3897dc16888185c70f0fe4c10ebe276926d993fd
|
4
|
+
data.tar.gz: aa5e4de611aebea6b1cce304b30f518b7804219a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d9f39b820ddbc284a1c28aeae2268b3bc4116869e89bf84f6c604305c869f8005f1754c0264d2f6f8bfec0e424bf599b6c9dfe20adab709279b884fb66e5867
|
7
|
+
data.tar.gz: 9fbde3bbdb855aa297968da8153ebd7ffc16d1b9eeefa914aa2be69315a83969f4c8f30829b87ce5a5096ccdd36756157cc123c1e8152cda76dd8e4e7834c982
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ CHANGELOG
|
|
4
4
|
upcoming
|
5
5
|
--------
|
6
6
|
|
7
|
+
v1.0.1 [16-JUL-2014]
|
8
|
+
----------------------
|
9
|
+
* Add `charset=UTF-8` along with content_type when posting data to Jenkins.
|
10
|
+
|
7
11
|
v1.0.0 [23-JUN-2014]
|
8
12
|
----------------------
|
9
13
|
* Ruby 1.8 is not supported anymore.
|
@@ -288,4 +292,4 @@ v0.0.1 [15-OCT-2012]
|
|
288
292
|
[@spikegrobstein]: https://github.com/spikegrobstein
|
289
293
|
[@sunaot]: https://github.com/sunaot
|
290
294
|
[@tjhanley]: https://github.com/tjhanley
|
291
|
-
[@woodbusy]: https://github.com/woodbusy
|
295
|
+
[@woodbusy]: https://github.com/woodbusy
|
data/config/login.yml.example
CHANGED
@@ -22,6 +22,6 @@
|
|
22
22
|
|
23
23
|
:password: my_password
|
24
24
|
|
25
|
-
# The
|
25
|
+
# The private key file for Jenkins CLI authentication
|
26
26
|
# remember to upload the public key to http://#{server_ip}:#{server_port}/user/#{my_username}/configure
|
27
27
|
:identity_file: ~/.ssh/id_rsa
|
data/jenkins_api_client.gemspec
CHANGED
@@ -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.0.
|
5
|
+
# stub: jenkins_api_client 1.0.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "jenkins_api_client"
|
9
|
-
s.version = "1.0.
|
9
|
+
s.version = "1.0.1"
|
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 = "2014-
|
14
|
+
s.date = "2014-07-16"
|
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"]
|
@@ -403,11 +403,11 @@ module JenkinsApi
|
|
403
403
|
# @return [String] Response code returned from Jenkins
|
404
404
|
#
|
405
405
|
def post_config(url_prefix, xml)
|
406
|
-
post_data(url_prefix, xml, 'application/xml')
|
406
|
+
post_data(url_prefix, xml, 'application/xml;charset=UTF-8')
|
407
407
|
end
|
408
408
|
|
409
409
|
def post_json(url_prefix, json)
|
410
|
-
post_data(url_prefix, json, 'application/json')
|
410
|
+
post_data(url_prefix, json, 'application/json;charset=UTF-8')
|
411
411
|
end
|
412
412
|
|
413
413
|
def post_data(url_prefix, data, content_type)
|
@@ -195,6 +195,31 @@ describe JenkinsApi::Client do
|
|
195
195
|
@client.respond_to?(:post_config).should be_true
|
196
196
|
@client.method(:post_config).parameters.size.should == 2
|
197
197
|
end
|
198
|
+
|
199
|
+
it "sets the content type with charset as UTF-8 for the multi-byte content" do
|
200
|
+
url_prefix = '/prefix'
|
201
|
+
xml = '<dummy>dummy</dummy>'
|
202
|
+
content_type = 'application/xml;charset=UTF-8'
|
203
|
+
|
204
|
+
expect(@client).to receive(:post_data).with(url_prefix, xml, content_type)
|
205
|
+
@client.post_config(url_prefix, xml)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
describe "#post_json" do
|
210
|
+
it "is defined and should accept url_prefix and json" do
|
211
|
+
@client.respond_to?(:post_json).should be_true
|
212
|
+
@client.method(:post_json).parameters.size.should == 2
|
213
|
+
end
|
214
|
+
|
215
|
+
it "sets the content type with charset as UTF-8 for the multi-byte content" do
|
216
|
+
url_prefix = '/prefix'
|
217
|
+
json = '{ "dummy": "dummy" }'
|
218
|
+
content_type = 'application/json;charset=UTF-8'
|
219
|
+
|
220
|
+
expect(@client).to receive(:post_data).with(url_prefix, json, content_type)
|
221
|
+
@client.post_json(url_prefix, json)
|
222
|
+
end
|
198
223
|
end
|
199
224
|
|
200
225
|
describe "#get_jenkins_version" do
|
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.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kannan Manickam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|