app_store_connect 0.18.0 → 0.19.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: 37ed8ee635b7f33d434705ab2877efcf9ef383be0e750fe35cdd6befd7d19993
4
- data.tar.gz: 4be9ed411aa13f76d0849b1a5f1ef46669cb1471995ba829af880649dbc64c28
3
+ metadata.gz: 6ef28572b8b02215556c96cd452ff9a01f7a79572a7416a58b04028a249c3204
4
+ data.tar.gz: a4fd1643db3560fbb775b5deaa83bdd2dc719cde6cf847fe51ac745ef3ac723c
5
5
  SHA512:
6
- metadata.gz: e5e793027cf899ccaebd30e4ace151e3c25166e671ae95203cab2f14a0d2d31b81f09ea74be64108116ceaf0e6f9de1e591146ce0a0d1debf321aa9681770972
7
- data.tar.gz: eee8a1653f94e319fe6cd8df2dde1c9764987c77f3bf132b175e17bbb020a5d48d0e8acc6af2d6072c673ef4f62b208ddbdbf729a0ba0b6da8cc1dc52b87e3f2
6
+ metadata.gz: c4a1d9a1a60d3e04b85e8714faaa4f181f3bcf1dc9d25cfc221bce32fa9fc9f39b49118df37988bd93649985b8488a7b1cf685056668c5c9a0c92a55eae7b94a
7
+ data.tar.gz: 13f01371c1a9be4bdf6f3bb529c55d12537ae74a5f623e20e6f610237c667366fbc52bdc9e8e34f453a4aa5c18ff6ac257e53b6283ec7baef4e8827ad6ca5bcb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_store_connect (0.18.0)
4
+ app_store_connect (0.19.0)
5
5
  activesupport
6
6
  jwt (>= 1.4, <= 2.2.1)
7
7
  mixpanel-ruby (<= 2.2.0)
@@ -8,6 +8,7 @@ require 'app_store_connect/client/authorization'
8
8
  require 'app_store_connect/client/options'
9
9
  require 'app_store_connect/client/usage'
10
10
  require 'app_store_connect/client/registry'
11
+ require 'app_store_connect/client/utils'
11
12
 
12
13
  module AppStoreConnect
13
14
  class Client
@@ -50,7 +51,7 @@ module AppStoreConnect
50
51
  @usage.track
51
52
  response = request.execute
52
53
 
53
- JSON.parse(response.body) if response.body
54
+ Utils.decode(response.body) if response.body
54
55
  end
55
56
 
56
57
  def build_uri(web_service_endpoint, **kwargs)
@@ -64,12 +65,10 @@ module AppStoreConnect
64
65
  end
65
66
 
66
67
  def http_body(web_service_endpoint, **kwargs)
67
- "AppStoreConnect::#{web_service_endpoint.http_body_type}"
68
+ Utils.encode("AppStoreConnect::#{web_service_endpoint.http_body_type}"
68
69
  .constantize
69
70
  .new(**kwargs)
70
- .to_h
71
- .deep_transform_keys { |k| k.to_s.camelize(:lower) }
72
- .to_json
71
+ .to_h)
73
72
  end
74
73
 
75
74
  def build_request(web_service_endpoint, **kwargs)
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AppStoreConnect
4
+ class Client
5
+ class Utils
6
+ def self.encode(hash)
7
+ hash
8
+ .deep_transform_keys { |s| s.to_s.camelize(:lower) }
9
+ .to_json
10
+ end
11
+
12
+ def self.decode(string)
13
+ JSON
14
+ .parse(string)
15
+ .deep_transform_keys { |k| k.underscore.to_sym }
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppStoreConnect
4
- VERSION = '0.18.0'
4
+ VERSION = '0.19.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.18.0
4
+ version: 0.19.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-22 00:00:00.000000000 Z
11
+ date: 2019-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -218,6 +218,7 @@ files:
218
218
  - lib/app_store_connect/client/options.rb
219
219
  - lib/app_store_connect/client/registry.rb
220
220
  - lib/app_store_connect/client/usage.rb
221
+ - lib/app_store_connect/client/utils.rb
221
222
  - lib/app_store_connect/create_request.rb
222
223
  - lib/app_store_connect/device_create_request.rb
223
224
  - lib/app_store_connect/object/attributes.rb