app_store_connect 0.19.0 → 0.20.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ef28572b8b02215556c96cd452ff9a01f7a79572a7416a58b04028a249c3204
4
- data.tar.gz: a4fd1643db3560fbb775b5deaa83bdd2dc719cde6cf847fe51ac745ef3ac723c
3
+ metadata.gz: 4a4b7d2c352bf46750bdec2ffb6f002bdb3ad13110f8115fbb4e7a2eec3b4c6b
4
+ data.tar.gz: 7ab6f312e0d94c791285ade26f1b0f73d3c93161af09028f1ff785094f1b3c16
5
5
  SHA512:
6
- metadata.gz: c4a1d9a1a60d3e04b85e8714faaa4f181f3bcf1dc9d25cfc221bce32fa9fc9f39b49118df37988bd93649985b8488a7b1cf685056668c5c9a0c92a55eae7b94a
7
- data.tar.gz: 13f01371c1a9be4bdf6f3bb529c55d12537ae74a5f623e20e6f610237c667366fbc52bdc9e8e34f453a4aa5c18ff6ac257e53b6283ec7baef4e8827ad6ca5bcb
6
+ metadata.gz: f39e8d6746473026936d472ad7bb787291d77f0eb3b8dbca71e1906e885df408454c498b7bd523d3ab01f497690221a18a3d359b5e23e82821662c33782c49ae
7
+ data.tar.gz: '08673550b6574d07572133107e7cf9f86304cb8110846005fe184b86e314ce2224f65468f9e80578b5829a4322a207af209435d78b476409d34a9a1e732d8f01'
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_store_connect (0.19.0)
4
+ app_store_connect (0.20.0)
5
5
  activesupport
6
6
  jwt (>= 1.4, <= 2.2.1)
7
7
  mixpanel-ruby (<= 2.2.0)
@@ -51,7 +51,7 @@ module AppStoreConnect
51
51
  @usage.track
52
52
  response = request.execute
53
53
 
54
- Utils.decode(response.body) if response.body
54
+ Utils.decode(response.body, response.content_type) if response.body
55
55
  end
56
56
 
57
57
  def build_uri(web_service_endpoint, **kwargs)
@@ -9,10 +9,23 @@ module AppStoreConnect
9
9
  .to_json
10
10
  end
11
11
 
12
- def self.decode(string)
13
- JSON
14
- .parse(string)
15
- .deep_transform_keys { |k| k.underscore.to_sym }
12
+ # Right now this only supports gzip and json responses.
13
+ # If you need to support a different type then add it.
14
+ def self.decode(string, content_type='application/json')
15
+ decoded_data = nil
16
+
17
+ case content_type
18
+ when 'application/a-gzip'
19
+ sio = StringIO.new string
20
+ gz = Zlib::GzipReader.new sio
21
+ decoded_data = gz.read()
22
+ else # Assume JSON
23
+ decoded_data = JSON
24
+ .parse(string)
25
+ .deep_transform_keys { |k| k.underscore.to_sym }
26
+ end
27
+
28
+ decoded_data
16
29
  end
17
30
  end
18
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppStoreConnect
4
- VERSION = '0.19.0'
4
+ VERSION = '0.20.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_store_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Decot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-26 00:00:00.000000000 Z
11
+ date: 2020-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport