improved_jenkins_client 1.6.4 → 1.6.5

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
  SHA256:
3
- metadata.gz: 9c65c1504113fc3704c4f6acfc5a1e12535c6c9933dccd27ed23cd8e625e07c9
4
- data.tar.gz: baeb687f5b37668d0bfc37af69e70aed03ccc912fe68a69762e48fdb8403a178
3
+ metadata.gz: 6d924687d191c069d05698fc954924efa40f1024ab280be5d7d13f434c20b680
4
+ data.tar.gz: 760ca0221281fec74064f4f151927ff765dc2f0024c155ed0bdf154f02346f9a
5
5
  SHA512:
6
- metadata.gz: 6ca64a445286f079ad0b1b5fae9a28f82a5eb4920f198555943edecbbee422a48a57a9b5697215fa6559ab17db5c805603df0c6172f00398299966b233a42842
7
- data.tar.gz: 6d97da9fa72d9d7fa12448edacaa87de17009149b108e718b0410596a915fb3bd0bedd0f7712ba2db5c9c627024733ce319e1773415d9103f2226147f76d6a83
6
+ metadata.gz: 4f46f6c49204c1ac5562d2dad223eec0411e622404f0fe6db4824a792367809b1237b202db9d6951037d4271f4434adf8c90e13dcd0d742bf428c09fc4c70f6d
7
+ data.tar.gz: c54d3c43bc7ddc242bf63081f4bde37e7b3e9700f73badbcac2681e2dbbd89e95d21eb5192b80a46aca1ad833d5bd1875c02dc6bfa12920bde4877c7b4d3d81e
@@ -72,7 +72,8 @@ module JenkinsApi
72
72
  "ca_file",
73
73
  "follow_redirects",
74
74
  "identity_file",
75
- "cookies"
75
+ "cookies",
76
+ "pretty_json_responses"
76
77
  ].freeze
77
78
 
78
79
  # Initialize a Client object with Jenkins CI server credentials
@@ -106,6 +107,7 @@ module JenkinsApi
106
107
  # @option args [Fixnum] :log_level (Logger::INFO) The level for messages to be logged. Should be one of:
107
108
  # Logger::DEBUG (0), Logger::INFO (1), Logger::WARN (2), Logger::ERROR (2), Logger::FATAL (3)
108
109
  # @option args [String] :cookies Cookies to be sent with all requests in the format: name=value; name2=value2
110
+ # @option args [Boolean] :pretty_json_responses Whether to append pretty=true to most JSON GET requests.
109
111
  #
110
112
  # @return [JenkinsApi::Client] a client object to Jenkins API
111
113
  #
@@ -415,10 +417,18 @@ module JenkinsApi
415
417
  raw_response = false)
416
418
  url_prefix = "#{@jenkins_path}#{url_prefix}"
417
419
  to_get = ""
420
+
421
+
418
422
  if tree
419
423
  to_get = "#{url_prefix}#{url_suffix}?#{tree}"
424
+ query_param_separator = "&"
420
425
  else
421
426
  to_get = "#{url_prefix}#{url_suffix}"
427
+ query_param_separator = "?"
428
+ end
429
+ if @pretty_json_responses && url_suffix == "/api/json"
430
+ to_get += query_param_separator
431
+ to_get += "pretty=true"
422
432
  end
423
433
  request = Net::HTTP::Get.new(to_get)
424
434
  @logger.debug "GET #{to_get}"
@@ -27,7 +27,7 @@ module JenkinsApi
27
27
  # Minor version of the gem
28
28
  MINOR = 6
29
29
  # Tiny version of the gem used for patches
30
- TINY = 4
30
+ TINY = 5
31
31
  # Used for pre-releases
32
32
  PRE = nil
33
33
  # Version String of Jenkins API Client.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: improved_jenkins_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.4
4
+ version: 1.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kannan Manickam (the original jenkins_api_client gem)