fastlane 2.174.0 → 2.179.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +93 -80
  4. data/cert/lib/cert/options.rb +3 -2
  5. data/cert/lib/cert/runner.rb +5 -1
  6. data/deliver/lib/deliver/app_screenshot.rb +6 -2
  7. data/deliver/lib/deliver/download_screenshots.rb +1 -2
  8. data/deliver/lib/deliver/options.rb +3 -2
  9. data/deliver/lib/deliver/runner.rb +12 -4
  10. data/deliver/lib/deliver/setup.rb +0 -1
  11. data/deliver/lib/deliver/upload_metadata.rb +5 -4
  12. data/deliver/lib/deliver/upload_screenshots.rb +12 -11
  13. data/fastlane/lib/fastlane/actions/adb.rb +1 -1
  14. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +8 -3
  15. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +7 -4
  16. data/fastlane/lib/fastlane/actions/appaloosa.rb +7 -2
  17. data/fastlane/lib/fastlane/actions/backup_file.rb +1 -1
  18. data/fastlane/lib/fastlane/actions/build_app.rb +4 -0
  19. data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +4 -0
  20. data/fastlane/lib/fastlane/actions/commit_github_file.rb +11 -1
  21. data/fastlane/lib/fastlane/actions/create_xcframework.rb +5 -0
  22. data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +1 -1
  23. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
  24. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +8 -2
  25. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -1
  26. data/fastlane/lib/fastlane/actions/download_dsyms.rb +5 -15
  27. data/fastlane/lib/fastlane/actions/get_github_release.rb +11 -1
  28. data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +4 -0
  29. data/fastlane/lib/fastlane/actions/get_version_number.rb +17 -10
  30. data/fastlane/lib/fastlane/actions/git_branch.rb +4 -10
  31. data/fastlane/lib/fastlane/actions/git_commit.rb +1 -1
  32. data/fastlane/lib/fastlane/actions/git_tag_exists.rb +4 -0
  33. data/fastlane/lib/fastlane/actions/github_api.rb +2 -1
  34. data/fastlane/lib/fastlane/actions/increment_build_number.rb +8 -1
  35. data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +4 -0
  36. data/fastlane/lib/fastlane/actions/jazzy.rb +10 -1
  37. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +3 -2
  38. data/fastlane/lib/fastlane/actions/match_nuke.rb +59 -0
  39. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +0 -1
  40. data/fastlane/lib/fastlane/actions/register_device.rb +3 -3
  41. data/fastlane/lib/fastlane/actions/register_devices.rb +3 -3
  42. data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
  43. data/fastlane/lib/fastlane/actions/set_changelog.rb +3 -3
  44. data/fastlane/lib/fastlane/actions/spaceship_logs.rb +1 -1
  45. data/fastlane/lib/fastlane/actions/swiftlint.rb +1 -1
  46. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +1 -1
  47. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +1 -2
  48. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +4 -5
  49. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +5 -1
  50. data/fastlane/lib/fastlane/documentation/actions_list.rb +2 -2
  51. data/fastlane/lib/fastlane/erb_template_helper.rb +7 -1
  52. data/fastlane/lib/fastlane/fast_file.rb +9 -5
  53. data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
  54. data/fastlane/lib/fastlane/helper/gem_helper.rb +2 -2
  55. data/fastlane/lib/fastlane/helper/git_helper.rb +11 -7
  56. data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -2
  57. data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -2
  58. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -2
  59. data/fastlane/lib/fastlane/swift_fastlane_function.rb +4 -0
  60. data/fastlane/lib/fastlane/version.rb +1 -1
  61. data/fastlane/swift/Deliverfile.swift +1 -1
  62. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  63. data/fastlane/swift/Fastlane.swift +491 -315
  64. data/fastlane/swift/Gymfile.swift +1 -1
  65. data/fastlane/swift/GymfileProtocol.swift +1 -1
  66. data/fastlane/swift/Matchfile.swift +1 -1
  67. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  68. data/fastlane/swift/Precheckfile.swift +1 -1
  69. data/fastlane/swift/PrecheckfileProtocol.swift +3 -3
  70. data/fastlane/swift/Scanfile.swift +1 -1
  71. data/fastlane/swift/ScanfileProtocol.swift +9 -1
  72. data/fastlane/swift/Screengrabfile.swift +1 -1
  73. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  74. data/fastlane/swift/Snapshotfile.swift +1 -1
  75. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  76. data/fastlane/swift/formatting/Brewfile.lock.json +13 -11
  77. data/fastlane_core/lib/fastlane_core.rb +1 -0
  78. data/fastlane_core/lib/fastlane_core/command_executor.rb +3 -9
  79. data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +1 -1
  80. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +23 -0
  81. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +6 -6
  82. data/fastlane_core/lib/fastlane_core/helper.rb +50 -6
  83. data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +3 -2
  84. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +14 -8
  85. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
  86. data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +3 -2
  87. data/fastlane_core/lib/fastlane_core/project.rb +3 -14
  88. data/{deliver/lib/deliver → fastlane_core/lib/fastlane_core}/queue_worker.rb +2 -2
  89. data/fastlane_core/lib/fastlane_core/ui/interface.rb +1 -1
  90. data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +2 -2
  91. data/gym/lib/gym/.runner.rb.swp +0 -0
  92. data/gym/lib/gym/generators/.package_command_generator_xcode7.rb.swp +0 -0
  93. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  94. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +13 -8
  95. data/gym/lib/gym/runner.rb +11 -4
  96. data/match/lib/match/change_password.rb +3 -3
  97. data/match/lib/match/encryption/interface.rb +1 -1
  98. data/match/lib/match/encryption/openssl.rb +2 -2
  99. data/match/lib/match/importer.rb +1 -1
  100. data/match/lib/match/migrate.rb +1 -1
  101. data/match/lib/match/module.rb +1 -0
  102. data/match/lib/match/nuke.rb +6 -1
  103. data/match/lib/match/options.rb +2 -2
  104. data/match/lib/match/runner.rb +1 -1
  105. data/match/lib/match/storage/google_cloud_storage.rb +1 -1
  106. data/match/lib/match/storage/s3_storage.rb +1 -1
  107. data/pilot/lib/pilot/build_manager.rb +25 -8
  108. data/pilot/lib/pilot/manager.rb +5 -1
  109. data/pilot/lib/pilot/options.rb +6 -5
  110. data/precheck/lib/precheck/options.rb +3 -2
  111. data/precheck/lib/precheck/runner.rb +6 -2
  112. data/scan/lib/scan/detect_values.rb +4 -1
  113. data/scan/lib/scan/options.rb +10 -0
  114. data/scan/lib/scan/runner.rb +27 -0
  115. data/screengrab/lib/screengrab/android_environment.rb +8 -6
  116. data/screengrab/lib/screengrab/runner.rb +2 -3
  117. data/sigh/lib/sigh/download_all.rb +1 -1
  118. data/sigh/lib/sigh/options.rb +3 -2
  119. data/sigh/lib/sigh/runner.rb +5 -1
  120. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -1
  121. data/spaceship/README.md +2 -2
  122. data/spaceship/lib/spaceship/client.rb +18 -17
  123. data/spaceship/lib/spaceship/connect_api/api_client.rb +24 -6
  124. data/spaceship/lib/spaceship/connect_api/models/app.rb +1 -1
  125. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +5 -0
  126. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +5 -0
  127. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +6 -0
  128. data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +5 -0
  129. data/spaceship/lib/spaceship/connect_api/models/build.rb +5 -0
  130. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
  131. data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +13 -0
  132. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +13 -0
  133. data/spaceship/lib/spaceship/connect_api/token.rb +2 -2
  134. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +15 -0
  135. data/spaceship/lib/spaceship/playground.rb +2 -2
  136. data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
  137. data/spaceship/lib/spaceship/two_step_or_factor_client.rb +41 -28
  138. metadata +41 -22
