fastlane 2.175.0 → 2.180.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +95 -82
  4. data/cert/lib/cert/options.rb +1 -0
  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 +1 -0
  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 +10 -10
  13. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +6 -1
  14. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +8 -5
  15. data/fastlane/lib/fastlane/actions/appaloosa.rb +7 -2
  16. data/fastlane/lib/fastlane/actions/backup_file.rb +1 -1
  17. data/fastlane/lib/fastlane/actions/build_app.rb +4 -0
  18. data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +4 -0
  19. data/fastlane/lib/fastlane/actions/commit_github_file.rb +11 -1
  20. data/fastlane/lib/fastlane/actions/create_xcframework.rb +5 -0
  21. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -1
  22. data/fastlane/lib/fastlane/actions/get_github_release.rb +11 -1
  23. data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +4 -0
  24. data/fastlane/lib/fastlane/actions/get_version_number.rb +17 -10
  25. data/fastlane/lib/fastlane/actions/git_branch.rb +4 -10
  26. data/fastlane/lib/fastlane/actions/git_tag_exists.rb +4 -0
  27. data/fastlane/lib/fastlane/actions/github_api.rb +2 -1
  28. data/fastlane/lib/fastlane/actions/increment_build_number.rb +8 -1
  29. data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +4 -0
  30. data/fastlane/lib/fastlane/actions/jazzy.rb +10 -1
  31. data/fastlane/lib/fastlane/actions/jira.rb +61 -14
  32. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +1 -0
  33. data/fastlane/lib/fastlane/actions/match_nuke.rb +59 -0
  34. data/fastlane/lib/fastlane/actions/notarize.rb +98 -51
  35. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +0 -1
  36. data/fastlane/lib/fastlane/actions/register_device.rb +1 -1
  37. data/fastlane/lib/fastlane/actions/register_devices.rb +1 -1
  38. data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
  39. data/fastlane/lib/fastlane/actions/set_changelog.rb +1 -1
  40. data/fastlane/lib/fastlane/actions/sourcedocs.rb +164 -0
  41. data/fastlane/lib/fastlane/actions/spaceship_logs.rb +1 -1
  42. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +1 -2
  43. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +4 -5
  44. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +5 -1
  45. data/fastlane/lib/fastlane/erb_template_helper.rb +7 -1
  46. data/fastlane/lib/fastlane/fast_file.rb +9 -5
  47. data/fastlane/lib/fastlane/helper/git_helper.rb +11 -7
  48. data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -2
  49. data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -2
  50. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -2
  51. data/fastlane/lib/fastlane/setup/setup.rb +23 -10
  52. data/fastlane/lib/fastlane/swift_fastlane_function.rb +4 -0
  53. data/fastlane/lib/fastlane/swift_runner_upgrader.rb +2 -0
  54. data/fastlane/lib/fastlane/version.rb +1 -1
  55. data/fastlane/swift/Deliverfile.swift +1 -1
  56. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  57. data/fastlane/swift/Fastlane.swift +574 -332
  58. data/fastlane/swift/Gymfile.swift +1 -1
  59. data/fastlane/swift/GymfileProtocol.swift +1 -1
  60. data/fastlane/swift/LaneFileProtocol.swift +9 -3
  61. data/fastlane/swift/Matchfile.swift +1 -1
  62. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  63. data/fastlane/swift/Precheckfile.swift +1 -1
  64. data/fastlane/swift/PrecheckfileProtocol.swift +3 -3
  65. data/fastlane/swift/RubyCommand.swift +1 -1
  66. data/fastlane/swift/Scanfile.swift +1 -1
  67. data/fastlane/swift/ScanfileProtocol.swift +13 -1
  68. data/fastlane/swift/Screengrabfile.swift +1 -1
  69. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  70. data/fastlane/swift/Snapshotfile.swift +1 -1
  71. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  72. data/fastlane/swift/SocketClient.swift +2 -1
  73. data/fastlane/swift/SocketResponse.swift +4 -2
  74. data/fastlane/swift/formatting/Brewfile.lock.json +12 -12
  75. data/fastlane_core/lib/fastlane_core.rb +1 -0
  76. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +5 -3
  77. data/fastlane_core/lib/fastlane_core/helper.rb +24 -1
  78. data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +3 -2
  79. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +14 -8
  80. data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +3 -2
  81. data/fastlane_core/lib/fastlane_core/project.rb +3 -14
  82. data/{deliver/lib/deliver → fastlane_core/lib/fastlane_core}/queue_worker.rb +4 -4
  83. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +12 -1
  84. data/fastlane_core/lib/fastlane_core/ui/interface.rb +1 -1
  85. data/gym/lib/gym/generators/.package_command_generator_xcode7.rb.swp +0 -0
  86. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  87. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +13 -8
  88. data/gym/lib/gym/runner.rb +11 -4
  89. data/match/lib/match/change_password.rb +3 -3
  90. data/match/lib/match/encryption/interface.rb +1 -1
  91. data/match/lib/match/encryption/openssl.rb +2 -2
  92. data/match/lib/match/importer.rb +1 -1
  93. data/match/lib/match/migrate.rb +1 -1
  94. data/match/lib/match/module.rb +1 -0
  95. data/match/lib/match/nuke.rb +1 -1
  96. data/match/lib/match/runner.rb +1 -1
  97. data/match/lib/match/storage/google_cloud_storage.rb +1 -1
  98. data/match/lib/match/storage/s3_storage.rb +1 -1
  99. data/pilot/lib/pilot/build_manager.rb +25 -8
  100. data/pilot/lib/pilot/manager.rb +5 -1
  101. data/pilot/lib/pilot/options.rb +4 -3
  102. data/precheck/lib/precheck/options.rb +1 -0
  103. data/precheck/lib/precheck/runner.rb +6 -2
  104. data/scan/lib/scan/detect_values.rb +4 -1
  105. data/scan/lib/scan/options.rb +20 -5
  106. data/scan/lib/scan/runner.rb +79 -1
  107. data/scan/lib/scan/test_command_generator.rb +8 -8
  108. data/screengrab/lib/screengrab/android_environment.rb +6 -4
  109. data/screengrab/lib/screengrab/runner.rb +2 -3
  110. data/sigh/lib/sigh/download_all.rb +1 -1
  111. data/sigh/lib/sigh/options.rb +1 -0
  112. data/sigh/lib/sigh/runner.rb +5 -1
  113. data/snapshot/lib/assets/SnapshotHelper.swift +1 -1
  114. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -1
  115. data/spaceship/lib/spaceship/client.rb +18 -17
  116. data/spaceship/lib/spaceship/connect_api/api_client.rb +24 -6
  117. data/spaceship/lib/spaceship/connect_api/models/app.rb +1 -1
  118. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +5 -0
  119. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +1 -1
  120. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +5 -0
  121. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +6 -0
  122. data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +5 -0
  123. data/spaceship/lib/spaceship/connect_api/models/build.rb +5 -0
  124. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
  125. data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +13 -0
  126. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +13 -0
  127. data/spaceship/lib/spaceship/connect_api/token.rb +8 -2
  128. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +15 -0
  129. data/spaceship/lib/spaceship/two_step_or_factor_client.rb +41 -28
  130. metadata +26 -21
@@ -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
@@ -112,7 +112,7 @@ module Spaceship
112
112
  timeout_minutes = (ENV["SPACESHIP_SCREENSHOT_UPLOAD_TIMEOUT"] || 20).to_i
113
113
 
114
114
  loop do
115
- # This error handling needs to be revised since any error occured can reach here.
115
+ # This error handling needs to be revised since any error occurred can reach here.
116
116
  # It should handle errors based on what status code is.
117
117
  puts("Waiting for screenshots to appear before uploading. This is unlikely to be recovered unless it's 503 error. error=\"#{error}\"")
118
118
  sleep(30)
@@ -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,7 +37,7 @@ 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
43
  def self.create(key_id: nil, issuer_id: nil, filepath: nil, key: nil, is_key_content_base64: false, duration: nil, in_house: nil, **)
@@ -60,14 +60,16 @@ module Spaceship
60
60
  key_id: key_id,
61
61
  issuer_id: issuer_id,
62
62
  key: OpenSSL::PKey::EC.new(key),
63
+ key_raw: key,
63
64
  duration: duration,
64
65
  in_house: in_house
65
66
  )
66
67
  end
67
68
 
68
- def initialize(key_id: nil, issuer_id: nil, key: nil, duration: nil, in_house: nil)
69
+ def initialize(key_id: nil, issuer_id: nil, key: nil, key_raw: nil, duration: nil, in_house: nil)
69
70
  @key_id = key_id
70
71
  @key = key
72
+ @key_raw = key_raw
71
73
  @issuer_id = issuer_id
72
74
  @duration = duration
73
75
  @in_house = in_house
@@ -97,6 +99,10 @@ module Spaceship
97
99
  def expired?
98
100
  @expiration < Time.now
99
101
  end
102
+
103
+ def write_key_to_file(path)
104
+ File.open(path, 'w') { |f| f.write(@key_raw) }
105
+ end
100
106
  end
101
107
  end
102
108
  end
@@ -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: {
@@ -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.175.0
4
+ version: 2.180.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Jimmy Dee
8
+ - Roger Oba
9
+ - Daniel Jankowski
10
+ - Satoshi Namai
7
11
  - Joshua Liebowitz
12
+ - Max Ott
13
+ - Manu Wallner
8
14
  - Felix Krause
15
+ - Fumiya Nakamura
16
+ - Aaron Brager
17
+ - Maksym Grebenets
9
18
  - Jorge Revuelta H
10
- - Iulian Onofrei
11
- - Jan Piotrowski
12
- - Manu Wallner
13
- - Max Ott
14
19
  - Helmut Januschka
15
- - Aaron Brager
16
- - Jérôme Lacoste
17
- - Luka Mirosevic
18
- - Danielle Tomlinson
19
- - Matthew Ellis
20
- - Stefan Natchev
21
- - Fumiya Nakamura
22
20
  - Olivier Halligon
21
+ - Iulian Onofrei
22
+ - Stefan Natchev
23
23
  - Andrew McBurney
24
- - Maksym Grebenets
25
24
  - Josh Holtz
26
- - Jimmy Dee
25
+ - Danielle Tomlinson
27
26
  - Kohki Miki
28
- - Daniel Jankowski
27
+ - Jan Piotrowski
28
+ - Jérôme Lacoste
29
+ - Luka Mirosevic
30
+ - Matthew Ellis
29
31
  autorequire:
30
32
  bindir: bin
31
33
  cert_chain: []
32
- date: 2021-02-19 00:00:00.000000000 Z
34
+ date: 2021-04-08 00:00:00.000000000 Z
33
35
  dependencies:
34
36
  - !ruby/object:Gem::Dependency
35
37
  name: slack-notifier
@@ -707,14 +709,14 @@ dependencies:
707
709
  requirements:
708
710
  - - "~>"
709
711
  - !ruby/object:Gem::Version
710
- version: 3.10.0
712
+ version: '3.10'
711
713
  type: :development
712
714
  prerelease: false
713
715
  version_requirements: !ruby/object:Gem::Requirement
714
716
  requirements:
715
717
  - - "~>"
716
718
  - !ruby/object:Gem::Version
717
- version: 3.10.0
719
+ version: '3.10'
718
720
  - !ruby/object:Gem::Dependency
719
721
  name: rspec_junit_formatter
720
722
  requirement: !ruby/object:Gem::Requirement
@@ -889,14 +891,14 @@ dependencies:
889
891
  requirements:
890
892
  - - "~>"
891
893
  - !ruby/object:Gem::Version
892
- version: 1.2.1
894
+ version: '1.2'
893
895
  type: :development
894
896
  prerelease: false
895
897
  version_requirements: !ruby/object:Gem::Requirement
896
898
  requirements:
897
899
  - - "~>"
898
900
  - !ruby/object:Gem::Version
899
- version: 1.2.1
901
+ version: '1.2'
900
902
  - !ruby/object:Gem::Dependency
901
903
  name: sinatra
902
904
  requirement: !ruby/object:Gem::Requirement
@@ -983,7 +985,6 @@ files:
983
985
  - deliver/lib/deliver/loader.rb
984
986
  - deliver/lib/deliver/module.rb
985
987
  - deliver/lib/deliver/options.rb
986
- - deliver/lib/deliver/queue_worker.rb
987
988
  - deliver/lib/deliver/runner.rb
988
989
  - deliver/lib/deliver/setup.rb
989
990
  - deliver/lib/deliver/submit_for_review.rb
@@ -1152,6 +1153,7 @@ files:
1152
1153
  - fastlane/lib/fastlane/actions/mailgun.rb
1153
1154
  - fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb
1154
1155
  - fastlane/lib/fastlane/actions/match.rb
1156
+ - fastlane/lib/fastlane/actions/match_nuke.rb
1155
1157
  - fastlane/lib/fastlane/actions/min_fastlane_version.rb
1156
1158
  - fastlane/lib/fastlane/actions/modify_services.rb
1157
1159
  - fastlane/lib/fastlane/actions/nexus_upload.rb
@@ -1208,6 +1210,7 @@ files:
1208
1210
  - fastlane/lib/fastlane/actions/slather.rb
1209
1211
  - fastlane/lib/fastlane/actions/snapshot.rb
1210
1212
  - fastlane/lib/fastlane/actions/sonar.rb
1213
+ - fastlane/lib/fastlane/actions/sourcedocs.rb
1211
1214
  - fastlane/lib/fastlane/actions/spaceship_logs.rb
1212
1215
  - fastlane/lib/fastlane/actions/spaceship_stats.rb
1213
1216
  - fastlane/lib/fastlane/actions/splunkmint.rb
@@ -1423,6 +1426,7 @@ files:
1423
1426
  - fastlane_core/lib/fastlane_core/print_table.rb
1424
1427
  - fastlane_core/lib/fastlane_core/project.rb
1425
1428
  - fastlane_core/lib/fastlane_core/provisioning_profile.rb
1429
+ - fastlane_core/lib/fastlane_core/queue_worker.rb
1426
1430
  - fastlane_core/lib/fastlane_core/string_filters.rb
1427
1431
  - fastlane_core/lib/fastlane_core/swag.rb
1428
1432
  - fastlane_core/lib/fastlane_core/tag_version.rb
@@ -1469,6 +1473,7 @@ files:
1469
1473
  - gym/lib/gym/commands_generator.rb
1470
1474
  - gym/lib/gym/detect_values.rb
1471
1475
  - gym/lib/gym/error_handler.rb
1476
+ - gym/lib/gym/generators/.package_command_generator_xcode7.rb.swp
1472
1477
  - gym/lib/gym/generators/README.md
1473
1478
  - gym/lib/gym/generators/build_command_generator.rb
1474
1479
  - gym/lib/gym/generators/package_command_generator.rb