fastlane 2.74.0.beta.20180106010004 → 2.74.0.beta.20180107010004
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +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,5 +1,7 @@
|
|
1
|
-
require 'fastlane_core'
|
2
|
-
require '
|
1
|
+
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'fastlane_core/device_manager'
|
3
|
+
require 'credentials_manager/appfile_config'
|
4
|
+
require_relative 'module'
|
3
5
|
|
4
6
|
module Snapshot
|
5
7
|
class Options
|
@@ -137,6 +139,13 @@ module Snapshot
|
|
137
139
|
description: "Should the project be cleaned before building it?",
|
138
140
|
is_string: false,
|
139
141
|
default_value: false),
|
142
|
+
FastlaneCore::ConfigItem.new(key: :test_without_building,
|
143
|
+
short_option: "-T",
|
144
|
+
env_name: "SNAPSHOT_TEST_WITHOUT_BUILDING",
|
145
|
+
description: "Test without building, requires a derived data path",
|
146
|
+
is_string: false,
|
147
|
+
type: Boolean,
|
148
|
+
optional: true),
|
140
149
|
FastlaneCore::ConfigItem.new(key: :configuration,
|
141
150
|
short_option: "-q",
|
142
151
|
env_name: "SNAPSHOT_CONFIGURATION",
|
@@ -2,6 +2,16 @@ require 'shellwords'
|
|
2
2
|
require 'plist'
|
3
3
|
require 'os'
|
4
4
|
require 'thread'
|
5
|
+
require 'terminal-table'
|
6
|
+
|
7
|
+
require 'fastlane_core/print_table'
|
8
|
+
require_relative 'module'
|
9
|
+
require_relative 'update'
|
10
|
+
require_relative 'test_command_generator'
|
11
|
+
require_relative 'reports_generator'
|
12
|
+
require_relative 'simulator_launchers/simulator_launcher'
|
13
|
+
require_relative 'simulator_launchers/simulator_launcher_xcode_8'
|
14
|
+
require_relative 'simulator_launchers/launcher_configuration'
|
5
15
|
|
6
16
|
module Snapshot
|
7
17
|
class Runner
|
@@ -1,8 +1,11 @@
|
|
1
|
-
|
1
|
+
require_relative 'module'
|
2
2
|
|
3
3
|
module Snapshot
|
4
4
|
# This class takes care of rotating images
|
5
5
|
class ScreenshotRotate
|
6
|
+
require 'shellwords'
|
7
|
+
require 'pty'
|
8
|
+
|
6
9
|
# @param (String) The path in which the screenshots are located in
|
7
10
|
def run(path)
|
8
11
|
UI.verbose "Rotating the screenshots (if necessary)"
|
@@ -1,6 +1,32 @@
|
|
1
|
-
require '
|
1
|
+
require 'fastlane_core/test_parser'
|
2
|
+
require_relative 'simulator_launcher_base'
|
2
3
|
|
3
4
|
module Snapshot
|
5
|
+
class CPUInspector
|
6
|
+
def self.hwprefs_available?
|
7
|
+
`which hwprefs` != ''
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.cpu_count
|
11
|
+
@cpu_count ||=
|
12
|
+
case RUBY_PLATFORM
|
13
|
+
when /darwin9/
|
14
|
+
`hwprefs cpu_count`.to_i
|
15
|
+
when /darwin10/
|
16
|
+
(hwprefs_available? ? `hwprefs thread_count` : `sysctl -n hw.physicalcpu_max`).to_i
|
17
|
+
when /linux/
|
18
|
+
UI.user_error!("We detected that you are running snapshot on Linux, but snapshot is only supported on macOS")
|
19
|
+
when /freebsd/
|
20
|
+
UI.user_error!("We detected that you are running snapshot on FreeBSD, but snapshot is only supported on macOS")
|
21
|
+
else
|
22
|
+
if RbConfig::CONFIG['host_os'] =~ /darwin/
|
23
|
+
(hwprefs_available? ? `hwprefs thread_count` : `sysctl -n hw.physicalcpu_max`).to_i
|
24
|
+
else
|
25
|
+
UI.crash!("Cannot find the machine's processor count.")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
4
30
|
class SimulatorLauncher < SimulatorLauncherBase
|
5
31
|
# With Xcode 9's ability to run tests on multiple concurrent simulators,
|
6
32
|
# this method sets the maximum number of simulators to run simultaneously
|
@@ -177,30 +203,4 @@ module Snapshot
|
|
177
203
|
return File.join(containing, file_name)
|
178
204
|
end
|
179
205
|
end
|
180
|
-
|
181
|
-
class CPUInspector
|
182
|
-
def self.hwprefs_available?
|
183
|
-
`which hwprefs` != ''
|
184
|
-
end
|
185
|
-
|
186
|
-
def self.cpu_count
|
187
|
-
@cpu_count ||=
|
188
|
-
case RUBY_PLATFORM
|
189
|
-
when /darwin9/
|
190
|
-
`hwprefs cpu_count`.to_i
|
191
|
-
when /darwin10/
|
192
|
-
(hwprefs_available? ? `hwprefs thread_count` : `sysctl -n hw.physicalcpu_max`).to_i
|
193
|
-
when /linux/
|
194
|
-
UI.user_error!("We detected that you are running snapshot on Linux, but snapshot is only supported on macOS")
|
195
|
-
when /freebsd/
|
196
|
-
UI.user_error!("We detected that you are running snapshot on FreeBSD, but snapshot is only supported on macOS")
|
197
|
-
else
|
198
|
-
if RbConfig::CONFIG['host_os'] =~ /darwin/
|
199
|
-
(hwprefs_available? ? `hwprefs thread_count` : `sysctl -n hw.physicalcpu_max`).to_i
|
200
|
-
else
|
201
|
-
UI.crash!("Cannot find the machine's processor count.")
|
202
|
-
end
|
203
|
-
end
|
204
|
-
end
|
205
|
-
end
|
206
206
|
end
|
@@ -1,3 +1,11 @@
|
|
1
|
+
require 'plist'
|
2
|
+
|
3
|
+
require_relative '../module'
|
4
|
+
require_relative '../test_command_generator'
|
5
|
+
require_relative '../collector'
|
6
|
+
require_relative '../fixes/hardware_keyboard_fix'
|
7
|
+
require_relative '../fixes/simulator_zoom_fix'
|
8
|
+
|
1
9
|
module Snapshot
|
2
10
|
class SimulatorLauncherBase
|
3
11
|
attr_accessor :collected_errors
|
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
require_relative 'simulator_launcher_base'
|
2
|
+
require_relative '../error_handler'
|
3
|
+
require_relative '../collector'
|
4
|
+
require_relative '../test_command_generator_xcode_8'
|
2
5
|
|
3
6
|
module Snapshot
|
4
7
|
class SimulatorLauncherXcode8 < SimulatorLauncherBase
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'fastlane_core/device_manager'
|
2
|
+
require_relative 'module'
|
3
|
+
|
1
4
|
module Snapshot
|
2
5
|
class TestCommandGeneratorBase
|
3
6
|
class << self
|
@@ -36,10 +39,13 @@ module Snapshot
|
|
36
39
|
|
37
40
|
def actions
|
38
41
|
actions = []
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
42
|
+
if Snapshot.config[:test_without_building]
|
43
|
+
actions << "test-without-building"
|
44
|
+
else
|
45
|
+
actions << :clean if Snapshot.config[:clean]
|
46
|
+
actions << :build # https://github.com/fastlane/snapshot/issues/246
|
47
|
+
actions << :test
|
48
|
+
end
|
43
49
|
return actions
|
44
50
|
end
|
45
51
|
|
data/spaceship/lib/spaceship.rb
CHANGED
@@ -1,42 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
# For basic user inputs
|
8
|
-
require 'highline/import'
|
1
|
+
require_relative 'spaceship/globals'
|
2
|
+
require_relative 'spaceship/base'
|
3
|
+
require_relative 'spaceship/client'
|
4
|
+
require_relative 'spaceship/provider'
|
5
|
+
require_relative 'spaceship/launcher'
|
9
6
|
|
10
7
|
# Dev Portal
|
11
|
-
|
12
|
-
|
8
|
+
require_relative 'spaceship/portal/portal'
|
9
|
+
require_relative 'spaceship/portal/spaceship'
|
13
10
|
|
14
11
|
# iTunes Connect
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
# To support legacy code
|
20
|
-
module Spaceship
|
21
|
-
ROOT = Pathname.new(File.expand_path('../..', __FILE__))
|
22
|
-
|
23
|
-
# Dev Portal
|
24
|
-
Certificate = Spaceship::Portal::Certificate
|
25
|
-
ProvisioningProfile = Spaceship::Portal::ProvisioningProfile
|
26
|
-
Device = Spaceship::Portal::Device
|
27
|
-
App = Spaceship::Portal::App
|
28
|
-
AppGroup = Spaceship::Portal::AppGroup
|
29
|
-
Passbook = Spaceship::Portal::Passbook
|
30
|
-
WebsitePush = Spaceship::Portal::WebsitePush
|
31
|
-
AppService = Spaceship::Portal::AppService
|
32
|
-
Merchant = Spaceship::Portal::Merchant
|
12
|
+
require_relative 'spaceship/tunes/tunes'
|
13
|
+
require_relative 'spaceship/tunes/spaceship'
|
14
|
+
require_relative 'spaceship/test_flight'
|
33
15
|
|
34
|
-
|
35
|
-
AppVersion = Spaceship::Tunes::AppVersion
|
36
|
-
AppSubmission = Spaceship::Tunes::AppSubmission
|
37
|
-
Application = Spaceship::Tunes::Application
|
38
|
-
Members = Spaceship::Tunes::Members
|
39
|
-
Persons = Spaceship::Portal::Persons
|
16
|
+
require_relative 'spaceship/module'
|
40
17
|
|
41
|
-
|
42
|
-
|
18
|
+
# Support for legacy wrappers
|
19
|
+
require_relative 'spaceship/portal/legacy_wrapper'
|
20
|
+
require_relative 'spaceship/tunes/legacy_wrapper'
|
@@ -1,16 +1,21 @@
|
|
1
1
|
require 'faraday' # HTTP Client
|
2
2
|
require 'faraday-cookie_jar'
|
3
3
|
require 'faraday_middleware'
|
4
|
-
require 'fastlane/version'
|
5
4
|
require 'logger'
|
6
|
-
require 'spaceship/babosa_fix'
|
7
|
-
require 'spaceship/helper/net_http_generic_request'
|
8
|
-
require 'spaceship/helper/plist_middleware'
|
9
|
-
require 'spaceship/helper/rels_middleware'
|
10
|
-
require 'spaceship/ui'
|
11
5
|
require 'tmpdir'
|
12
6
|
require 'cgi'
|
13
7
|
|
8
|
+
require 'fastlane/version'
|
9
|
+
require_relative 'babosa_fix'
|
10
|
+
require_relative 'helper/net_http_generic_request'
|
11
|
+
require_relative 'helper/plist_middleware'
|
12
|
+
require_relative 'helper/rels_middleware'
|
13
|
+
require_relative 'ui'
|
14
|
+
require_relative 'errors'
|
15
|
+
require_relative 'tunes/errors'
|
16
|
+
require_relative 'globals'
|
17
|
+
require_relative 'provider'
|
18
|
+
|
14
19
|
Faraday::Utils.default_params_encoder = Faraday::FlatParamsEncoder
|
15
20
|
|
16
21
|
module Spaceship
|
@@ -37,71 +42,16 @@ module Spaceship
|
|
37
42
|
|
38
43
|
attr_accessor :available_providers
|
39
44
|
|
40
|
-
#
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
# Invalid user credentials were provided
|
52
|
-
class InvalidUserCredentialsError < BasicPreferredInfoError; end
|
53
|
-
|
54
|
-
# Raised when no user credentials were passed at all
|
55
|
-
class NoUserCredentialsError < BasicPreferredInfoError; end
|
56
|
-
|
57
|
-
class ProgramLicenseAgreementUpdated < BasicPreferredInfoError
|
58
|
-
def show_github_issues
|
59
|
-
false
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
# User doesn't have enough permission for given action
|
64
|
-
class InsufficientPermissions < BasicPreferredInfoError
|
65
|
-
TITLE = 'Insufficient permissions for your Apple ID:'.freeze
|
66
|
-
|
67
|
-
def preferred_error_info
|
68
|
-
message ? [TITLE, message] : nil
|
69
|
-
end
|
70
|
-
|
71
|
-
# We don't want to show similar GitHub issues, as the error message
|
72
|
-
# should be pretty clear
|
73
|
-
def show_github_issues
|
74
|
-
false
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
class UnexpectedResponse < StandardError
|
79
|
-
attr_reader :error_info
|
80
|
-
|
81
|
-
def initialize(error_info = nil)
|
82
|
-
super(error_info)
|
83
|
-
@error_info = error_info
|
84
|
-
end
|
85
|
-
|
86
|
-
def preferred_error_info
|
87
|
-
return nil unless @error_info.kind_of?(Hash) && @error_info['resultString']
|
88
|
-
|
89
|
-
[
|
90
|
-
"Apple provided the following error info:",
|
91
|
-
@error_info['resultString'],
|
92
|
-
@error_info['userString']
|
93
|
-
].compact.uniq # sometimes 'resultString' and 'userString' are the same value
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
# Raised when 302 is received from portal request
|
98
|
-
class AppleTimeoutError < BasicPreferredInfoError; end
|
99
|
-
|
100
|
-
# Raised when 401 is received from portal request
|
101
|
-
class UnauthorizedAccessError < BasicPreferredInfoError; end
|
102
|
-
|
103
|
-
# Raised when 500 is received from iTunes Connect
|
104
|
-
class InternalServerError < BasicPreferredInfoError; end
|
45
|
+
# legacy support
|
46
|
+
BasicPreferredInfoError = Spaceship::BasicPreferredInfoError
|
47
|
+
InvalidUserCredentialsError = Spaceship::InvalidUserCredentialsError
|
48
|
+
NoUserCredentialsError = Spaceship::NoUserCredentialsError
|
49
|
+
ProgramLicenseAgreementUpdated = Spaceship::ProgramLicenseAgreementUpdated
|
50
|
+
InsufficientPermissions = Spaceship::InsufficientPermissions
|
51
|
+
UnexpectedResponse = Spaceship::UnexpectedResponse
|
52
|
+
AppleTimeoutError = Spaceship::AppleTimeoutError
|
53
|
+
UnauthorizedAccessError = Spaceship::UnauthorizedAccessError
|
54
|
+
InternalServerError = Spaceship::InternalServerError
|
105
55
|
|
106
56
|
# Authenticates with Apple's web services. This method has to be called once
|
107
57
|
# to generate a valid session. The session will automatically be used from then
|
@@ -219,7 +169,7 @@ module Spaceship
|
|
219
169
|
|
220
170
|
unless result
|
221
171
|
error_string = "Could not set team ID to '#{team_id}', only found the following available teams:\n\n#{available_teams.map { |team| "- #{team[:team_id]} (#{team[:team_name]})" }.join("\n")}\n"
|
222
|
-
raise
|
172
|
+
raise Tunes::Error.new, error_string
|
223
173
|
end
|
224
174
|
|
225
175
|
response = request(:post) do |req|
|
@@ -388,7 +338,7 @@ module Spaceship
|
|
388
338
|
# @return (Spaceship::Client) The client the login method was called for
|
389
339
|
def login(user = nil, password = nil)
|
390
340
|
if user.to_s.empty? or password.to_s.empty?
|
391
|
-
require 'credentials_manager'
|
341
|
+
require 'credentials_manager/account_manager'
|
392
342
|
|
393
343
|
keychain_entry = CredentialsManager::AccountManager.new(user: user, password: password)
|
394
344
|
user ||= keychain_entry.user
|
@@ -513,7 +463,7 @@ module Spaceship
|
|
513
463
|
raise "Looks like your Apple ID is not enabled for iTunes Connect, make sure to be able to login online"
|
514
464
|
else
|
515
465
|
info = [response.body, response['Set-Cookie']]
|
516
|
-
raise
|
466
|
+
raise Tunes::Error.new, info.join("\n")
|
517
467
|
end
|
518
468
|
end
|
519
469
|
end
|
@@ -576,7 +526,7 @@ module Spaceship
|
|
576
526
|
tries -= 1
|
577
527
|
unless tries.zero?
|
578
528
|
logger.warn("Timeout received: '#{ex.message}'. Retrying after 3 seconds (remaining: #{tries})...")
|
579
|
-
sleep 3 unless
|
529
|
+
sleep 3 unless Object.const_defined?("SpecHelper")
|
580
530
|
retry
|
581
531
|
end
|
582
532
|
raise ex # re-raise the exception
|
@@ -591,7 +541,7 @@ module Spaceship
|
|
591
541
|
end
|
592
542
|
|
593
543
|
do_login(self.user, @password)
|
594
|
-
sleep 3 unless
|
544
|
+
sleep 3 unless Object.const_defined?("SpecHelper")
|
595
545
|
retry
|
596
546
|
end
|
597
547
|
raise ex # re-raise the exception
|