fastlane 2.136.0 → 2.141.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +85 -72
  3. data/cert/lib/cert/options.rb +12 -5
  4. data/cert/lib/cert/runner.rb +13 -0
  5. data/deliver/lib/deliver/options.rb +2 -2
  6. data/deliver/lib/deliver/runner.rb +13 -2
  7. data/deliver/lib/deliver/submit_for_review.rb +7 -1
  8. data/fastlane/lib/fastlane/action.rb +2 -2
  9. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +1 -1
  10. data/fastlane/lib/fastlane/actions/build_app.rb +157 -6
  11. data/fastlane/lib/fastlane/actions/build_ios_app.rb +28 -132
  12. data/fastlane/lib/fastlane/actions/build_mac_app.rb +46 -0
  13. data/fastlane/lib/fastlane/actions/create_pull_request.rb +71 -2
  14. data/fastlane/lib/fastlane/actions/docs/{build_ios_app.md → build_app.md} +1 -1
  15. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +19 -0
  16. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +10 -0
  17. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +4 -2
  18. data/fastlane/lib/fastlane/actions/ensure_bundle_exec.rb +3 -3
  19. data/fastlane/lib/fastlane/actions/get_version_number.rb +7 -2
  20. data/fastlane/lib/fastlane/actions/gradle.rb +54 -3
  21. data/fastlane/lib/fastlane/actions/gym.rb +3 -7
  22. data/fastlane/lib/fastlane/actions/import_from_git.rb +4 -0
  23. data/fastlane/lib/fastlane/actions/increment_version_number.rb +6 -3
  24. data/fastlane/lib/fastlane/actions/last_git_tag.rb +14 -5
  25. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +2 -2
  26. data/fastlane/lib/fastlane/actions/register_devices.rb +5 -1
  27. data/fastlane/lib/fastlane/actions/ruby_version.rb +1 -1
  28. data/fastlane/lib/fastlane/actions/run_tests.rb +5 -22
  29. data/fastlane/lib/fastlane/actions/set_github_release.rb +1 -1
  30. data/fastlane/lib/fastlane/actions/setup_ci.rb +14 -8
  31. data/fastlane/lib/fastlane/actions/testfairy.rb +8 -1
  32. data/fastlane/lib/fastlane/actions/update_plist.rb +37 -2
  33. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +1 -0
  34. data/fastlane/lib/fastlane/actions/upload_to_play_store_internal_app_sharing.rb +78 -0
  35. data/fastlane/lib/fastlane/actions/verify_build.rb +1 -1
  36. data/fastlane/lib/fastlane/actions/xcode_select.rb +6 -1
  37. data/fastlane/lib/fastlane/cli_tools_distributor.rb +2 -2
  38. data/fastlane/lib/fastlane/commands_generator.rb +1 -1
  39. data/fastlane/lib/fastlane/fast_file.rb +13 -3
  40. data/fastlane/lib/fastlane/helper/adb_helper.rb +13 -4
  41. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +2 -0
  42. data/fastlane/lib/fastlane/runner.rb +23 -18
  43. data/fastlane/lib/fastlane/version.rb +1 -1
  44. data/fastlane/swift/Deliverfile.swift +1 -1
  45. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  46. data/fastlane/swift/Fastlane.swift +342 -66
  47. data/fastlane/swift/Gymfile.swift +1 -1
  48. data/fastlane/swift/GymfileProtocol.swift +17 -1
  49. data/fastlane/swift/Matchfile.swift +1 -1
  50. data/fastlane/swift/MatchfileProtocol.swift +12 -4
  51. data/fastlane/swift/Precheckfile.swift +1 -1
  52. data/fastlane/swift/Scanfile.swift +1 -1
  53. data/fastlane/swift/ScanfileProtocol.swift +17 -1
  54. data/fastlane/swift/Screengrabfile.swift +1 -1
  55. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -9
  56. data/fastlane/swift/Snapshotfile.swift +1 -1
  57. data/fastlane/swift/SnapshotfileProtocol.swift +9 -1
  58. data/fastlane_core/lib/fastlane_core/build_watcher.rb +6 -2
  59. data/fastlane_core/lib/fastlane_core/cert_checker.rb +28 -0
  60. data/fastlane_core/lib/fastlane_core/device_manager.rb +20 -0
  61. data/fastlane_core/lib/fastlane_core/helper.rb +7 -1
  62. data/fastlane_core/lib/fastlane_core/project.rb +23 -0
  63. data/frameit/lib/frameit/editor.rb +3 -0
  64. data/gym/lib/gym/code_signing_mapping.rb +32 -3
  65. data/gym/lib/gym/detect_values.rb +34 -2
  66. data/gym/lib/gym/generators/build_command_generator.rb +1 -0
  67. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  68. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +47 -17
  69. data/gym/lib/gym/module.rb +8 -0
  70. data/gym/lib/gym/options.rb +25 -1
  71. data/gym/lib/gym/runner.rb +63 -23
  72. data/match/lib/match/encryption/openssl.rb +1 -1
  73. data/match/lib/match/generator.rb +17 -3
  74. data/match/lib/match/module.rb +4 -1
  75. data/match/lib/match/nuke.rb +54 -16
  76. data/match/lib/match/options.rb +28 -15
  77. data/match/lib/match/runner.rb +21 -8
  78. data/match/lib/match/spaceship_ensure.rb +19 -9
  79. data/match/lib/match/storage/git_storage.rb +11 -3
  80. data/pilot/lib/pilot/build_manager.rb +46 -12
  81. data/pilot/lib/pilot/options.rb +3 -1
  82. data/scan/lib/scan/detect_values.rb +6 -1
  83. data/scan/lib/scan/manager.rb +18 -1
  84. data/scan/lib/scan/options.rb +23 -1
  85. data/scan/lib/scan/runner.rb +6 -0
  86. data/scan/lib/scan/slack_poster.rb +1 -1
  87. data/scan/lib/scan/test_command_generator.rb +1 -1
  88. data/screengrab/lib/screengrab/options.rb +1 -10
  89. data/screengrab/lib/screengrab/runner.rb +16 -19
  90. data/snapshot/lib/snapshot/options.rb +12 -1
  91. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  92. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +11 -0
  93. data/spaceship/lib/spaceship/client.rb +9 -4
  94. data/spaceship/lib/spaceship/connect_api.rb +2 -0
  95. data/spaceship/lib/spaceship/connect_api/models/app.rb +11 -0
  96. data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +75 -0
  97. data/spaceship/lib/spaceship/connect_api/models/beta_screenshot.rb +18 -0
  98. data/spaceship/lib/spaceship/connect_api/models/build.rb +5 -0
  99. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +5 -0
  100. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +15 -0
  101. data/spaceship/lib/spaceship/portal/app.rb +11 -2
  102. data/spaceship/lib/spaceship/tunes/iap.rb +11 -11
  103. data/spaceship/lib/spaceship/tunes/iap_detail.rb +7 -3
  104. data/spaceship/lib/spaceship/tunes/iap_families.rb +12 -1
  105. data/spaceship/lib/spaceship/tunes/iap_family_details.rb +26 -17
  106. data/spaceship/lib/spaceship/tunes/iap_status.rb +5 -1
  107. data/spaceship/lib/spaceship/tunes/tunes_client.rb +4 -7
  108. data/supply/lib/supply/client.rb +27 -0
  109. data/supply/lib/supply/options.rb +8 -2
  110. data/supply/lib/supply/uploader.rb +55 -26
  111. metadata +44 -25
  112. data/supply/lib/supply/.uploader.rb.swp +0 -0