@@ -203,7 +203,7 @@ module Spaceship
203
203
  # @return (Bool) Was something changed?
204
204
  def ensure_version!(version_string, platform: nil, client: nil)
205
205
  client ||= Spaceship::ConnectAPI
206
- app_store_version = get_edit_app_store_version(platform: platform)
206
+ app_store_version = get_edit_app_store_version(client: client, platform: platform)
207
207
 
208
208
  if app_store_version
209
209
  if version_string != app_store_version.version_string
@@ -69,6 +69,11 @@ module Spaceship
69
69
  return client.get_app_preview_set(app_preview_set_id: app_preview_set_id, filter: nil, includes: includes, limit: nil, sort: nil).first
70
70
  end
71
71
 
72
+ def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
73
+ client ||= Spaceship::ConnectAPI
74
+ return client.delete_app_preview_set(app_preview_set_id: id)
75
+ end
76
+
72
77
  def upload_preview(client: nil, path: nil, wait_for_processing: true, position: nil, frame_time_code: nil)
73
78
  client ||= Spaceship::ConnectAPI
74
79
  # Upload preview
@@ -123,6 +123,11 @@ module Spaceship
123
123
  return client.get_app_screenshot_set(app_screenshot_set_id: app_screenshot_set_id, filter: nil, includes: includes, limit: nil, sort: nil).first
124
124
  end
125
125
 
126
+ def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
127
+ client ||= Spaceship::ConnectAPI
128
+ return client.delete_app_screenshot_set(app_screenshot_set_id: id)
129
+ end
130
+
126
131
  def upload_screenshot(client: nil, path: nil, wait_for_processing: true, position: nil)
127
132
  client ||= Spaceship::ConnectAPI
128
133
  screenshot = Spaceship::ConnectAPI::AppScreenshot.create(client: client, app_screenshot_set_id: id, path: path, wait_for_processing: wait_for_processing)
@@ -39,6 +39,12 @@ module Spaceship
39
39
  # API
40
40
  #
41
41
 
42
+ def self.get(client: nil, app_store_version_localization_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
43
+ client ||= Spaceship::ConnectAPI
44
+ resp = client.get_app_store_version_localization(app_store_version_localization_id: app_store_version_localization_id, filter: filter, includes: includes, limit: limit, sort: sort)
45
+ return resp.to_models
46
+ end
47
+
42
48
  def self.all(client: nil, app_store_version_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
43
49
  client ||= Spaceship::ConnectAPI
44
50
  resp = client.get_app_store_version_localizations(app_store_version_id: app_store_version_id, filter: filter, includes: includes, limit: limit, sort: sort)
@@ -38,6 +38,11 @@ module Spaceship
38
38
  return client.post_bulk_beta_tester_assignments(beta_group_id: id, beta_testers: beta_testers)
39
39
  end
40
40
 
41
+ def add_beta_testers(client: nil, beta_tester_ids:)
42
+ client ||= Spaceship::ConnectAPI
43
+ return client.add_beta_tester_to_group(beta_group_id: id, beta_tester_ids: beta_tester_ids)
44
+ end
45
+
41
46
  def update(client: nil, attributes: nil)
42
47
  return if attributes.empty?
43
48
 
@@ -87,6 +87,11 @@ module Spaceship
87
87
  return build_beta_detail.ready_for_beta_submission?
88
88
  end
89
89
 
90
+ def missing_export_compliance?
91
+ raise "No build_beta_detail included" unless build_beta_detail
92
+ return build_beta_detail.missing_export_compliance?
93
+ end
94
+
90
95
  # This is here temporarily until the removal of Spaceship::TestFlight
91
96
  def to_testflight_build
92
97
  h = {
@@ -56,6 +56,10 @@ module Spaceship
56
56
  def ready_for_beta_submission?
57
57
  return external_build_state == ExternalState::READY_FOR_BETA_SUBMISSION
58
58
  end
59
+
60
+ def missing_export_compliance?
61
+ return external_build_state == ExternalState::MISSING_EXPORT_COMPLIANCE
62
+ end
59
63
  end
60
64
  end
61
65
  end
@@ -53,6 +53,19 @@ module Spaceship
53
53
  return all(client: client, filter: { email: email }, includes: includes)
54
54
  end
55
55
 
56
+ def self.create(client: nil, email: nil, first_name: nil, last_name: nil, roles: [], provisioning_allowed: nil, all_apps_visible: nil)
57
+ client ||= Spaceship::ConnectAPI
58
+ resp = client.post_user_invitation(
59
+ email: email,
60
+ first_name: first_name,
61
+ last_name: last_name,
62
+ roles: roles,
63
+ provisioning_allowed: provisioning_allowed,
64
+ all_apps_visible: all_apps_visible
65
+ )
66
+ return resp.to_models.first
67
+ end
68
+
56
69
  def delete!(client: nil)
57
70
  client ||= Spaceship::ConnectAPI
58
71
  client.delete_user_invitation(user_invitation_id: id)
@@ -275,6 +275,19 @@ module Spaceship
275
275
  test_flight_request_client.post("bulkBetaTesterAssignments", body)
276
276
  end
277
277
 
278
+ def add_beta_tester_to_group(beta_group_id: nil, beta_tester_ids: nil)
279
+ beta_tester_ids || []
280
+ body = {
281
+ data: beta_tester_ids.map do |id|
282
+ {
283
+ type: "betaTesters",
284
+ id: id
285
+ }
286
+ end
287
+ }
288
+ test_flight_request_client.post("betaGroups/#{beta_group_id}/relationships/betaTesters", body)
289
+ end
290
+
278
291
  def delete_beta_tester_from_apps(beta_tester_id: nil, app_ids: [])
279
292
  body = {
280
293
  data: app_ids.map do |id|
@@ -37,10 +37,10 @@ module Spaceship
37
37
  raise "App Store Connect API key JSON is missing field(s): #{missing_keys.join(', ')}"
38
38
  end
39
39
 
40
- self.create(json)
40
+ self.create(**json)
41
41
  end
42
42
 
43
- def self.create(key_id: nil, issuer_id: nil, filepath: nil, key: nil, is_key_content_base64: false, duration: nil, in_house: nil)
43
+ def self.create(key_id: nil, issuer_id: nil, filepath: nil, key: nil, is_key_content_base64: false, duration: nil, in_house: nil, **)
44
44
  key_id ||= ENV['SPACESHIP_CONNECT_API_KEY_ID']
45
45
  issuer_id ||= ENV['SPACESHIP_CONNECT_API_ISSUER_ID']
46
46
  filepath ||= ENV['SPACESHIP_CONNECT_API_KEY_FILEPATH']
@@ -381,6 +381,11 @@ module Spaceship
381
381
  tunes_request_client.post("appPreviewSets", body)
382
382
  end
383
383
 
384
+ def delete_app_preview_set(app_preview_set_id: nil)
385
+ params = tunes_request_client.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
386
+ tunes_request_client.delete("appPreviewSets/#{app_preview_set_id}", params)
387
+ end
388
+
384
389
  def patch_app_preview_set_previews(app_preview_set_id: nil, app_preview_ids: nil)
385
390
  app_preview_ids ||= []
386
391
 
@@ -515,6 +520,11 @@ module Spaceship
515
520
  tunes_request_client.patch("appScreenshotSets/#{app_screenshot_set_id}/relationships/appScreenshots", body)
516
521
  end
517
522
 
523
+ def delete_app_screenshot_set(app_screenshot_set_id: nil)
524
+ params = tunes_request_client.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
525
+ tunes_request_client.delete("appScreenshotSets/#{app_screenshot_set_id}", params)
526
+ end
527
+
518
528
  #
519
529
  # appScreenshots
520
530
  #
@@ -757,6 +767,11 @@ module Spaceship
757
767
  tunes_request_client.get("appStoreVersions/#{app_store_version_id}/appStoreVersionLocalizations", params)
758
768
  end
759
769
 
770
+ def get_app_store_version_localization(app_store_version_localization_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
771
+ params = tunes_request_client.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
772
+ tunes_request_client.get("appStoreVersionLocalizations/#{app_store_version_localization_id}", params)
773
+ end
774
+
760
775
  def post_app_store_version_localization(app_store_version_id: nil, attributes: {})
761
776
  body = {
762
777
  data: {
@@ -13,8 +13,8 @@ module Spaceship
13
13
  rescue Gem::LoadError
14
14
  puts("Could not find gem 'pry'".red)
15
15
  puts("")
16
- puts("If you installed spaceship using `sudo gem install spaceship` run")
17
- puts(" sudo gem install pry".yellow)
16
+ puts("If you installed spaceship using `gem install spaceship` run")
17
+ puts(" gem install pry".yellow)
18
18
  puts("to install the missing gem")
19
19
  puts("")
20
20
  puts("If you use a Gemfile add this to your Gemfile:")
@@ -579,10 +579,10 @@ module Spaceship
579
579
  }
580
580
 
581
581
  r = request(:post) do |req|
582
- req.url("https://analytics.itunes.apple.com/analytics/api/v1/data/time-series")
582
+ req.url("https://appstoreconnect.apple.com/analytics/api/v1/data/time-series")
583
583
  req.body = data.to_json
584
584
  req.headers['Content-Type'] = 'application/json'
585
- req.headers['X-Requested-By'] = 'analytics.itunes.apple.com'
585
+ req.headers['X-Requested-By'] = 'appstoreconnect.apple.com'
586
586
  end
587
587
 
588
588
  data = parse_response(r)
@@ -135,7 +135,7 @@ module Spaceship
135
135
 
136
136
  phone_number = env_2fa_sms_default_phone_number
137
137
  phone_id = phone_id_from_number(response.body["trustedPhoneNumbers"], phone_number)
138
- push_mode = push_mode_from_masked_number(response.body["trustedPhoneNumbers"], phone_number)
138
+ push_mode = push_mode_from_number(response.body["trustedPhoneNumbers"], phone_number)
139
139
  # don't request sms if no trusted devices and env default is the only trusted number,
140
140
  # code was automatically sent
141
141
  should_request_code = !sms_automatically_sent(response)
@@ -234,34 +234,8 @@ module Spaceship
234
234
  end
235
235
 
236
236
  def phone_id_from_number(phone_numbers, phone_number)
237
- characters_to_remove_from_phone_numbers = ' \-()"'
238
-
239
- # start with e.g. +49 162 1234585 or +1-123-456-7866
240
- phone_number = phone_number.tr(characters_to_remove_from_phone_numbers, '')
241
- # cleaned: +491621234585 or +11234567866
242
-
243
237
  phone_numbers.each do |phone|
244
- # rubocop:disable Style/AsciiComments
245
- # start with: +49 •••• •••••85 or +1 (•••) •••-••66
246
- number_with_dialcode_masked = phone['numberWithDialCode'].tr(characters_to_remove_from_phone_numbers, '')
247
- # cleaned: +49•••••••••85 or +1••••••••66
248
- # rubocop:enable Style/AsciiComments
249
-
250
- maskings_count = number_with_dialcode_masked.count('•') # => 9 or 8
251
- pattern = /^([0-9+]{2,4})([•]{#{maskings_count}})([0-9]{2})$/
252
- # following regex: range from maskings_count-2 because sometimes the masked number has 1 or 2 dots more than the actual number
253
- # e.g. https://github.com/fastlane/fastlane/issues/14969
254
- replacement = "\\1([0-9]{#{maskings_count - 2},#{maskings_count}})\\3"
255
- number_with_dialcode_regex_part = number_with_dialcode_masked.gsub(pattern, replacement)
256
- # => +49([0-9]{8,9})85 or +1([0-9]{7,8})66
257
-
258
- backslash = '\\'
259
- number_with_dialcode_regex_part = backslash + number_with_dialcode_regex_part
260
- number_with_dialcode_regex = /^#{number_with_dialcode_regex_part}$/
261
- # => /^\+49([0-9]{8})85$/ or /^\+1([0-9]{7,8})66$/
262
-
263
- return phone['id'] if phone_number =~ number_with_dialcode_regex
264
- # +491621234585 matches /^\+49([0-9]{8})85$/
238
+ return phone['id'] if match_phone_to_masked_phone(phone_number, phone['numberWithDialCode'])
265
239
  end
266
240
 
267
241
  # Handle case of phone_number not existing in phone_numbers because ENV var is wrong or matcher is broken
@@ -272,6 +246,45 @@ If it is, please open an issue at https://github.com/fastlane/fastlane/issues/ne
272
246
  )
273
247
  end
274
248
 
249
+ def push_mode_from_number(phone_numbers, phone_number)
250
+ phone_numbers.each do |phone|
251
+ return phone['pushMode'] if match_phone_to_masked_phone(phone_number, phone['numberWithDialCode'])
252
+ end
253
+
254
+ # If no pushMode was supplied, assume sms
255
+ return "sms"
256
+ end
257
+
258
+ def match_phone_to_masked_phone(phone_number, masked_number)
259
+ characters_to_remove_from_phone_numbers = ' \-()"'
260
+
261
+ # start with e.g. +49 162 1234585 or +1-123-456-7866
262
+ phone_number = phone_number.tr(characters_to_remove_from_phone_numbers, '')
263
+ # cleaned: +491621234585 or +11234567866
264
+
265
+ # rubocop:disable Style/AsciiComments
266
+ # start with: +49 •••• •••••85 or +1 (•••) •••-••66
267
+ number_with_dialcode_masked = masked_number.tr(characters_to_remove_from_phone_numbers, '')
268
+ # cleaned: +49•••••••••85 or +1••••••••66
269
+ # rubocop:enable Style/AsciiComments
270
+
271
+ maskings_count = number_with_dialcode_masked.count('•') # => 9 or 8
272
+ pattern = /^([0-9+]{2,4})([•]{#{maskings_count}})([0-9]{2})$/
273
+ # following regex: range from maskings_count-2 because sometimes the masked number has 1 or 2 dots more than the actual number
274
+ # e.g. https://github.com/fastlane/fastlane/issues/14969
275
+ replacement = "\\1([0-9]{#{maskings_count - 2},#{maskings_count}})\\3"
276
+ number_with_dialcode_regex_part = number_with_dialcode_masked.gsub(pattern, replacement)
277
+ # => +49([0-9]{8,9})85 or +1([0-9]{7,8})66
278
+
279
+ backslash = '\\'
280
+ number_with_dialcode_regex_part = backslash + number_with_dialcode_regex_part
281
+ number_with_dialcode_regex = /^#{number_with_dialcode_regex_part}$/
282
+ # => /^\+49([0-9]{8})85$/ or /^\+1([0-9]{7,8})66$/
283
+
284
+ return phone_number =~ number_with_dialcode_regex
285
+ # +491621234585 matches /^\+49([0-9]{8})85$/
286
+ end
287
+
275
288
  def phone_id_from_masked_number(phone_numbers, masked_number)
276
289
  phone_numbers.each do |phone|
277
290
  return phone['id'] if phone['numberWithDialCode'] == masked_number
metadata CHANGED
@@ -1,35 +1,37 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.174.0
4
+ version: 2.179.0
5
5
  platform: ruby
6
6
  authors:
7
- - Felix Krause
7
+ - Luka Mirosevic
8
+ - Max Ott
9
+ - Joshua Liebowitz
10
+ - Jérôme Lacoste
11
+ - Manu Wallner
8
12
  - Stefan Natchev
9
- - Jorge Revuelta H
10
- - Matthew Ellis
11
- - Jimmy Dee
12
13
  - Andrew McBurney
13
- - Jérôme Lacoste
14
+ - Roger Oba
15
+ - Daniel Jankowski
16
+ - Satoshi Namai
17
+ - Jimmy Dee
14
18
  - Kohki Miki
19
+ - Iulian Onofrei
20
+ - Fumiya Nakamura
21
+ - Josh Holtz
15
22
  - Helmut Januschka
23
+ - Felix Krause
16
24
  - Jan Piotrowski
17
- - Daniel Jankowski
25
+ - Aaron Brager
26
+ - Maksym Grebenets
27
+ - Jorge Revuelta H
18
28
  - Danielle Tomlinson
19
- - Max Ott
20
- - Josh Holtz
21
- - Iulian Onofrei
22
- - Joshua Liebowitz
29
+ - Matthew Ellis
23
30
  - Olivier Halligon
24
- - Fumiya Nakamura
25
- - Maksym Grebenets
26
- - Luka Mirosevic
27
- - Manu Wallner
28
- - Aaron Brager
29
31
  autorequire:
30
32
  bindir: bin
31
33
  cert_chain: []
32
- date: 2021-02-10 00:00:00.000000000 Z
34
+ date: 2021-03-26 00:00:00.000000000 Z
33
35
  dependencies:
34
36
  - !ruby/object:Gem::Dependency
35
37
  name: slack-notifier
@@ -477,6 +479,20 @@ dependencies:
477
479
  - - "<"
478
480
  - !ruby/object:Gem::Version
479
481
  version: 5.0.0
482
+ - !ruby/object:Gem::Dependency
483
+ name: naturally
484
+ requirement: !ruby/object:Gem::Requirement
485
+ requirements:
486
+ - - "~>"
487
+ - !ruby/object:Gem::Version
488
+ version: '2.2'
489
+ type: :runtime
490
+ prerelease: false
491
+ version_requirements: !ruby/object:Gem::Requirement
492
+ requirements:
493
+ - - "~>"
494
+ - !ruby/object:Gem::Version
495
+ version: '2.2'
480
496
  - !ruby/object:Gem::Dependency
481
497
  name: rubyzip
482
498
  requirement: !ruby/object:Gem::Requirement
@@ -693,14 +709,14 @@ dependencies:
693
709
  requirements:
694
710
  - - "~>"
695
711
  - !ruby/object:Gem::Version
696
- version: 3.10.0
712
+ version: '3.10'
697
713
  type: :development
698
714
  prerelease: false
699
715
  version_requirements: !ruby/object:Gem::Requirement
700
716
  requirements:
701
717
  - - "~>"
702
718
  - !ruby/object:Gem::Version
703
- version: 3.10.0
719
+ version: '3.10'
704
720
  - !ruby/object:Gem::Dependency
705
721
  name: rspec_junit_formatter
706
722
  requirement: !ruby/object:Gem::Requirement
@@ -875,14 +891,14 @@ dependencies:
875
891
  requirements:
876
892
  - - "~>"
877
893
  - !ruby/object:Gem::Version
878
- version: 1.2.1
894
+ version: '1.2'
879
895
  type: :development
880
896
  prerelease: false
881
897
  version_requirements: !ruby/object:Gem::Requirement
882
898
  requirements:
883
899
  - - "~>"
884
900
  - !ruby/object:Gem::Version
885
- version: 1.2.1
901
+ version: '1.2'
886
902
  - !ruby/object:Gem::Dependency
887
903
  name: sinatra
888
904
  requirement: !ruby/object:Gem::Requirement
@@ -969,7 +985,6 @@ files:
969
985
  - deliver/lib/deliver/loader.rb
970
986
  - deliver/lib/deliver/module.rb
971
987
  - deliver/lib/deliver/options.rb
972
- - deliver/lib/deliver/queue_worker.rb
973
988
  - deliver/lib/deliver/runner.rb
974
989
  - deliver/lib/deliver/setup.rb
975
990
  - deliver/lib/deliver/submit_for_review.rb
@@ -1138,6 +1153,7 @@ files:
1138
1153
  - fastlane/lib/fastlane/actions/mailgun.rb
1139
1154
  - fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb
1140
1155
  - fastlane/lib/fastlane/actions/match.rb
1156
+ - fastlane/lib/fastlane/actions/match_nuke.rb
1141
1157
  - fastlane/lib/fastlane/actions/min_fastlane_version.rb
1142
1158
  - fastlane/lib/fastlane/actions/modify_services.rb
1143
1159
  - fastlane/lib/fastlane/actions/nexus_upload.rb
@@ -1409,6 +1425,7 @@ files:
1409
1425
  - fastlane_core/lib/fastlane_core/print_table.rb
1410
1426
  - fastlane_core/lib/fastlane_core/project.rb
1411
1427
  - fastlane_core/lib/fastlane_core/provisioning_profile.rb
1428
+ - fastlane_core/lib/fastlane_core/queue_worker.rb
1412
1429
  - fastlane_core/lib/fastlane_core/string_filters.rb
1413
1430
  - fastlane_core/lib/fastlane_core/swag.rb
1414
1431
  - fastlane_core/lib/fastlane_core/tag_version.rb
@@ -1451,10 +1468,12 @@ files:
1451
1468
  - gym/lib/assets/GymfileTemplate.swift
1452
1469
  - gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh
1453
1470
  - gym/lib/gym.rb
1471
+ - gym/lib/gym/.runner.rb.swp
1454
1472
  - gym/lib/gym/code_signing_mapping.rb
1455
1473
  - gym/lib/gym/commands_generator.rb
1456
1474
  - gym/lib/gym/detect_values.rb
1457
1475
  - gym/lib/gym/error_handler.rb
1476
+ - gym/lib/gym/generators/.package_command_generator_xcode7.rb.swp
1458
1477
  - gym/lib/gym/generators/README.md
1459
1478
  - gym/lib/gym/generators/build_command_generator.rb
1460
1479
  - gym/lib/gym/generators/package_command_generator.rb