app_store_connect 0.16.0 → 0.21.0

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: 8e49deacf219897c3907be8ad67fd45c76c8deaf0922fe8632758dc2471385eb
4
- data.tar.gz: 01dcafa516d44da7874ff9c0ed849b6d8bd6ae04d2c4f55759e00cc962adbf79
3
+ metadata.gz: 840a58aff2568c45dad350783737805e08cc53581376fa161395d8e2c80d2a1c
4
+ data.tar.gz: 872a4b4914ba0ebebc222f9d1e23a4e3b96f7b9d0823cb64f2d88910405cf884
5
5
  SHA512:
6
- metadata.gz: d0b650b1eb71a0480fb1a053f0820017a6e57e91f09b1daa873a2319105a87640293b2e56934806b31394cb1f3012b0ac74499e4ed883779fb261c4b748629bc
7
- data.tar.gz: 16d2a9029bd6e6cc02838dc64cc2443a50d7e37af65209979c442b26574ecc932a7addcc540bcc6046c21eddf34efb3bc2895714e18d78edf2da5f78b42d0874
6
+ metadata.gz: 5125264dedeee20e282d62bb495fee4d981329f216908043b6c888ead16271df4451f0957f538d4c27ac2b55479de1672ff710ada5976e541051235adec766a1
7
+ data.tar.gz: bea12d90667b04fcd44671ab4b966ebefeb8a4cf90065c978790276f352527918c1c8d2705599f236c5e47e27b7e672935effd58257763215180ef8e61c3bb7a
@@ -13,10 +13,10 @@ jobs:
13
13
  - name: Set up Ruby 2.6
14
14
  uses: actions/setup-ruby@v1
15
15
  with:
16
- version: 2.6.x
16
+ ruby-version: 2.6.x
17
17
  - name: Install dependencies
18
18
  run: |
19
19
  gem install bundler
20
20
  bundle install --jobs=3 --retry=3
21
21
  - name: Run rubocop
22
- run: rubocop
22
+ run: bundle exec rubocop -P -fq
@@ -15,14 +15,15 @@ jobs:
15
15
  - name: Set up Ruby 2.6
16
16
  uses: actions/setup-ruby@v1
17
17
  with:
18
- version: 2.6.x
19
-
18
+ ruby-version: 2.6.x
20
19
  - name: Configure Bundler
21
20
  run: |
21
+ gem install bundler
22
+ bundle install --jobs=3 --retry=3
22
23
  mkdir -p $HOME/.gem
23
24
  touch $HOME/.gem/credentials
24
25
  chmod 0600 $HOME/.gem/credentials
25
- printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n:github: ${GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN}" > $HOME/.gem/credentials
26
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n:github: Bearer ${GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN}" > $HOME/.gem/credentials
26
27
  env:
27
28
  GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
28
29
  GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN: ${{secrets.GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN}}
@@ -32,10 +33,8 @@ jobs:
32
33
  gem build *.gemspec
33
34
 
34
35
  - name: Publish to RubyGems
35
- run: |
36
- gem push *.gem
36
+ run: bundle exec ./bin/publish --rubygems
37
37
 
38
38
  - name: Publish to Github Package Repository
39
- run: |
40
- gem push --key github --host https://rubygems.pkg.github.com/kyledecot *.gem
39
+ run: bundle exec ./bin/publish --github
41
40
 
@@ -15,7 +15,7 @@ jobs:
15
15
  - name: Set up Ruby 2.6
16
16
  uses: actions/setup-ruby@v1
17
17
  with:
18
- version: 2.6.x
18
+ ruby-version: 2.6.x
19
19
  - name: Install dependencies
20
20
  run: |
21
21
  gem install bundler
data/.gitignore CHANGED
@@ -7,6 +7,6 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
 
10
- # rspec failure tracking
11
10
  .rspec_status
12
11
  .DS_Store
12
+ *.gem
@@ -1,24 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_store_connect (0.16.0)
5
- activesupport
4
+ app_store_connect (0.21.0)
5
+ activesupport (>= 6.0.3.1)
6
6
  jwt (>= 1.4, <= 2.2.1)
7
7
  mixpanel-ruby (<= 2.2.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (5.2.3)
12
+ activesupport (6.0.3.1)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
14
  i18n (>= 0.7, < 2)
15
15
  minitest (~> 5.1)
16
16
  tzinfo (~> 1.1)
17
+ zeitwerk (~> 2.2, >= 2.2.2)
17
18
  addressable (2.6.0)
18
19
  public_suffix (>= 2.0.2, < 4.0)
19
20
  ast (2.4.0)
20
21
  coderay (1.1.2)
21
- concurrent-ruby (1.1.5)
22
+ concurrent-ruby (1.1.6)
22
23
  crack (0.4.3)
23
24
  safe_yaml (~> 1.0.0)
24
25
  diff-lcs (1.3)
@@ -42,7 +43,7 @@ GEM
42
43
  guard-compat (~> 1.1)
43
44
  rspec (>= 2.99.0, < 4.0)
44
45
  hashdiff (0.4.0)
45
- i18n (1.6.0)
46
+ i18n (1.8.2)
46
47
  concurrent-ruby (~> 1.0)
47
48
  jaro_winkler (1.5.3)
48
49
  json (2.2.0)
@@ -53,14 +54,14 @@ GEM
53
54
  ruby_dep (~> 1.2)
54
55
  lumberjack (1.0.13)
55
56
  method_source (0.9.2)
56
- minitest (5.11.3)
57
+ minitest (5.14.1)
57
58
  mixpanel-ruby (2.2.0)
58
59
  nenv (0.3.0)
59
60
  notiffany (0.1.1)
60
61
  nenv (~> 0.1)
61
62
  shellany (~> 0.0)
62
- parallel (1.17.0)
63
- parser (2.6.3.0)
63
+ parallel (1.18.0)
64
+ parser (2.6.5.0)
64
65
  ast (~> 2.4.0)
65
66
  pry (0.12.2)
66
67
  coderay (~> 1.1.0)
@@ -83,7 +84,7 @@ GEM
83
84
  diff-lcs (>= 1.2.0, < 2.0)
84
85
  rspec-support (~> 3.8.0)
85
86
  rspec-support (3.8.0)
86
- rubocop (0.71.0)
87
+ rubocop (0.75.1)
87
88
  jaro_winkler (~> 1.5.1)
88
89
  parallel (~> 1.10)
89
90
  parser (>= 2.6)
@@ -102,13 +103,14 @@ GEM
102
103
  thor (0.20.3)
103
104
  thread_safe (0.3.6)
104
105
  timecop (0.9.1)
105
- tzinfo (1.2.5)
106
+ tzinfo (1.2.7)
106
107
  thread_safe (~> 0.1)
107
108
  unicode-display_width (1.6.0)
108
109
  webmock (3.6.0)
109
110
  addressable (>= 2.3.6)
110
111
  crack (>= 0.3.2)
111
112
  hashdiff (>= 0.4.0, < 2.0.0)
113
+ zeitwerk (2.3.0)
112
114
 
113
115
  PLATFORMS
114
116
  ruby
@@ -120,10 +122,10 @@ DEPENDENCIES
120
122
  guard-rspec (~> 4.7.3)
121
123
  pry (~> 0.12)
122
124
  rspec (~> 3.0)
123
- rubocop (~> 0.71.0)
125
+ rubocop (~> 0.75.0)
124
126
  simplecov (~> 0.16.1)
125
127
  timecop (~> 0.9.1)
126
128
  webmock (~> 3.6.0)
127
129
 
128
130
  BUNDLED WITH
129
- 2.0.2
131
+ 2.1.4
data/README.md CHANGED
@@ -35,215 +35,6 @@ app_store_connect.app(id: '1234')
35
35
  app_store_connect.builds(id: '1234')
36
36
  ```
37
37
 
38
- ## Web Service Endpoints
39
-
40
-
41
- ### Users
42
- - [X] List Users
43
- - [X] Read User Information
44
- - [X] Remove a User Account
45
- - [X] Modify a User Account
46
- - [X] Get All Visible App Resource IDs for a User
47
- - [X] List All Apps Visible to a User
48
- - [X] Remove Visible Apps from a User
49
- - [X] Add Visible Apps to a User
50
- - [X] Replace the List of Visible Apps for a User
51
-
52
- ### Bundle IDs
53
- - [X] Register a New Bundle ID
54
- - [X] Modify a Bundle ID
55
- - [X] Delete a Bundle ID
56
- - [X] Read Bundle ID Information
57
- - [X] List Bundle IDs
58
- - [X] Get All Profile IDs for a Bundle ID
59
- - [X] Get All Capabilility IDs for a Bundle ID
60
- - [X] List All Profiles for a Bundle ID
61
- - [X] List All Capabilities for a Bundle ID
62
-
63
- ### Certificates
64
- - [X] List and Download Certificates
65
- - [X] Create a Certificate
66
- - [X] Read and Download Certificate Information
67
- - [X] Revoke a Certificate
68
-
69
- ### User Invitations
70
- - [X] Read User Invitation Information
71
- - [X] List Invited Users
72
- - [X] Invite a User
73
- - [X] Cancel a User Invitation
74
- - [X] Get All App Resource IDs Visible to an Invited User
75
- - [X] List All Apps Visible to an Invited User
76
-
77
- ### Bundle ID Capabilities
78
- - [ ] Enable a Capability
79
- - [X] Disable a Capability
80
- - [X] Modify a Capability Configuration
81
-
82
- ### Devices
83
- - [X] List Devices
84
- - [X] Read Device Information
85
- - [X] Register a New Device
86
- - [X] Modify a Registered Device
87
-
88
- ### Sales and Finance Reports
89
- - [X] Download Sales and Trends Reports
90
- - [X] Download Finance Reports
91
-
92
- ### Profiles
93
- - [X] Create a Profile
94
- - [X] Delete a Profile
95
- - [X] List and Download Profiles
96
- - [X] Get the Bundle Resource ID in a Profile
97
- - [X] Read the Bundle ID in a Profile
98
- - [X] Read and Download Profile Information
99
- - [X] List All Certificates in a Profile
100
- - [X] Get All Certificate IDs in a Profile
101
- - [X] Get All Device Resource IDs in a Profile
102
- - [X] List All Devices in a Profile
103
-
104
- ### Beta Testers
105
- - [X] Create a Beta Tester
106
- - [X] Delete a Beta Tester
107
- - [X] Add a Beta Tester to Beta Groups
108
- - [X] List Beta Testers
109
- - [X] Read Beta Tester Information
110
- - [X] Individually Assign a Beta Tester to Builds
111
- - [X] Remove a Beta Tester from Beta Groups
112
- - [X] Remove a Beta Tester’s Access to Apps
113
- - [X] Get All App Resource IDs for a Beta Tester
114
- - [X] List All Builds Individually Assigned to a Beta Tester
115
- - [X] List All Apps for a Beta Tester
116
- - [X] Get All IDs of Builds Individually Assigned to a Beta Tester
117
- - [X] List All Beta Groups to Which a Beta Tester Belongs
118
- - [X] Get All Beta Group IDs of a Beta Tester's Groups
119
- - [X] Individually Unassign a Beta Tester from Builds
120
-
121
- ### Beta Tester Invitations
122
- - [ ] Send an Invitation to a Beta Tester
123
-
124
- ### Apps
125
- - [X] Remove Beta Testers from All Groups and Builds of an App
126
- - [X] Read App Information
127
- - [X] List All Beta Groups for an App
128
- - [X] List Apps
129
- - [X] Get All Build IDs of an App
130
- - [X] List All Builds of an App
131
- - [X] Get All Beta Group IDs for an App
132
- - [X] Get All Prerelease Version IDs for an App
133
- - [X] List All Prerelease Versions for an App
134
- - [X] Get the Beta App Review Details Resource ID for an App
135
- - [X] Read the Beta App Review Details Resource of an App
136
- - [X] List All Beta App Localizations of an App
137
- - [X] Read the Beta License Agreement of an App
138
- - [X] Get the Beta License Agreement ID for an App
139
- - [X] Get All Beta App Localization IDs of an App
140
-
141
- ### Beta Groups
142
- - [X] Create a Beta Group
143
- - [X] Modify a Beta Group
144
- - [X] List Beta Groups
145
- - [X] Read Beta Group Information
146
- - [X] Delete a Beta Group
147
- - [X] Read the App Information of a Beta Group
148
- - [X] Get the App Resource ID for a Beta Group
149
- - [X] Add Beta Testers to a Beta Group
150
- - [X] Remove Beta Testers from a Beta Group
151
- - [X] Remove Builds from a Beta Group
152
- - [X] List All Builds for a BetaGroup
153
- - [X] Add Builds to a Beta Group
154
- - [X] Get All Build IDs in a Beta Group
155
- - [X] Get All Beta Tester IDs in a Beta Group
156
- - [X] List All Beta Testers in a BetaGroup
157
-
158
- ### Prerelease Versions
159
- - [X] List Prerelease Versions
160
- - [X] Get the App Resource ID for a Prerelease Version
161
- - [X] Read Prerelease Version Information
162
- - [X] Read the App Information of a Prerelease Version
163
- - [X] List All Builds of a Prerelease Version
164
- - [X] Get All Build IDs of a Prerelease Version
165
-
166
- ### Beta App Localizations
167
- - [X] List Beta App Localizations
168
- - [X] Read Beta App Localization Information
169
- - [X] Read the App Information of a Beta App Localization
170
- - [X] Get the App Resource ID for a Beta App Localization
171
- - [X] Create a Beta App Localization
172
- - [X] Modify a Beta App Localization
173
- - [X] Delete a Beta App Localization
174
-
175
- ### App Encryption Declarations
176
- - [X] List App Encryption Declarations
177
- - [X] Read App Encryption Declaration Information
178
- - [X] Get the App Resource ID for an App Encryption Declaration
179
- - [X] Read the App Information of an App Encryption Declaration
180
- - [ ] Assign Builds to an App Encryption Declaration
181
-
182
- ### Build Beta Details
183
- - [X] Read Build Beta Detail Information
184
- - [X] List Build Beta Details
185
- - [X] Get the Build ID for a Build Beta Detail
186
- - [X] Modify a Build Beta Detail
187
- - [X] Read the Build Information of a Build Beta Detail
188
-
189
- ### Beta Build Localizations
190
- - [X] List Beta Build Localizations
191
- - [X] Read Beta Build Localization Information
192
- - [X] Read the Build Information of a Beta Build Localization
193
- - [X] Create a Beta Build Localization
194
- - [X] Delete a Beta Build Localization
195
- - [X] Modify a Beta Build Localization
196
- - [X] Get the Build ID for a Beta Build Localization
197
-
198
- ### Builds
199
- - [X] Read Build Information
200
- - [X] Get the App Resource ID for a Build
201
- - [X] List Builds
202
- - [X] Read the App Information of a Build
203
- - [X] Modify a Build
204
- - [X] Read the Prerelease Version of a Build
205
- - [X] Get All Resource IDs of Prerelease Versions for a Build
206
- - [X] Assign the App Encryption Declaration for a Build
207
- - [X] Remove Individual Testers from a Build
208
- - [X] Add Access for Beta Groups to a Build
209
- - [X] Remove Access for Beta Groups to a Build
210
- - [X] List All Individual Testers for a Build
211
- - [X] Assign Individual Testers to a Build
212
- - [X] Get All Resource IDs of Individual Testers for a Build
213
- - [X] Get the Beta App Review Submission ID of a Build
214
- - [X] Read the Beta App Review Submission of a Build
215
- - [X] Read the Build Beta Details Information of a Build
216
- - [X] Get the Build Beta Details Resource ID for a Build
217
- - [X] Get the App Encryption Declaration ID for a Build
218
- - [X] Get All Beta Build Localization IDs of a Build
219
- - [X] Read the App Encryption Declaration of a Build
220
- - [X] List All Beta Build Localizations of a Build
221
-
222
- ### Beta App Review Detail
223
- - [X] List Beta App Review Details
224
- - [X] Read Beta App Review Detail Information
225
- - [X] Read the App Information of a Beta App Review Detail
226
- - [X] Get the App Resource ID for a Beta App Review Details Resource
227
- - [X] Modify a Beta App Review Detail
228
-
229
- ### Beta App Review Submissions
230
- - [X] Read Beta App Review Submission Information
231
- - [X] Submit an App for Beta Review
232
- - [X] Read the Build Information of a Beta App Review Submission
233
- - [X] List Beta App Review Submissions
234
- - [X] Get the Build ID for a Beta App Review Submission
235
-
236
- ### Build Beta Notifications
237
- - [ ] Send Notification of an Available Build
238
-
239
- ### Beta License Agreements
240
- - [X] Read Beta License Agreement Information
241
- - [X] Read the App Information of a Beta License Agreement
242
- - [X] Get the App Resource ID for a Beta License Agreement
243
- - [X] Modify a Beta License Agreement
244
- - [X] List Beta License Agreements
245
-
246
-
247
38
  ### Create Bundle ID
248
39
 
249
40
  ```ruby
@@ -271,8 +62,6 @@ app_store_connect.sales_reports(
271
62
 
272
63
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
273
64
 
274
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
275
-
276
65
  ## Contributing
277
66
 
278
67
  Bug reports and pull requests are welcome on GitHub at https://github.com/kyledecot/app_store_connect.
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.require_paths = ['lib']
22
22
 
23
- spec.add_runtime_dependency 'activesupport'
23
+ spec.add_runtime_dependency 'activesupport', '>= 6.0.3.1'
24
24
  spec.add_runtime_dependency 'jwt', '>= 1.4', '<= 2.2.1'
25
25
  spec.add_runtime_dependency 'mixpanel-ruby', '<= 2.2.0'
26
26
 
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'guard-rspec', '~> 4.7.3'
30
30
  spec.add_development_dependency 'pry', '~> 0.12'
31
31
  spec.add_development_dependency 'rspec', '~> 3.0'
32
- spec.add_development_dependency 'rubocop', '~> 0.71.0'
32
+ spec.add_development_dependency 'rubocop', '~> 0.75.0'
33
33
  spec.add_development_dependency 'simplecov', '~> 0.16.1'
34
34
  spec.add_development_dependency 'timecop', '~> 0.9.1'
35
35
  spec.add_development_dependency 'webmock', '~> 3.6.0'
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'optparse'
5
+ require 'app_store_connect/version'
6
+
7
+ OPTIONS = {
8
+ hosts: [],
9
+ version: AppStoreConnect::VERSION
10
+ }.freeze
11
+
12
+ HOSTS = {
13
+ rubygems: 'https://rubygems.org',
14
+ github: 'https://rubygems.pkg.github.com/kyledecot'
15
+ }.freeze
16
+
17
+ OptionParser.new do |parser|
18
+ HOSTS.keys.each do |key|
19
+ parser.on("--#{key}") do
20
+ OPTIONS[:hosts] << key
21
+ end
22
+ end
23
+
24
+ parser.on('--version VERSION') do |version|
25
+ OPTIONS[:version] = version
26
+ end
27
+
28
+ parser.on('--help', '-h') do
29
+ puts parser
30
+ exit(0)
31
+ end
32
+ end.parse!
33
+
34
+ OPTIONS[:hosts].each do |key|
35
+ ENV['RUBYGEMS_HOST'] = HOSTS.fetch(key)
36
+
37
+ system "gem push -k #{key} app_store_connect-#{OPTIONS[:version]}.gem"
38
+ end
@@ -14,10 +14,7 @@ require 'app_store_connect/user_invitation_create_request'
14
14
  require 'app_store_connect/profile_create_request'
15
15
 
16
16
  module AppStoreConnect
17
- @config = {
18
- analytics_enabled: true,
19
- schema: Schema.new(File.join(__dir__, 'config', 'schema.json'))
20
- }
17
+ @config = {}
21
18
 
22
19
  class << self
23
20
  attr_accessor :config
@@ -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, response.content_type) 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)
@@ -7,14 +7,21 @@ module AppStoreConnect
7
7
  class Options < SimpleDelegator
