spaceship 0.31.6 → 0.31.7

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
  SHA1:
3
- metadata.gz: d788622c130a3b2e34466ccb016a0cf738065298
4
- data.tar.gz: 73d2b9354d52f3cdf8103b1048c773d90d215979
3
+ metadata.gz: 293ec17256da9ad97ac287851b6ce5a37649d5b6
4
+ data.tar.gz: 776113953f98a7d6da446f5411e11be1d3d83bfc
5
5
  SHA512:
6
- metadata.gz: e54306bbaa42d5f0a2868e0628a6c700d311f15fc93d0a2cbabbe4ff835496e23585159455555b4cba36db1cb828b5e5be0ab0c11f93e39eff52c9f6278f806c
7
- data.tar.gz: 09bdcd80ec9df1c5af745d3ed6bb0f10fd4346af9cbc38d5fda788bd1a7c83f211c8b1dd1d0c2383d75d8ba2567ce2189a1fb41fe581c5032999c4105111495d
6
+ metadata.gz: d24cfbed3e14bb9e6a3b51793632dc58d67fd09969ec5bd82f1bb08f98e5fa34b2e97839e0d8be23a88af2a87649e8cf7e09d86d53ace6dbb3375a2e75b7a75c
7
+ data.tar.gz: 23b14134b3397e463170b2d37234bfb2b1184c06802a81f7326e60fd0326c5aacdfcd6f07826fecdc77579fee9c84edc20b57f443fa1405f2480cf0163480297
@@ -64,6 +64,10 @@ module Spaceship
64
64
  if teams.count > 1
65
65
  puts "The current user is in #{teams.count} teams. Pass a team ID or call `select_team` to choose a team. Using the first one for now."
66
66
  end
67
+
68
+ if teams.count == 0
69
+ raise "User '#{user}' does not have access to any teams with an active membership"
70
+ end
67
71
  @current_team_id ||= teams[0]['teamId']
68
72
  end
69
73
 
@@ -151,6 +155,11 @@ module Spaceship
151
155
  end
152
156
 
153
157
  def create_app!(type, name, bundle_id, mac: false)
158
+ # We moved the ensure_csrf to the top of this method
159
+ # as we got some users with issues around creating new apps
160
+ # https://github.com/fastlane/fastlane/issues/5813
161
+ ensure_csrf
162
+
154
163
  ident_params = case type.to_sym
155
164
  when :explicit
156
165
  {
@@ -174,7 +183,6 @@ module Spaceship
174
183
 
175
184
  params.merge!(ident_params)
176
185
 
177
- ensure_csrf
178
186
  r = request(:post, "account/#{platform_slug(mac)}/identifiers/addAppId.action", params)
179
187
  parse_response(r, 'appId')
180
188
  end
@@ -204,6 +212,8 @@ module Spaceship
204
212
  end
205
213
 
206
214
  def create_app_group!(name, group_id)
215
+ ensure_csrf
216
+
207
217
  r = request(:post, 'account/ios/identifiers/addApplicationGroup.action', {
208
218
  name: name,
209
219
  identifier: group_id,
@@ -213,6 +223,8 @@ module Spaceship
213
223
  end
214
224
 
215
225
  def delete_app_group!(app_group_id)
226
+ ensure_csrf
227
+
216
228
  r = request(:post, 'account/ios/identifiers/deleteApplicationGroup.action', {
217
229
  teamId: team_id,
218
230
  applicationGroup: app_group_id
@@ -310,6 +322,8 @@ module Spaceship
310
322
  end
311
323
 
312
324
  def revoke_certificate!(certificate_id, type, mac: false)
325
+ ensure_csrf
326
+
313
327
  r = request(:post, "account/#{platform_slug(mac)}/certificate/revokeCertificate.action", {
314
328
  teamId: team_id,
315
329
  certificateId: certificate_id,
@@ -1,4 +1,4 @@
1
1
  module Spaceship
2
- VERSION = "0.31.6".freeze
2
+ VERSION = "0.31.7".freeze
3
3
  DESCRIPTION = "Ruby library to access the Apple Dev Center and iTunes Connect".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spaceship
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.6
4
+ version: 0.31.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-20 00:00:00.000000000 Z
12
+ date: 2016-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: credentials_manager