@@ -132,7 +132,9 @@ module Pilot
132
132
  FastlaneCore::ConfigItem.new(key: :skip_waiting_for_build_processing,
133
133
  short_option: "-z",
134
134
  env_name: "PILOT_SKIP_WAITING_FOR_BUILD_PROCESSING",
135
- description: "Don't wait for the build to process. If set to true, the changelog won't be set, `distribute_external` option won't work and no build will be distributed to testers. (You might want to use this option if you are using this action on CI and have to pay for 'minutes used' on your CI plan)",
135
+ description: "If set to true, the `distribute_external` option won't work and no build will be distributed to testers. " \
136
+ "(You might want to use this option if you are using this action on CI and have to pay for 'minutes used' on your CI plan). " \
137
+ "If set to `true` and a changelog is provided, it will partially wait for the build to appear on AppStore Connect so the changelog can be set, and skip the remaining processing steps",
136
138
  is_string: false,
137
139
  default_value: false),
138
140
  FastlaneCore::ConfigItem.new(key: :update_build_info_on_upload,
@@ -108,7 +108,7 @@ module Scan
108
108
  def self.detect_simulator(devices, requested_os_type, deployment_target_key, default_device_name, simulator_type_descriptor)
109
109
  require 'set'
110
110
 
111
- deployment_target_version = Scan.project.build_settings(key: deployment_target_key) || '0'
111
+ deployment_target_version = get_deployment_target_version(deployment_target_key)
112
112
 
113
113
  simulators = filter_simulators(
114
114
  FastlaneCore::DeviceManager.simulators(requested_os_type).tap do |array|
@@ -215,5 +215,10 @@ module Scan
215
215
  Scan.config[:destination] = min_xcode8? ? ["platform=macOS"] : ["platform=OS X"]
216
216
  end
217
217
  end
218
+
219
+ # get deployment target version
220
+ def self.get_deployment_target_version(deployment_target_key)
221
+ Scan.config[:deployment_target_version] || Scan.project.build_settings(key: deployment_target_key) || '0'
222
+ end
218
223
  end
219
224
  end
@@ -4,8 +4,13 @@ require_relative 'runner'
4
4
 
5
5
  module Scan
6
6
  class Manager
7
+ attr_accessor :plist_files_before
8
+
7
9
  def work(options)
8
- Scan.config = options
10
+ Scan.config = options # we set this here to auto-detect missing values, which we need later on
11
+ unless options[:derived_data_path].to_s.empty?
12
+ self.plist_files_before = test_summary_filenames(Scan.config[:derived_data_path])
13
+ end
9
14
 
10
15
  # Also print out the path to the used Xcode installation
11
16
  # We go 2 folders up, to not show "Contents/Developer/"
@@ -17,5 +22,17 @@ module Scan
17
22
 
18
23
  return Runner.new.run
19
24
  end
25
+
26
+ def test_summary_filenames(derived_data_path)
27
+ files = []
28
+
29
+ # Xcode < 10
30
+ files += Dir["#{derived_data_path}/**/Logs/Test/*TestSummaries.plist"]
31
+
32
+ # Xcode 10
33
+ files += Dir["#{derived_data_path}/**/Logs/Test/*.xcresult/TestSummaries.plist"]
34
+
35
+ return files
36
+ end
20
37
  end
21
38
  end
@@ -81,6 +81,11 @@ module Scan
81
81
  description: "Enabling this option will automatically erase the simulator before running the application",
82
82
  default_value: false,
83
83
  type: Boolean),
84
+ FastlaneCore::ConfigItem.new(key: :disable_slide_to_type,
85
+ env_name: 'SCAN_DISABLE_SLIDE_TO_TYPE',
86
+ description: "Enabling this option will disable the simulator from showing the 'Slide to type' prompt",
87
+ default_value: true,
88
+ type: Boolean),
84
89
  FastlaneCore::ConfigItem.new(key: :prelaunch_simulator,
85
90
  env_name: 'SCAN_PRELAUNCH_SIMULATOR',
86
91
  description: "Enabling this option will launch the first simulator prior to calling any xcodebuild command",
@@ -311,6 +316,18 @@ module Scan
311
316
  UI.user_error!("File not found at path '#{File.expand_path(value)}'") unless File.exist?(value)
312
317
  end),
313
318
 
319
+ # build settings
320
+ FastlaneCore::ConfigItem.new(key: :app_name,
321
+ env_name: "SCAN_APP_NAME",
322
+ optional: true,
323
+ description: "App name to use in slack message and logfile name",
324
+ is_string: true),
325
+ FastlaneCore::ConfigItem.new(key: :deployment_target_version,
326
+ env_name: "SCAN_DEPLOYMENT_TARGET_VERSION",
327
+ optional: true,
328
+ description: "Target version of the app being build or tested. Used to filter out simulator version",
329
+ is_string: true),
330
+
314
331
  # slack
315
332
  FastlaneCore::ConfigItem.new(key: :slack_url,
316
333
  short_option: "-i",
@@ -381,7 +398,12 @@ module Scan
381
398
  description: "Allows for override of the default `xcodebuild` command",
382
399
  type: String,
383
400
  optional: true,
384
- default_value: "env NSUnbufferedIO=YES xcodebuild")
401
+ default_value: "env NSUnbufferedIO=YES xcodebuild"),
402
+ FastlaneCore::ConfigItem.new(key: :cloned_source_packages_path,
403
+ env_name: "SCAN_CLONED_SOURCE_PACKAGES_PATH",
404
+ description: "Sets a custom path for Swift Package Manager dependencies",
405
+ type: String,
406
+ optional: true)
385
407
 