8
8
  attr_reader :kwargs, :config, :env
9
9
 
10
+ DEFAULTS = {
11
+ analytics_enabled: true,
12
+ schema: Schema.new(File.join(__dir__, '..', '..', 'config', 'schema.json'))
13
+ }.freeze
14
+ private_constant :DEFAULTS
15
+
10
16
  ENV_REGEXP = /APP_STORE_CONNECT_(?<suffix>[A-Z_]+)/.freeze
11
17
  private_constant :ENV_REGEXP
12
18
 
13
- def initialize(kwargs)
19
+ def initialize(kwargs = {})
14
20
  @kwargs = kwargs
15
21
  @config = build_config
16
22
  @env = build_env
17
- options = @config.merge(kwargs.merge(@env))
23
+
24
+ options = DEFAULTS.merge(@env.merge(@config.merge(kwargs)))
18
25
 
19
26
  super(options)
20
27
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'mixpanel-ruby'
4
4
  require 'securerandom'
5
+ require 'app_store_connect/version'
5
6
 
6
7
  module AppStoreConnect
7
8
  class Client
@@ -20,7 +21,7 @@ module AppStoreConnect
20
21
  def track
21
22
  return false unless @enabled
22
23
 
23
- @tracker.track(@distinct_id, 'usage')
24
+ @tracker.track(@distinct_id, 'usage', version: VERSION)
24
25
  end
