config_server_agent 0.3.6 → 0.3.7

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: 6c19545cad82df1e4454c662b5df2903dc657ce7fba1fe434beb5f5a8bc3465e
4
- data.tar.gz: 9370374949fd090acaf8b7b1e1eb6b14131b563084b3a6bf393b9b70839b6036
3
+ metadata.gz: 1a3e3808d15e83db93422a44e1c853e9e734fff991419c9b091398ec40da6bd4
4
+ data.tar.gz: d4b407b4cb7289809eed5c792e2631f7293dcfbd7c1bc8574712b6740a953c64
5
5
  SHA512:
6
- metadata.gz: 64afbc8473f29730780fadad2f5dfa18c1c8c219b0892f943cdb0b775dfed6c2ac1481ce2faefec19325d34d725f6e7b5616c795e738065bc91ee1bb15523bff
7
- data.tar.gz: ce866d94120d96437d2746d83cb6888c85fda5e7d310b7e5fdaf27e03110fe21b7ca05114c8e9eaa3f2934c8443f73d8484ad2443101417df22eeb9ba71992df
6
+ metadata.gz: 5660ec66ec50937970dd617c14e536eca6cdc05f676d62599ad1c92d4cd2564472794f76ad2dcca5e2c80df735965a0cd0a07fe2b837f1f01d18b3f160fd51aa
7
+ data.tar.gz: 2b50f65285399fde0581726d4f257fccefeb238ce803f882bec5cf6ecd60a4a79d29c22f23cd9e9989f2e6f22ff88981ce2595e47efbc6d620f0af8213d00719
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 0.3.7
8
+ ### Changed
9
+ - Fixed content-type handling
10
+
7
11
  ## 0.3.6
8
12
  ### Changed
9
13
  - Better error handling
@@ -114,10 +114,13 @@ class ConfigServerAgent
114
114
  end
115
115
 
116
116
  def process_response(response)
117
- raise Error, "Unexpected content-type from server: #{response['content-type']}" unless response['content-type'] == 'application/json'
117
+ unless response['content-type'].start_with? 'application/json'
118
+ raise Error, "Unexpected content-type from server: #{response['content-type']}"
119
+ end
120
+
118
121
  data = JSON.parse response.read_body
119
122
 
120
- raise Error, "Config Server error: #{data['error']}" unless Net::HTTPSuccess === response
123
+ raise Error, "Config Server error: #{data['error']}" unless response.is_a? Net::HTTPSuccess
121
124
  data
122
125
 
123
126
  rescue JSON::ParserError
@@ -1,3 +1,3 @@
1
1
  class ConfigServerAgent
2
- VERSION = '0.3.6'
2
+ VERSION = '0.3.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_server_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aidan Samuel