386
408
  ]
387
409
  end
@@ -31,6 +31,12 @@ module Scan
31
31
  end
32
32
  end
33
33
 
34
+ if Scan.config[:disable_slide_to_type]
35
+ Scan.devices.each do |device|
36
+ FastlaneCore::Simulator.disable_slide_to_type(udid: device.udid)
37
+ end
38
+ end
39
+
34
40
  # We call this method, to be sure that all other simulators are killed
35
41
  # And a correct one is freshly launched. Switching between multiple simulator
36
42
  # in case the user specified multiple targets works with no issues
@@ -44,7 +44,7 @@ module Scan
44
44
  end
45
45
 
46
46
  Fastlane::Actions::SlackAction.run({
47
- message: "#{Scan.project.app_name} Tests:\n#{Scan.config[:slack_message]}",
47
+ message: "#{Scan.config[:app_name] || Scan.project.app_name} Tests:\n#{Scan.config[:slack_message]}",
48
48
  channel: channel,
49
49
  slack_url: Scan.config[:slack_url].to_s,
50
50
  success: results[:build_errors].to_i == 0 && results[:failures].to_i == 0,
@@ -120,7 +120,7 @@ module Scan
120
120
 
121
121
  # Store the raw file
122
122
  def xcodebuild_log_path
123
- file_name = "#{Scan.project.app_name}-#{Scan.config[:scheme]}.log"
123
+ file_name = "#{Scan.config[:app_name] || Scan.project.app_name}-#{Scan.config[:scheme]}.log"
124
124
  containing = File.expand_path(Scan.config[:buildlog_path])
125
125
  FileUtils.mkdir_p(containing)
126
126
 
@@ -141,16 +141,7 @@ module Screengrab
141
141
  FastlaneCore::ConfigItem.new(key: :adb_host,
142
142
  env_name: 'SCREENGRAB_ADB_HOST',
143
143
  description: "Configure the host used by adb to connect, allows running on remote devices farm",
144
- optional: true),
145
- FastlaneCore::ConfigItem.new(key: :clean_status_bar,
146
- env_name: 'SCREENGRAB_CLEAN_STATUS_BAR',
147
- description: "Enabling this option will clean the status bar",
148
- default_value: false,
149
- type: Boolean),
150
- FastlaneCore::ConfigItem.new(key: :clean_status_bar_config,
151
- description: "Specifies the configuration for the clean status bar",
152
- default_value: {},
153
- type: Hash)
144
+ optional: true)
154
145
  ]
155
146
  end
156
147
  end
@@ -1,5 +1,6 @@
1
1
  require 'fastlane_core/print_table'
2
2
  require 'fastlane_core/command_executor'
3
+ require 'fastlane/helper/adb_helper'
3
4
  require_relative 'reports_generator'
4
5
  require_relative 'module'
5
6
 
@@ -84,35 +85,26 @@ module Screengrab
84
85
  end
85
86
 
86
87
  def select_device
87
- devices = run_adb_command("devices -l", print_all: true, print_command: true).split("\n")
88
- # the first output by adb devices is "List of devices attached" so remove that and any adb startup output
89
- devices.reject! do |device|
90
- [
91
- 'server is out of date', # The adb server is out of date and must be restarted
92
- 'unauthorized', # The device has not yet accepted ADB control
93
- 'offline', # The device is offline, skip it
94
- '* daemon', # Messages printed when the daemon is starting up
95
- 'List of devices attached', # Header of table for data we want
96
- "doesn't match this client" # Message printed when there is an ADB client/server version mismatch
97
- ].any? { |status| device.include?(status) }
98
- end
88
+ adb = Fastlane::Helper::AdbHelper.new(adb_host: @config[:adb_host])
89
+ devices = adb.load_all_devices
99
90
 
100
91
  UI.user_error!('There are no connected and authorized devices or emulators') if devices.empty?
101
92
 
102
- devices.select! { |d| d.include?(@config[:specific_device]) } if @config[:specific_device]
93
+ specific_device = @config[:specific_device]
94
+ if specific_device
95
+ devices.select! do |d|
96
+ d.serial.include?(specific_device)
97
+ end
98
+ end
103
99
 
104
- UI.user_error!("No connected devices matched your criteria: #{@config[:specific_device]}") if devices.empty?
100
+ UI.user_error!("No connected devices matched your criteria: #{specific_device}") if devices.empty?
105
101
 
106
102
  if devices.length > 1
107
103
  UI.important("Multiple connected devices, selecting the first one")
108
104
  UI.important("To specify which connected device to use, use the -s (specific_device) config option")
109
105
  end
110
106
 
111
- # grab the serial number. the lines of output can look like these:
112
- # 00c22d4d84aec525 device usb:2148663295X product:bullhead model:Nexus_5X device:bullhead
113
- # 192.168.1.100:5555 device usb:2148663295X product:bullhead model:Nexus_5X device:genymotion
114
- # emulator-5554 device usb:2148663295X product:bullhead model:Nexus_5X device:emulator
115
- devices[0].match(/^\S+/)[0]
107
+ devices.first.serial
116
108
  end
117
109
 
118
110
  def select_app_apk(discovered_apk_paths)
@@ -395,6 +387,11 @@ module Screengrab
395
387
  def enable_clean_status_bar(device_serial, app_apk_path)
396
388
  return unless device_api_version(device_serial) >= 23
397
389
 
390
+ unless @android_env.aapt_path
391
+ UI.error("The `aapt` command could not be found, so status bar could not be cleaned. Make sure android_home is configured for screengrab or ANDROID_HOME is set in the environment")
392
+ return
393
+ end
394
+
398
395
  # Check if the app wants to use the clean status bar feature
399
396
  badging_dump = @executor.execute(command: "#{@android_env.aapt_path} dump badging #{app_apk_path}",
400
397
  print_all: true, print_command: true)
@@ -221,7 +221,18 @@ module Snapshot
221
221
  env_name: "SNAPSHOT_EXECUTE_CONCURRENT_SIMULATORS",
222
222
  description: "Take snapshots on multiple simulators concurrently. Note: This option is only applicable when running against Xcode 9",
223
223
  default_value: true,
224
- is_string: false)
224
+ is_string: false),
225
+ FastlaneCore::ConfigItem.new(key: :disable_slide_to_type,
226
+ env_name: "SNAPSHOT_DISABLE_SLIDE_TO_TYPE",
227
+ description: "Disable the simulator from showing the 'Slide to type' prompt",
228
+ default_value: false,
229
+ optional: true,
230
+ is_string: false),
231
+ FastlaneCore::ConfigItem.new(key: :cloned_source_packages_path,
232
+ env_name: "SNAPSHOT_CLONED_SOURCE_PACKAGES_PATH",
233
+ description: "Sets a custom path for Swift Package Manager dependencies",
234
+ type: String,
235
+ optional: true)
225
236
  ]
226
237
  end
227
238
  end
@@ -11,6 +11,7 @@ module Snapshot
11
11
  attr_accessor :dark_mode
12
12
  attr_accessor :reinstall_app
13
13
  attr_accessor :app_identifier
14
+ attr_accessor :disable_slide_to_type
14
15
 
15
16
  # xcode 8
16
17
  attr_accessor :number_of_retries
@@ -41,6 +42,7 @@ module Snapshot
41
42
  @output_simulator_logs = snapshot_config[:output_simulator_logs]
42
43
  @output_directory = snapshot_config[:output_directory]
43
44
  @concurrent_simulators = snapshot_config[:concurrent_simulators]
45
+ @disable_slide_to_type = snapshot_config[:disable_slide_to_type]
44
46
 
45
47
  launch_arguments = Array(snapshot_config[:launch_arguments])
46
48
  # if more than 1 set of arguments, use a tuple with an index
@@ -67,6 +67,9 @@ module Snapshot
67
67
  # no need to reinstall if device has been erased
68
68
  uninstall_app(type)
69
69
  end
70
+ if launcher_config.disable_slide_to_type
71
+ disable_slide_to_type(type)
72
+ end
70
73
  end
71
74
  end
72
75
 
@@ -139,6 +142,14 @@ module Snapshot
139
142
  end
140
143
  end
141
144
 
145
+ def disable_slide_to_type(device_type)
146
+ device_udid = TestCommandGenerator.device_udid(device_type)
147
+ if device_udid
148
+ UI.message("Disabling slide to type on #{device_type}")
149
+ FastlaneCore::Simulator.disable_slide_to_type(udid: device_udid)
150
+ end
151
+ end
152
+
142
153
  def copy_simulator_logs(device_names, language, locale, launch_arguments)
143
154
  return unless launcher_config.output_simulator_logs
144
155
 
@@ -563,10 +563,15 @@ module Spaceship
563
563
  #####################################################
564
564
 
565
565
  def load_session_from_file
566
- if File.exist?(persistent_cookie_path)
567
- puts("Loading session from '#{persistent_cookie_path}'") if Spaceship::Globals.verbose?
568
- @cookie.load(persistent_cookie_path)
569
- return true
566
+ begin
567
+ if File.exist?(persistent_cookie_path)
568
+ puts("Loading session from '#{persistent_cookie_path}'") if Spaceship::Globals.verbose?
569
+ @cookie.load(persistent_cookie_path)
570
+ return true
571
+ end
572
+ rescue => ex
573
+ puts(ex.to_s)
574
+ puts("Continuing with normal login.")
570
575
  end
571
576
  return false
572
577
  end
@@ -20,7 +20,9 @@ require 'spaceship/connect_api/models/beta_build_localization'
20
20
  require 'spaceship/connect_api/models/beta_build_metric'
21
21
  require 'spaceship/connect_api/models/beta_app_review_detail'
22
22
  require 'spaceship/connect_api/models/beta_app_review_submission'
23
+ require 'spaceship/connect_api/models/beta_feedback'
23
24
  require 'spaceship/connect_api/models/beta_group'
25
+ require 'spaceship/connect_api/models/beta_screenshot'
24
26
  require 'spaceship/connect_api/models/beta_tester'
25
27
  require 'spaceship/connect_api/models/beta_tester_metric'
26
28
  require 'spaceship/connect_api/models/build'
@@ -45,6 +45,17 @@ module Spaceship
45
45
  return Spaceship::ConnectAPI.get_app(app_id: app_id, includes: includes).first
46
46
  end
47
47
 
48
+ #
49
+ # Beta Feedback
50
+
51
+ def get_beta_feedback(filter: {}, includes: "tester,build,screenshots", limit: nil, sort: nil)
52
+ filter ||= {}
53
+ filter["build.app"] = id
54
+
55
+ resps = Spaceship::ConnectAPI.get_beta_feedback(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
56
+ return resps.flat_map(&:to_models)
57
+ end
58
+
48
59
  #
49
60
  # Beta Testers
50
61
  #
@@ -0,0 +1,75 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class BetaFeedback
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :timestamp
8
+ attr_accessor :comment
9
+ attr_accessor :email_address
10
+ attr_accessor :device_model
11
+ attr_accessor :os_version
12
+ attr_accessor :bookmarked
13
+ attr_accessor :locale
14
+ attr_accessor :carrier
15
+ attr_accessor :timezone
16
+ attr_accessor :architecture
17
+ attr_accessor :connection_status
18
+ attr_accessor :paired_apple_watch
19
+ attr_accessor :app_up_time_millis
20
+ attr_accessor :available_disk_bytes
21
+ attr_accessor :total_disk_bytes
22
+ attr_accessor :network_type
23
+ attr_accessor :battery_percentage
24
+ attr_accessor :screen_width
25
+ attr_accessor :screen_height
26
+
27
+ attr_accessor :build
28
+ attr_accessor :tester
29
+ attr_accessor :screenshots
30
+
31
+ attr_mapping({
32
+ "timestamp" => "timestamp",
33
+ "comment" => "comment",
34
+ "emailAddress" => "email_address",
35
+ "contactEmail" => "contact_email",
36
+ "deviceModel" => "device_model",
37
+ "osVersion" => "os_version",
38
+ "bookmarked" => "bookmarked",
39
+ "locale" => "locale",
40
+ "carrier" => "carrier",
41
+ "timezone" => "timezone",
42
+ "architecture" => "architecture",
43
+ "connectionStatus" => "connection_status",
44
+ "pairedAppleWatch" => "paired_apple_watch",
45
+ "appUpTimeMillis" => "app_up_time_millis",
46
+ "availableDiskBytes" => "available_disk_bytes",
47
+ "totalDiskBytes" => "total_disk_bytes",
48
+ "networkType" => "network_type",
49
+ "batteryPercentage" => "battery_percentage",
50
+ "screenWidth" => "screen_width",
51
+ "screenHeight" => "screen_height",
52
+
53
+ "build" => "build",
54
+ "tester" => "tester",
55
+ "screenshots" => "screenshots"
56
+ })
57
+
58
+ def self.type
59
+ return "betaFeedbacks"
60
+ end
61
+
62
+ #
63
+ # API
64
+ #
65
+
66
+ def self.all(filter: {}, includes: "tester,build,screenshots", limit: nil, sort: nil)
67
+ return Spaceship::ConnectAPI.get_beta_feedback(filter: filter, includes: includes, limit: limit, sort: sort)
68
+ end
69
+
70
+ def delete!
71
+ return Spaceship::ConnectAPI.delete_beta_feedback(feedback_id: self.id)
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,18 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class BetaScreenshot
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :image_assets
8
+
9
+ attr_mapping({
10
+ "imageAssets" => "image_assets"
11
+ })
12
+
13
+ def self.type
14
+ return "betaScreenshots"
15
+ end
16
+ end
17
+ end
18
+ end
@@ -78,6 +78,11 @@ module Spaceship
78
78
  return processing_state != ProcessingState::PROCESSING
79
79
  end
80
80
 
81
+ def ready_for_internal_testing?
82
+ raise "No build_beta_detail included" unless build_beta_detail
83
+ return build_beta_detail.ready_for_internal_testing?
84
+ end
85
+
81
86
  def ready_for_beta_submission?
82
87
  raise "No build_beta_detail included" unless build_beta_detail
83
88
  return build_beta_detail.ready_for_beta_submission?