25
26
  end
26
27
  end
@@ -0,0 +1,32 @@
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
+ # 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
29
+ end
30
+ end
31
+ end
32
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppStoreConnect
4
- VERSION = '0.16.0'
4
+ VERSION = '0.21.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.16.0
4
+ version: 0.21.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-18 00:00:00.000000000 Z
11
+ date: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 6.0.3.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 6.0.3.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jwt
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +134,14 @@ dependencies:
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: 0.71.0
137
+ version: 0.75.0
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: 0.71.0
144
+ version: 0.75.0
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: simplecov
147
147
  requirement: !ruby/object:Gem::Requirement
@@ -208,6 +208,7 @@ files:
208
208
  - README.md
209
209
  - app_store_connect.gemspec
210
210
  - bin/console
211
+ - bin/publish
211
212
  - bin/setup
212
213
  - lib/app_store_connect.rb
213
214
  - lib/app_store_connect/bundle_id_create_request.rb
@@ -217,6 +218,7 @@ files:
217
218
  - lib/app_store_connect/client/options.rb
218
219
  - lib/app_store_connect/client/registry.rb
219
220
  - lib/app_store_connect/client/usage.rb
221
+ - lib/app_store_connect/client/utils.rb
220
222
  - lib/app_store_connect/create_request.rb
221
223
  - lib/app_store_connect/device_create_request.rb
222
224
  - lib/app_store_connect/object/attributes.rb