fastlane 2.74.0.beta.20180106010004 → 2.74.0.beta.20180107010004
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cert/lib/cert.rb +3 -17
- data/cert/lib/cert/commands_generator.rb +5 -0
- data/cert/lib/cert/module.rb +14 -0
- data/cert/lib/cert/options.rb +4 -2
- data/cert/lib/cert/runner.rb +7 -0
- data/credentials_manager/lib/credentials_manager.rb +3 -9
- data/credentials_manager/lib/credentials_manager/account_manager.rb +2 -0
- data/credentials_manager/lib/credentials_manager/appfile_config.rb +2 -0
- data/credentials_manager/lib/credentials_manager/cli.rb +2 -0
- data/deliver/lib/deliver.rb +15 -31
- data/deliver/lib/deliver/app_screenshot.rb +2 -0
- data/deliver/lib/deliver/commands_generator.rb +6 -1
- data/deliver/lib/deliver/detect_values.rb +9 -1
- data/deliver/lib/deliver/download_screenshots.rb +2 -0
- data/deliver/lib/deliver/generate_summary.rb +4 -0
- data/deliver/lib/deliver/html_generator.rb +2 -0
- data/deliver/lib/deliver/loader.rb +4 -0
- data/deliver/lib/deliver/module.rb +16 -0
- data/deliver/lib/deliver/options.rb +5 -2
- data/deliver/lib/deliver/runner.rb +14 -1
- data/deliver/lib/deliver/setup.rb +6 -2
- data/deliver/lib/deliver/submit_for_review.rb +2 -0
- data/deliver/lib/deliver/upload_assets.rb +2 -0
- data/deliver/lib/deliver/upload_metadata.rb +4 -0
- data/deliver/lib/deliver/upload_price_tier.rb +2 -0
- data/deliver/lib/deliver/upload_screenshots.rb +6 -0
- data/fastlane/lib/fastlane/actions/slack.rb +16 -11
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +3 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/lib/fastlane_core.rb +42 -77
- data/fastlane_core/lib/fastlane_core/analytics/action_completion_context.rb +2 -0
- data/fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb +2 -1
- data/fastlane_core/lib/fastlane_core/analytics/analytics_ingester_client.rb +4 -0
- data/fastlane_core/lib/fastlane_core/analytics/analytics_session.rb +3 -1
- data/fastlane_core/lib/fastlane_core/analytics/app_identifier_guesser.rb +3 -3
- data/fastlane_core/lib/fastlane_core/android_package_name_guesser.rb +5 -0
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +4 -0
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +2 -0
- data/fastlane_core/lib/fastlane_core/command_executor.rb +4 -0
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +4 -2
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +6 -1
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +5 -3
- data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +3 -0
- data/fastlane_core/lib/fastlane_core/crash_reporter/crash_report_generator.rb +2 -0
- data/fastlane_core/lib/fastlane_core/crash_reporter/crash_reporter.rb +7 -1
- data/fastlane_core/lib/fastlane_core/device_manager.rb +6 -0
- data/fastlane_core/lib/fastlane_core/fastlane_folder.rb +2 -0
- data/fastlane_core/lib/fastlane_core/feature/feature.rb +2 -0
- data/fastlane_core/lib/fastlane_core/features.rb +2 -0
- data/fastlane_core/lib/fastlane_core/helper.rb +5 -1
- data/fastlane_core/lib/fastlane_core/ios_app_identifier_guesser.rb +5 -0
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +3 -1
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +4 -0
- data/fastlane_core/lib/fastlane_core/itunes_search_api.rb +2 -0
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +3 -0
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +2 -0
- data/fastlane_core/lib/fastlane_core/module.rb +31 -0
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +2 -0
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +4 -0
- data/fastlane_core/lib/fastlane_core/print_table.rb +3 -0
- data/fastlane_core/lib/fastlane_core/project.rb +3 -0
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +2 -0
- data/fastlane_core/lib/fastlane_core/swag.rb +3 -0
- data/fastlane_core/lib/fastlane_core/test_parser.rb +7 -0
- data/fastlane_core/lib/fastlane_core/tool_collector.rb +2 -0
- data/fastlane_core/lib/fastlane_core/ui/errors.rb +1 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_common_error.rb +2 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_crash.rb +2 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_error.rb +2 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_shell_error.rb +2 -0
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +10 -1
- data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +4 -1
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +6 -0
- data/fastlane_core/lib/fastlane_core/ui/interface.rb +3 -0
- data/fastlane_core/lib/fastlane_core/ui/ui.rb +5 -5
- data/fastlane_core/lib/fastlane_core/update_checker/changelog.rb +2 -2
- data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +5 -3
- data/frameit/lib/frameit.rb +0 -40
- data/frameit/lib/frameit/commands_generator.rb +7 -0
- data/frameit/lib/frameit/config_parser.rb +2 -0
- data/frameit/lib/frameit/dependency_checker.rb +2 -0
- data/frameit/lib/frameit/editor.rb +9 -0
- data/frameit/lib/frameit/frame_downloader.rb +5 -0
- data/frameit/lib/frameit/mac_editor.rb +3 -0
- data/frameit/lib/frameit/module.rb +40 -0
- data/frameit/lib/frameit/offsets.rb +3 -0
- data/frameit/lib/frameit/options.rb +4 -0
- data/frameit/lib/frameit/runner.rb +5 -1
- data/frameit/lib/frameit/screenshot.rb +9 -0
- data/frameit/lib/frameit/strings_parser.rb +2 -0
- data/frameit/lib/frameit/template_finder.rb +6 -0
- data/frameit/lib/frameit/trim_box.rb +2 -0
- data/gym/lib/gym.rb +9 -46
- data/gym/lib/gym/code_signing_mapping.rb +2 -0
- data/gym/lib/gym/commands_generator.rb +6 -3
- data/gym/lib/gym/detect_values.rb +4 -1
- data/gym/lib/gym/error_handler.rb +3 -0
- data/gym/lib/gym/generators/build_command_generator.rb +1 -0
- data/gym/lib/gym/generators/package_command_generator.rb +1 -1
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +5 -0
- data/gym/lib/gym/manager.rb +4 -0
- data/gym/lib/gym/module.rb +36 -0
- data/gym/lib/gym/options.rb +3 -2
- data/gym/lib/gym/runner.rb +8 -0
- data/gym/lib/gym/xcode.rb +2 -0
- data/gym/lib/gym/xcodebuild_fixes/generic_archive_fix.rb +3 -0
- data/match/lib/match.rb +12 -37
- data/match/lib/match/change_password.rb +4 -0
- data/match/lib/match/commands_generator.rb +9 -3
- data/match/lib/match/encrypt.rb +4 -0
- data/match/lib/match/generator.rb +7 -2
- data/match/lib/match/git_helper.rb +5 -0
- data/match/lib/match/module.rb +23 -0
- data/match/lib/match/nuke.rb +8 -0
- data/match/lib/match/options.rb +3 -2
- data/match/lib/match/runner.rb +11 -0
- data/match/lib/match/setup.rb +2 -0
- data/match/lib/match/spaceship_ensure.rb +5 -2
- data/match/lib/match/table_printer.rb +6 -0
- data/match/lib/match/utils.rb +3 -0
- data/pem/lib/pem.rb +3 -20
- data/pem/lib/pem/commands_generator.rb +4 -0
- data/pem/lib/pem/manager.rb +3 -0
- data/pem/lib/pem/module.rb +18 -0
- data/pem/lib/pem/options.rb +4 -2
- data/pilot/lib/pilot.rb +1 -14
- data/pilot/lib/pilot/build_manager.rb +6 -0
- data/pilot/lib/pilot/commands_generator.rb +8 -2
- data/pilot/lib/pilot/manager.rb +10 -3
- data/pilot/lib/pilot/module.rb +9 -0
- data/pilot/lib/pilot/options.rb +4 -2
- data/pilot/lib/pilot/tester_exporter.rb +6 -3
- data/pilot/lib/pilot/tester_importer.rb +3 -1
- data/pilot/lib/pilot/tester_manager.rb +6 -5
- data/precheck/lib/precheck.rb +2 -22
- data/precheck/lib/precheck/commands_generator.rb +8 -1
- data/precheck/lib/precheck/module.rb +21 -0
- data/precheck/lib/precheck/options.rb +4 -3
- data/precheck/lib/precheck/rule.rb +7 -4
- data/precheck/lib/precheck/rule_processor.rb +5 -2
- data/precheck/lib/precheck/rules/abstract_text_match_rule.rb +1 -1
- data/precheck/lib/precheck/rules/all.rb +1 -0
- data/precheck/lib/precheck/rules/copyright_date_rule.rb +1 -2
- data/precheck/lib/precheck/rules/curse_words_rule.rb +2 -1
- data/precheck/lib/precheck/rules/custom_text_rule.rb +1 -2
- data/precheck/lib/precheck/rules/free_stuff_iap_rule.rb +1 -2
- data/precheck/lib/precheck/rules/future_functionality_rule.rb +1 -2
- data/precheck/lib/precheck/rules/negative_apple_sentiment_rule.rb +1 -2
- data/precheck/lib/precheck/rules/other_platforms_rule.rb +1 -2
- data/precheck/lib/precheck/rules/placeholder_words_rule.rb +1 -2
- data/precheck/lib/precheck/rules/test_words_rule.rb +1 -2
- data/precheck/lib/precheck/rules/unreachable_urls_rule.rb +3 -1
- data/precheck/lib/precheck/runner.rb +6 -4
- data/produce/lib/produce.rb +6 -21
- data/produce/lib/produce/commands_generator.rb +5 -0
- data/produce/lib/produce/developer_center.rb +1 -0
- data/produce/lib/produce/group.rb +1 -0
- data/produce/lib/produce/itunes_connect.rb +5 -3
- data/produce/lib/produce/manager.rb +4 -0
- data/produce/lib/produce/merchant.rb +1 -0
- data/produce/lib/produce/module.rb +14 -0
- data/produce/lib/produce/options.rb +4 -2
- data/produce/lib/produce/service.rb +3 -0
- data/scan/lib/scan.rb +10 -40
- data/scan/lib/scan/commands_generator.rb +6 -2
- data/scan/lib/scan/detect_values.rb +4 -0
- data/scan/lib/scan/error_handler.rb +2 -0
- data/scan/lib/scan/manager.rb +4 -0
- data/scan/lib/scan/module.rb +32 -0
- data/scan/lib/scan/options.rb +3 -2
- data/scan/lib/scan/runner.rb +9 -0
- data/scan/lib/scan/slack_poster.rb +2 -0
- data/scan/lib/scan/test_command_generator.rb +2 -0
- data/scan/lib/scan/test_result_parser.rb +2 -0
- data/scan/lib/scan/xcpretty_reporter_options_generator.rb +2 -0
- data/screengrab/lib/screengrab.rb +7 -33
- data/screengrab/lib/screengrab/android_environment.rb +2 -0
- data/screengrab/lib/screengrab/commands_generator.rb +8 -0
- data/screengrab/lib/screengrab/dependency_checker.rb +2 -0
- data/screengrab/lib/screengrab/module.rb +24 -0
- data/screengrab/lib/screengrab/options.rb +3 -2
- data/screengrab/lib/screengrab/reports_generator.rb +3 -1
- data/screengrab/lib/screengrab/runner.rb +4 -0
- data/screengrab/lib/screengrab/setup.rb +2 -0
- data/sigh/lib/sigh.rb +4 -19
- data/sigh/lib/sigh/commands_generator.rb +5 -0
- data/sigh/lib/sigh/download_all.rb +5 -0
- data/sigh/lib/sigh/local_manage.rb +5 -0
- data/sigh/lib/sigh/manager.rb +3 -2
- data/sigh/lib/sigh/module.rb +16 -0
- data/sigh/lib/sigh/options.rb +3 -2
- data/sigh/lib/sigh/repair.rb +4 -0
- data/sigh/lib/sigh/resign.rb +3 -0
- data/sigh/lib/sigh/runner.rb +4 -0
- data/snapshot/lib/snapshot.rb +19 -61
- data/snapshot/lib/snapshot/collector.rb +5 -0
- data/snapshot/lib/snapshot/commands_generator.rb +4 -1
- data/snapshot/lib/snapshot/dependency_checker.rb +27 -23
- data/snapshot/lib/snapshot/detect_values.rb +7 -0
- data/snapshot/lib/snapshot/error_handler.rb +2 -0
- data/snapshot/lib/snapshot/fixes/hardware_keyboard_fix.rb +2 -0
- data/snapshot/lib/snapshot/fixes/simulator_zoom_fix.rb +2 -0
- data/snapshot/lib/snapshot/latest_os_version.rb +5 -2
- data/snapshot/lib/snapshot/module.rb +44 -0
- data/snapshot/lib/snapshot/options.rb +11 -2
- data/snapshot/lib/snapshot/reports_generator.rb +4 -2
- data/snapshot/lib/snapshot/reset_simulators.rb +3 -0
- data/snapshot/lib/snapshot/runner.rb +10 -0
- data/snapshot/lib/snapshot/screenshot_flatten.rb +2 -0
- data/snapshot/lib/snapshot/screenshot_rotate.rb +4 -1
- data/snapshot/lib/snapshot/setup.rb +2 -0
- data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +0 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +27 -27
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +8 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb +4 -1
- data/snapshot/lib/snapshot/test_command_generator.rb +2 -1
- data/snapshot/lib/snapshot/test_command_generator_base.rb +10 -4
- data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +3 -1
- data/snapshot/lib/snapshot/update.rb +3 -0
- data/spaceship/lib/spaceship.rb +14 -36
- data/spaceship/lib/spaceship/client.rb +26 -76
- data/spaceship/lib/spaceship/commands_generator.rb +4 -2
- data/spaceship/lib/spaceship/du/du_client.rb +3 -0
- data/spaceship/lib/spaceship/du/upload_file.rb +2 -0
- data/spaceship/lib/spaceship/errors.rb +67 -0
- data/spaceship/lib/spaceship/globals.rb +1 -1
- data/spaceship/lib/spaceship/helper/plist_middleware.rb +1 -1
- data/spaceship/lib/spaceship/helper/rels_middleware.rb +2 -0
- data/spaceship/lib/spaceship/launcher.rb +7 -5
- data/spaceship/lib/spaceship/module.rb +4 -0
- data/spaceship/lib/spaceship/playground.rb +3 -0
- data/spaceship/lib/spaceship/portal/app.rb +3 -0
- data/spaceship/lib/spaceship/portal/app_group.rb +2 -0
- data/spaceship/lib/spaceship/portal/app_service.rb +38 -290
- data/spaceship/lib/spaceship/portal/certificate.rb +3 -1
- data/spaceship/lib/spaceship/portal/device.rb +5 -3
- data/spaceship/lib/spaceship/portal/invite.rb +2 -0
- data/spaceship/lib/spaceship/portal/key.rb +2 -0
- data/spaceship/lib/spaceship/portal/legacy_wrapper.rb +21 -0
- data/spaceship/lib/spaceship/portal/merchant.rb +2 -0
- data/spaceship/lib/spaceship/portal/passbook.rb +2 -0
- data/spaceship/lib/spaceship/portal/person.rb +2 -0
- data/spaceship/lib/spaceship/portal/persons.rb +3 -0
- data/spaceship/lib/spaceship/portal/portal_base.rb +3 -0
- data/spaceship/lib/spaceship/portal/portal_client.rb +37 -23
- data/spaceship/lib/spaceship/portal/provisioning_profile.rb +27 -20
- data/spaceship/lib/spaceship/portal/provisioning_profile_template.rb +2 -0
- data/spaceship/lib/spaceship/portal/spaceship.rb +13 -10
- data/spaceship/lib/spaceship/portal/ui/select_team.rb +2 -0
- data/spaceship/lib/spaceship/portal/website_push.rb +2 -0
- data/spaceship/lib/spaceship/spaceauth_runner.rb +4 -2
- data/spaceship/lib/spaceship/test_flight.rb +0 -1
- data/spaceship/lib/spaceship/test_flight/app_test_info.rb +4 -0
- data/spaceship/lib/spaceship/test_flight/base.rb +22 -17
- data/spaceship/lib/spaceship/test_flight/beta_review_info.rb +2 -0
- data/spaceship/lib/spaceship/test_flight/build.rb +211 -203
- data/spaceship/lib/spaceship/test_flight/build_trains.rb +4 -1
- data/spaceship/lib/spaceship/test_flight/client.rb +255 -251
- data/spaceship/lib/spaceship/test_flight/export_compliance.rb +2 -0
- data/spaceship/lib/spaceship/test_flight/group.rb +2 -0
- data/spaceship/lib/spaceship/test_flight/test_info.rb +2 -0
- data/spaceship/lib/spaceship/test_flight/tester.rb +114 -110
- data/spaceship/lib/spaceship/tunes/app_details.rb +5 -1
- data/spaceship/lib/spaceship/tunes/app_image.rb +2 -0
- data/spaceship/lib/spaceship/tunes/app_ratings.rb +2 -68
- data/spaceship/lib/spaceship/tunes/app_review.rb +55 -0
- data/spaceship/lib/spaceship/tunes/app_screenshot.rb +2 -0
- data/spaceship/lib/spaceship/tunes/app_submission.rb +1 -0
- data/spaceship/lib/spaceship/tunes/app_trailer.rb +2 -0
- data/spaceship/lib/spaceship/tunes/app_version.rb +11 -0
- data/spaceship/lib/spaceship/tunes/app_version_generated_promocodes.rb +2 -0
- data/spaceship/lib/spaceship/tunes/app_version_history.rb +2 -0
- data/spaceship/lib/spaceship/tunes/app_version_promocodes.rb +2 -0
- data/spaceship/lib/spaceship/tunes/app_version_ref.rb +2 -0
- data/spaceship/lib/spaceship/tunes/app_version_states_history.rb +2 -0
- data/spaceship/lib/spaceship/tunes/application.rb +18 -6
- data/spaceship/lib/spaceship/tunes/availability.rb +2 -0
- data/spaceship/lib/spaceship/tunes/build.rb +2 -0
- data/spaceship/lib/spaceship/tunes/build_details.rb +2 -0
- data/spaceship/lib/spaceship/tunes/build_train.rb +5 -1
- data/spaceship/lib/spaceship/tunes/developer_response.rb +23 -0
- data/spaceship/lib/spaceship/tunes/errors.rb +17 -0
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +5 -0
- data/spaceship/lib/spaceship/tunes/iap_families.rb +1 -0
- data/spaceship/lib/spaceship/tunes/iap_family_details.rb +1 -0
- data/spaceship/lib/spaceship/tunes/iap_family_list.rb +1 -0
- data/spaceship/lib/spaceship/tunes/iap_list.rb +3 -0
- data/spaceship/lib/spaceship/tunes/iap_subscription_pricing_info.rb +46 -0
- data/spaceship/lib/spaceship/tunes/iap_subscription_pricing_tier.rb +2 -41
- data/spaceship/lib/spaceship/tunes/language_converter.rb +2 -0
- data/spaceship/lib/spaceship/tunes/legacy_wrapper.rb +13 -0
- data/spaceship/lib/spaceship/tunes/member.rb +3 -0
- data/spaceship/lib/spaceship/tunes/members.rb +2 -0
- data/spaceship/lib/spaceship/tunes/pricing_info.rb +42 -0
- data/spaceship/lib/spaceship/tunes/pricing_tier.rb +2 -37
- data/spaceship/lib/spaceship/tunes/recovery_device.rb +2 -0
- data/spaceship/lib/spaceship/tunes/sandbox_tester.rb +2 -0
- data/spaceship/lib/spaceship/tunes/spaceship.rb +2 -0
- data/spaceship/lib/spaceship/tunes/territory.rb +2 -0
- data/spaceship/lib/spaceship/tunes/transit_app_file.rb +2 -0
- data/spaceship/lib/spaceship/tunes/tunes.rb +34 -39
- data/spaceship/lib/spaceship/tunes/tunes_base.rb +2 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +20 -14
- data/spaceship/lib/spaceship/tunes/user_detail.rb +2 -0
- data/spaceship/lib/spaceship/tunes/version_set.rb +2 -0
- data/spaceship/lib/spaceship/two_step_client.rb +5 -1
- data/spaceship/lib/spaceship/ui.rb +7 -7
- data/supply/lib/supply/options.rb +2 -2
- metadata +31 -6
@@ -1,3 +1,6 @@
|
|
1
|
+
require_relative 'base'
|
2
|
+
require_relative 'build'
|
3
|
+
|
1
4
|
module Spaceship::TestFlight
|
2
5
|
class BuildTrains < Base
|
3
6
|
##
|
@@ -15,7 +18,7 @@ module Spaceship::TestFlight
|
|
15
18
|
|
16
19
|
data.each do |train_version|
|
17
20
|
builds_data = client.get_builds_for_train(app_id: app_id, platform: platform, train_version: train_version, retry_count: retry_count)
|
18
|
-
trains[train_version] = builds_data.map { |attrs| Build.new(attrs) }
|
21
|
+
trains[train_version] = builds_data.map { |attrs| Spaceship::TestFlight::Build.new(attrs) }
|
19
22
|
end
|
20
23
|
|
21
24
|
self.new(trains)
|
@@ -1,323 +1,327 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
require_relative '../client'
|
2
|
+
|
3
|
+
module Spaceship
|
4
|
+
module TestFlight
|
5
|
+
class Client < Spaceship::Client
|
6
|
+
##
|
7
|
+
# Spaceship HTTP client for the testflight API.
|
8
|
+
#
|
9
|
+
# This client is solely responsible for the making HTTP requests and
|
10
|
+
# parsing their responses. Parameters should be either named parameters, or
|
11
|
+
# for large request data bodies, pass in anything that can resond to
|
12
|
+
# `to_json`.
|
13
|
+
#
|
14
|
+
# Each request method should validate the required parameters. A required parameter is one that would result in 400-range response if it is not supplied.
|
15
|
+
# Each request method should make only one request. For more high-level logic, put code in the data models.
|
16
|
+
|
17
|
+
def self.hostname
|
18
|
+
'https://itunesconnect.apple.com/testflight/v2/'
|
19
|
+
end
|
17
20
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
+
##
|
22
|
+
# @!group Build trains API
|
23
|
+
##
|
21
24
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
+
# Returns an array of all available build trains (not the builds they include)
|
26
|
+
def get_build_trains(app_id: nil, platform: "ios")
|
27
|
+
assert_required_params(__method__, binding)
|
25
28
|
|
26
|
-
|
29
|
+
response = request(:get, "providers/#{team_id}/apps/#{app_id}/platforms/#{platform}/trains")
|
27
30
|
|
28
|
-
handle_response(response)
|
29
|
-
end
|
30
|
-
|
31
|
-
def get_builds_for_train(app_id: nil, platform: "ios", train_version: nil, retry_count: 3)
|
32
|
-
assert_required_params(__method__, binding)
|
33
|
-
with_retry(retry_count) do
|
34
|
-
response = request(:get, "providers/#{team_id}/apps/#{app_id}/platforms/#{platform}/trains/#{train_version}/builds", nil, {}, true)
|
35
31
|
handle_response(response)
|
36
32
|
end
|
37
|
-
end
|
38
33
|
|
39
|
-
|
40
|
-
|
41
|
-
|
34
|
+
def get_builds_for_train(app_id: nil, platform: "ios", train_version: nil, retry_count: 3)
|
35
|
+
assert_required_params(__method__, binding)
|
36
|
+
with_retry(retry_count) do
|
37
|
+
response = request(:get, "providers/#{team_id}/apps/#{app_id}/platforms/#{platform}/trains/#{train_version}/builds", nil, {}, true)
|
38
|
+
handle_response(response)
|
39
|
+
end
|
40
|
+
end
|
42
41
|
|
43
|
-
|
44
|
-
|
42
|
+
##
|
43
|
+
# @!group Builds API
|
44
|
+
##
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
end
|
46
|
+
def get_build(app_id: nil, build_id: nil)
|
47
|
+
assert_required_params(__method__, binding)
|
49
48
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
response = request(:put) do |req|
|
54
|
-
req.url "providers/#{team_id}/apps/#{app_id}/builds/#{build_id}"
|
55
|
-
req.body = build.to_json
|
56
|
-
req.headers['Content-Type'] = 'application/json'
|
49
|
+
response = request(:get, "providers/#{team_id}/apps/#{app_id}/builds/#{build_id}")
|
50
|
+
handle_response(response)
|
57
51
|
end
|
58
|
-
handle_response(response)
|
59
|
-
end
|
60
52
|
|
61
|
-
|
62
|
-
|
53
|
+
def put_build(app_id: nil, build_id: nil, build: nil)
|
54
|
+
assert_required_params(__method__, binding)
|
63
55
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
56
|
+
response = request(:put) do |req|
|
57
|
+
req.url "providers/#{team_id}/apps/#{app_id}/builds/#{build_id}"
|
58
|
+
req.body = build.to_json
|
59
|
+
req.headers['Content-Type'] = 'application/json'
|
60
|
+
end
|
61
|
+
handle_response(response)
|
68
62
|
end
|
69
|
-
handle_response(response)
|
70
|
-
end
|
71
63
|
|
72
|
-
|
73
|
-
|
64
|
+
def post_for_testflight_review(app_id: nil, build_id: nil, build: nil)
|
65
|
+
assert_required_params(__method__, binding)
|
74
66
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
67
|
+
response = request(:post) do |req|
|
68
|
+
req.url "providers/#{team_id}/apps/#{app_id}/builds/#{build_id}/review"
|
69
|
+
req.body = build.to_json
|
70
|
+
req.headers['Content-Type'] = 'application/json'
|
71
|
+
end
|
72
|
+
handle_response(response)
|
79
73
|
end
|
80
|
-
handle_response(response)
|
81
|
-
end
|
82
74
|
|
83
|
-
|
84
|
-
|
85
|
-
|
75
|
+
def expire_build(app_id: nil, build_id: nil, build: nil)
|
76
|
+
assert_required_params(__method__, binding)
|
77
|
+
|
78
|
+
response = request(:post) do |req|
|
79
|
+
req.url "providers/#{team_id}/apps/#{app_id}/builds/#{build_id}/expire"
|
80
|
+
req.body = build.to_json
|
81
|
+
req.headers['Content-Type'] = 'application/json'
|
82
|
+
end
|
83
|
+
handle_response(response)
|
84
|
+
end
|
86
85
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
# "70402368-9deb-409f-9a26-bb3f215dfee3" => "Automatic"}
|
91
|
-
def get_groups(app_id: nil)
|
92
|
-
return @cached_groups if @cached_groups
|
93
|
-
assert_required_params(__method__, binding)
|
86
|
+
##
|
87
|
+
# @!group Groups API
|
88
|
+
##
|
94
89
|
|
95
|
-
|
96
|
-
|
97
|
-
|
90
|
+
# Returns a list of available testing groups
|
91
|
+
# e.g.
|
92
|
+
# {"b6f65dbd-c845-4d91-bc39-0b661d608970" => "Boarding",
|
93
|
+
# "70402368-9deb-409f-9a26-bb3f215dfee3" => "Automatic"}
|
94
|
+
def get_groups(app_id: nil)
|
95
|
+
return @cached_groups if @cached_groups
|
96
|
+
assert_required_params(__method__, binding)
|
98
97
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
body = {
|
103
|
-
'groupId' => group_id,
|
104
|
-
'buildId' => build_id
|
105
|
-
}
|
106
|
-
response = request(:put) do |req|
|
107
|
-
req.url "providers/#{team_id}/apps/#{app_id}/groups/#{group_id}/builds/#{build_id}"
|
108
|
-
req.body = body.to_json
|
109
|
-
req.headers['Content-Type'] = 'application/json'
|
98
|
+
response = request(:get, "/testflight/v2/providers/#{provider_id}/apps/#{app_id}/groups")
|
99
|
+
@cached_groups = handle_response(response)
|
110
100
|
end
|
111
|
-
handle_response(response)
|
112
|
-
end
|
113
101
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
102
|
+
def create_group_for_app(app_id: nil, group_name: nil)
|
103
|
+
assert_required_params(__method__, binding)
|
104
|
+
body = {
|
105
|
+
'name' => group_name
|
106
|
+
}
|
119
107
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
108
|
+
response = request(:post) do |req|
|
109
|
+
req.url "providers/#{team_id}/apps/#{app_id}/groups"
|
110
|
+
req.body = body.to_json
|
111
|
+
req.headers['Content-Type'] = 'application/json'
|
112
|
+
end
|
113
|
+
handle_response(response)
|
124
114
|
end
|
125
|
-
handle_response(response)
|
126
|
-
end
|
127
115
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
group_ids = get_groups(app_id: app_id).map do |group|
|
140
|
-
group['id']
|
116
|
+
def add_group_to_build(app_id: nil, group_id: nil, build_id: nil)
|
117
|
+
assert_required_params(__method__, binding)
|
118
|
+
|
119
|
+
body = {
|
120
|
+
'groupId' => group_id,
|
121
|
+
'buildId' => build_id
|
122
|
+
}
|
123
|
+
response = request(:put) do |req|
|
124
|
+
req.url "providers/#{team_id}/apps/#{app_id}/groups/#{group_id}/builds/#{build_id}"
|
125
|
+
req.body = body.to_json
|
126
|
+
req.headers['Content-Type'] = 'application/json'
|
141
127
|
end
|
128
|
+
handle_response(response)
|
142
129
|
end
|
143
|
-
group_ids ||= [group_id]
|
144
|
-
testers = []
|
145
130
|
|
146
|
-
|
147
|
-
|
131
|
+
#####################################################
|
132
|
+
# @!group Testers
|
133
|
+
#####################################################
|
134
|
+
def testers(tester)
|
135
|
+
url = tester.url[:index]
|
148
136
|
r = request(:get, url)
|
149
|
-
|
137
|
+
parse_response(r, 'data')['users']
|
150
138
|
end
|
151
139
|
|
152
|
-
|
153
|
-
|
140
|
+
def testers_by_app(tester, app_id, group_id: nil)
|
141
|
+
if group_id.nil?
|
142
|
+
group_ids = get_groups(app_id: app_id).map do |group|
|
143
|
+
group['id']
|
144
|
+
end
|
145
|
+
end
|
146
|
+
group_ids ||= [group_id]
|
147
|
+
testers = []
|
154
148
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
resulting_array = []
|
163
|
-
initial_url = "providers/#{team_id}/apps/#{app_id}/testers?limit=#{page_size}&sort=email&order=asc"
|
164
|
-
response = request(:get, initial_url)
|
165
|
-
link_from_response = proc do |r|
|
166
|
-
# I weep for Swift nil chaining
|
167
|
-
(l = r.headers['link']) && (m = l.match(/<(.*)>/)) && m.captures.first
|
149
|
+
group_ids.each do |json_group_id|
|
150
|
+
url = tester.url(app_id, provider_id, json_group_id)[:index_by_app]
|
151
|
+
r = request(:get, url)
|
152
|
+
testers += parse_response(r, 'data')['users']
|
153
|
+
end
|
154
|
+
|
155
|
+
testers
|
168
156
|
end
|
169
|
-
next_link = link_from_response.call(response)
|
170
|
-
result = Array(handle_response(response))
|
171
|
-
resulting_array += result
|
172
|
-
return resulting_array if result.count == 0
|
173
157
|
|
174
|
-
|
175
|
-
|
176
|
-
|
158
|
+
##
|
159
|
+
# @!group Testers API
|
160
|
+
##
|
161
|
+
|
162
|
+
def testers_for_app(app_id: nil)
|
163
|
+
assert_required_params(__method__, binding)
|
164
|
+
page_size = 40 # that's enforced by the iTC servers
|
165
|
+
resulting_array = []
|
166
|
+
initial_url = "providers/#{team_id}/apps/#{app_id}/testers?limit=#{page_size}&sort=email&order=asc"
|
167
|
+
response = request(:get, initial_url)
|
168
|
+
link_from_response = proc do |r|
|
169
|
+
# I weep for Swift nil chaining
|
170
|
+
(l = r.headers['link']) && (m = l.match(/<(.*)>/)) && m.captures.first
|
171
|
+
end
|
177
172
|
next_link = link_from_response.call(response)
|
178
|
-
|
179
|
-
break if result.count == 0
|
180
|
-
|
173
|
+
result = Array(handle_response(response))
|
181
174
|
resulting_array += result
|
182
|
-
|
183
|
-
return resulting_array.uniq
|
184
|
-
end
|
175
|
+
return resulting_array if result.count == 0
|
185
176
|
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
handle_response(response)
|
191
|
-
end
|
177
|
+
until next_link.nil?
|
178
|
+
response = request(:get, next_link)
|
179
|
+
result = Array(handle_response(response))
|
180
|
+
next_link = link_from_response.call(response)
|
192
181
|
|
193
|
-
|
194
|
-
assert_required_params(__method__, binding)
|
195
|
-
text = CGI.escape(text)
|
196
|
-
url = "providers/#{team_id}/apps/#{app_id}/testers?order=asc&search=#{text}&sort=status"
|
197
|
-
response = request(:get, url)
|
198
|
-
handle_response(response)
|
199
|
-
end
|
182
|
+
break if result.count == 0
|
200
183
|
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
handle_response(response)
|
206
|
-
end
|
184
|
+
resulting_array += result
|
185
|
+
end
|
186
|
+
return resulting_array.uniq
|
187
|
+
end
|
207
188
|
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
req.body = {
|
214
|
-
"email" => email,
|
215
|
-
"firstName" => first_name,
|
216
|
-
"lastName" => last_name
|
217
|
-
}.to_json
|
218
|
-
req.headers['Content-Type'] = 'application/json'
|
189
|
+
def delete_tester_from_app(app_id: nil, tester_id: nil)
|
190
|
+
assert_required_params(__method__, binding)
|
191
|
+
url = "providers/#{team_id}/apps/#{app_id}/testers/#{tester_id}"
|
192
|
+
response = request(:delete, url)
|
193
|
+
handle_response(response)
|
219
194
|
end
|
220
|
-
handle_response(response)
|
221
|
-
end
|
222
195
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
response = request(:post) do |req|
|
230
|
-
req.url url
|
231
|
-
req.body = [{
|
232
|
-
"email" => email,
|
233
|
-
"firstName" => first_name,
|
234
|
-
"lastName" => last_name
|
235
|
-
}].to_json
|
236
|
-
req.headers['Content-Type'] = 'application/json'
|
196
|
+
def search_for_tester_in_app(app_id: nil, text: nil)
|
197
|
+
assert_required_params(__method__, binding)
|
198
|
+
text = CGI.escape(text)
|
199
|
+
url = "providers/#{team_id}/apps/#{app_id}/testers?order=asc&search=#{text}&sort=status"
|
200
|
+
response = request(:get, url)
|
201
|
+
handle_response(response)
|
237
202
|
end
|
238
|
-
handle_response(response)
|
239
|
-
end
|
240
203
|
|
241
|
-
|
242
|
-
|
204
|
+
def resend_invite_to_external_tester(app_id: nil, tester_id: nil)
|
205
|
+
assert_required_params(__method__, binding)
|
206
|
+
url = "/testflight/v1/invites/#{app_id}/resend?testerId=#{tester_id}"
|
207
|
+
response = request(:post, url)
|
208
|
+
handle_response(response)
|
209
|
+
end
|
243
210
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
211
|
+
def create_app_level_tester(app_id: nil, first_name: nil, last_name: nil, email: nil)
|
212
|
+
assert_required_params(__method__, binding)
|
213
|
+
url = "providers/#{team_id}/apps/#{app_id}/testers"
|
214
|
+
response = request(:post) do |req|
|
215
|
+
req.url url
|
216
|
+
req.body = {
|
217
|
+
"email" => email,
|
218
|
+
"firstName" => first_name,
|
219
|
+
"lastName" => last_name
|
220
|
+
}.to_json
|
221
|
+
req.headers['Content-Type'] = 'application/json'
|
222
|
+
end
|
223
|
+
handle_response(response)
|
224
|
+
end
|
225
|
+
|
226
|
+
def post_tester_to_group(app_id: nil, email: nil, first_name: nil, last_name: nil, group_id: nil)
|
227
|
+
assert_required_params(__method__, binding)
|
228
|
+
|
229
|
+
# Then we can add the tester to the group that allows the app to test
|
230
|
+
# This is easy enough, we already have all this data. We don't need any response from the previous request
|
231
|
+
url = "providers/#{team_id}/apps/#{app_id}/groups/#{group_id}/testers"
|
232
|
+
response = request(:post) do |req|
|
233
|
+
req.url url
|
234
|
+
req.body = [{
|
235
|
+
"email" => email,
|
236
|
+
"firstName" => first_name,
|
237
|
+
"lastName" => last_name
|
238
|
+
}].to_json
|
239
|
+
req.headers['Content-Type'] = 'application/json'
|
240
|
+
end
|
241
|
+
handle_response(response)
|
248
242
|
end
|
249
|
-
handle_response(response)
|
250
|
-
end
|
251
243
|
|
252
|
-
|
253
|
-
|
254
|
-
##
|
244
|
+
def delete_tester_from_group(group_id: nil, tester_id: nil, app_id: nil)
|
245
|
+
assert_required_params(__method__, binding)
|
255
246
|
|
256
|
-
|
257
|
-
|
247
|
+
url = "providers/#{team_id}/apps/#{app_id}/groups/#{group_id}/testers/#{tester_id}"
|
248
|
+
response = request(:delete) do |req|
|
249
|
+
req.url url
|
250
|
+
req.headers['Content-Type'] = 'application/json'
|
251
|
+
end
|
252
|
+
handle_response(response)
|
253
|
+
end
|
258
254
|
|
259
|
-
|
260
|
-
|
261
|
-
|
255
|
+
##
|
256
|
+
# @!group AppTestInfo
|
257
|
+
##
|
262
258
|
|
263
|
-
|
264
|
-
|
259
|
+
def get_app_test_info(app_id: nil)
|
260
|
+
assert_required_params(__method__, binding)
|
265
261
|
|
266
|
-
|
267
|
-
|
268
|
-
req.body = app_test_info.to_json
|
269
|
-
req.headers['Content-Type'] = 'application/json'
|
262
|
+
response = request(:get, "providers/#{team_id}/apps/#{app_id}/testInfo")
|
263
|
+
handle_response(response)
|
270
264
|
end
|
271
|
-
handle_response(response)
|
272
|
-
end
|
273
265
|
|
274
|
-
|
266
|
+
def put_app_test_info(app_id: nil, app_test_info: nil)
|
267
|
+
assert_required_params(__method__, binding)
|
275
268
|
|
276
|
-
|
277
|
-
|
278
|
-
|
269
|
+
response = request(:put) do |req|
|
270
|
+
req.url "providers/#{team_id}/apps/#{app_id}/testInfo"
|
271
|
+
req.body = app_test_info.to_json
|
272
|
+
req.headers['Content-Type'] = 'application/json'
|
273
|
+
end
|
274
|
+
handle_response(response)
|
279
275
|
end
|
280
276
|
|
281
|
-
|
277
|
+
protected
|
282
278
|
|
283
|
-
|
284
|
-
|
285
|
-
|
279
|
+
def handle_response(response)
|
280
|
+
if (200...300).cover?(response.status) && (response.body.nil? || response.body.empty?)
|
281
|
+
return
|
282
|
+
end
|
286
283
|
|
287
|
-
|
284
|
+
raise InternalServerError, "Server error got #{response.status}" if (500...600).cover?(response.status)
|
288
285
|
|
289
|
-
|
286
|
+
unless response.body.kind_of?(Hash)
|
287
|
+
raise UnexpectedResponse, response.body
|
288
|
+
end
|
290
289
|
|
291
|
-
|
290
|
+
raise UnexpectedResponse, response.body['error'] if response.body['error']
|
292
291
|
|
293
|
-
|
294
|
-
end
|
292
|
+
raise UnexpectedResponse, "Temporary iTunes Connect error: #{response.body}" if response.body['statusCode'] == 'ERROR'
|
295
293
|
|
296
|
-
|
294
|
+
return response.body['data'] if response.body['data']
|
295
|
+
|
296
|
+
return response.body
|
297
|
+
end
|
297
298
|
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
299
|
+
private
|
300
|
+
|
301
|
+
# used to assert all of the named parameters are supplied values
|
302
|
+
#
|
303
|
+
# @raises NameError if the values are nil
|
304
|
+
def assert_required_params(method_name, binding)
|
305
|
+
parameter_names = method(method_name).parameters.map { |k, v| v }
|
306
|
+
parameter_names.each do |name|
|
307
|
+
if local_variable_get(binding, name).nil?
|
308
|
+
raise NameError, "`#{name}' is a required parameter"
|
309
|
+
end
|
306
310
|
end
|
307
311
|
end
|
308
|
-
end
|
309
312
|
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
313
|
+
def local_variable_get(binding, name)
|
314
|
+
if binding.respond_to?(:local_variable_get)
|
315
|
+
binding.local_variable_get(name)
|
316
|
+
else
|
317
|
+
binding.eval(name.to_s)
|
318
|
+
end
|
315
319
|
end
|
316
|
-
end
|
317
320
|
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
+
def provider_id
|
322
|
+
return team_id if self.provider.nil?
|
323
|
+
self.provider.provider_id
|
324
|
+
end
|
321
325
|
end
|
322
326
|
end
|
323
327
|
end
|