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,5 +1,7 @@
|
|
1
1
|
require 'openssl'
|
2
2
|
|
3
|
+
require_relative 'app'
|
4
|
+
|
3
5
|
module Spaceship
|
4
6
|
module Portal
|
5
7
|
# Represents a certificate from the Apple Developer Portal.
|
@@ -287,7 +289,7 @@ module Spaceship
|
|
287
289
|
|
288
290
|
# look up the app_id by the bundle_id
|
289
291
|
if bundle_id
|
290
|
-
app = Spaceship::App.set_client(client).find(bundle_id)
|
292
|
+
app = Spaceship::Portal::App.set_client(client).find(bundle_id)
|
291
293
|
raise "Could not find app with bundle id '#{bundle_id}'" unless app
|
292
294
|
app_id = app.app_id
|
293
295
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative 'portal_base'
|
2
|
+
|
1
3
|
module Spaceship
|
2
4
|
module Portal
|
3
5
|
# Represents a device from the Apple Developer Portal
|
@@ -97,11 +99,11 @@ module Spaceship
|
|
97
99
|
# @return (Array) Returns all devices matching the provided profile_type
|
98
100
|
def all_for_profile_type(profile_type)
|
99
101
|
if profile_type.include? "tvOS"
|
100
|
-
Spaceship::Device.all_apple_tvs
|
102
|
+
Spaceship::Portal::Device.all_apple_tvs
|
101
103
|
elsif profile_type.include? "Mac"
|
102
|
-
Spaceship::Device.all_macs
|
104
|
+
Spaceship::Portal::Device.all_macs
|
103
105
|
else
|
104
|
-
Spaceship::Device.all_ios_profile_devices
|
106
|
+
Spaceship::Portal::Device.all_ios_profile_devices
|
105
107
|
end
|
106
108
|
end
|
107
109
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative 'certificate'
|
2
|
+
require_relative 'provisioning_profile'
|
3
|
+
require_relative 'device'
|
4
|
+
require_relative 'app'
|
5
|
+
require_relative 'app_group'
|
6
|
+
require_relative 'passbook'
|
7
|
+
require_relative 'website_push'
|
8
|
+
require_relative 'app_service'
|
9
|
+
require_relative 'merchant'
|
10
|
+
|
11
|
+
module Spaceship
|
12
|
+
Certificate = Spaceship::Portal::Certificate
|
13
|
+
ProvisioningProfile = Spaceship::Portal::ProvisioningProfile
|
14
|
+
Device = Spaceship::Portal::Device
|
15
|
+
App = Spaceship::Portal::App
|
16
|
+
AppGroup = Spaceship::Portal::AppGroup
|
17
|
+
Passbook = Spaceship::Portal::Passbook
|
18
|
+
WebsitePush = Spaceship::Portal::WebsitePush
|
19
|
+
AppService = Spaceship::Portal::AppService
|
20
|
+
Merchant = Spaceship::Portal::Merchant
|
21
|
+
end
|
@@ -1,3 +1,15 @@
|
|
1
|
+
require_relative '../client'
|
2
|
+
|
3
|
+
require_relative 'app'
|
4
|
+
require_relative 'app_group'
|
5
|
+
require_relative 'device'
|
6
|
+
require_relative 'merchant'
|
7
|
+
require_relative 'passbook'
|
8
|
+
require_relative 'provisioning_profile'
|
9
|
+
require_relative 'certificate'
|
10
|
+
require_relative 'website_push'
|
11
|
+
require_relative 'persons'
|
12
|
+
|
1
13
|
module Spaceship
|
2
14
|
# rubocop:disable Metrics/ClassLength
|
3
15
|
class PortalClient < Spaceship::Client
|
@@ -5,6 +17,8 @@ module Spaceship
|
|
5
17
|
# @!group Init and Login
|
6
18
|
#####################################################
|
7
19
|
|
20
|
+
PROTOCOL_VERSION = Spaceship::Client::PROTOCOL_VERSION
|
21
|
+
|
8
22
|
def self.hostname
|
9
23
|
"https://developer.apple.com/services-account/#{PROTOCOL_VERSION}/"
|
10
24
|
end
|
@@ -107,7 +121,7 @@ module Spaceship
|
|
107
121
|
end
|
108
122
|
|
109
123
|
def update_service_for_app(app, service)
|
110
|
-
ensure_csrf(Spaceship::App)
|
124
|
+
ensure_csrf(Spaceship::Portal::App)
|
111
125
|
|
112
126
|
request(:post, service.service_uri, {
|
113
127
|
teamId: team_id,
|
@@ -120,7 +134,7 @@ module Spaceship
|
|
120
134
|
end
|
121
135
|
|
122
136
|
def associate_groups_with_app(app, groups)
|
123
|
-
ensure_csrf(Spaceship::AppGroup)
|
137
|
+
ensure_csrf(Spaceship::Portal::AppGroup)
|
124
138
|
|
125
139
|
request(:post, 'account/ios/identifiers/assignApplicationGroupToAppId.action', {
|
126
140
|
teamId: team_id,
|
@@ -133,7 +147,7 @@ module Spaceship
|
|
133
147
|
end
|
134
148
|
|
135
149
|
def associate_merchants_with_app(app, merchants, mac)
|
136
|
-
ensure_csrf(Spaceship::Merchant)
|
150
|
+
ensure_csrf(Spaceship::Portal::Merchant)
|
137
151
|
|
138
152
|
request(:post, "account/#{platform_slug(mac)}/identifiers/assignOMCToAppId.action", {
|
139
153
|
teamId: team_id,
|
@@ -160,7 +174,7 @@ module Spaceship
|
|
160
174
|
# We moved the ensure_csrf to the top of this method
|
161
175
|
# as we got some users with issues around creating new apps
|
162
176
|
# https://github.com/fastlane/fastlane/issues/5813
|
163
|
-
ensure_csrf(Spaceship::App)
|
177
|
+
ensure_csrf(Spaceship::Portal::App)
|
164
178
|
|
165
179
|
ident_params = case type.to_sym
|
166
180
|
when :explicit
|
@@ -191,7 +205,7 @@ module Spaceship
|
|
191
205
|
end
|
192
206
|
|
193
207
|
def delete_app!(app_id, mac: false)
|
194
|
-
ensure_csrf(Spaceship::App)
|
208
|
+
ensure_csrf(Spaceship::Portal::App)
|
195
209
|
|
196
210
|
r = request(:post, "account/#{platform_slug(mac)}/identifiers/deleteAppId.action", {
|
197
211
|
teamId: team_id,
|
@@ -201,7 +215,7 @@ module Spaceship
|
|
201
215
|
end
|
202
216
|
|
203
217
|
def update_app_name!(app_id, name, mac: false)
|
204
|
-
ensure_csrf(Spaceship::App)
|
218
|
+
ensure_csrf(Spaceship::Portal::App)
|
205
219
|
|
206
220
|
r = request(:post, "account/#{platform_slug(mac)}/identifiers/updateAppIdName.action", {
|
207
221
|
teamId: team_id,
|
@@ -228,7 +242,7 @@ module Spaceship
|
|
228
242
|
end
|
229
243
|
|
230
244
|
def create_passbook!(name, bundle_id)
|
231
|
-
ensure_csrf(Spaceship::Passbook)
|
245
|
+
ensure_csrf(Spaceship::Portal::Passbook)
|
232
246
|
|
233
247
|
r = request(:post, "account/ios/identifiers/addPassTypeId.action", {
|
234
248
|
name: name,
|
@@ -239,7 +253,7 @@ module Spaceship
|
|
239
253
|
end
|
240
254
|
|
241
255
|
def delete_passbook!(passbook_id)
|
242
|
-
ensure_csrf(Spaceship::Passbook)
|
256
|
+
ensure_csrf(Spaceship::Portal::Passbook)
|
243
257
|
|
244
258
|
r = request(:post, "account/ios/identifiers/deletePassTypeId.action", {
|
245
259
|
teamId: team_id,
|
@@ -265,7 +279,7 @@ module Spaceship
|
|
265
279
|
end
|
266
280
|
|
267
281
|
def create_website_push!(name, bundle_id, mac: false)
|
268
|
-
ensure_csrf(Spaceship::WebsitePush)
|
282
|
+
ensure_csrf(Spaceship::Portal::WebsitePush)
|
269
283
|
|
270
284
|
r = request(:post, "account/#{platform_slug(mac)}/identifiers/addWebsitePushId.action", {
|
271
285
|
name: name,
|
@@ -276,7 +290,7 @@ module Spaceship
|
|
276
290
|
end
|
277
291
|
|
278
292
|
def delete_website_push!(website_id, mac: false)
|
279
|
-
ensure_csrf(Spaceship::WebsitePush)
|
293
|
+
ensure_csrf(Spaceship::Portal::WebsitePush)
|
280
294
|
|
281
295
|
r = request(:post, "account/#{platform_slug(mac)}/identifiers/deleteWebsitePushId.action", {
|
282
296
|
teamId: team_id,
|
@@ -302,7 +316,7 @@ module Spaceship
|
|
302
316
|
end
|
303
317
|
|
304
318
|
def create_merchant!(name, bundle_id, mac: false)
|
305
|
-
ensure_csrf(Spaceship::Merchant)
|
319
|
+
ensure_csrf(Spaceship::Portal::Merchant)
|
306
320
|
|
307
321
|
r = request(:post, "account/#{platform_slug(mac)}/identifiers/addOMC.action", {
|
308
322
|
name: name,
|
@@ -313,7 +327,7 @@ module Spaceship
|
|
313
327
|
end
|
314
328
|
|
315
329
|
def delete_merchant!(merchant_id, mac: false)
|
316
|
-
ensure_csrf(Spaceship::Merchant)
|
330
|
+
ensure_csrf(Spaceship::Portal::Merchant)
|
317
331
|
|
318
332
|
r = request(:post, "account/#{platform_slug(mac)}/identifiers/deleteOMC.action", {
|
319
333
|
teamId: team_id,
|
@@ -339,7 +353,7 @@ module Spaceship
|
|
339
353
|
end
|
340
354
|
|
341
355
|
def create_app_group!(name, group_id)
|
342
|
-
ensure_csrf(Spaceship::AppGroup)
|
356
|
+
ensure_csrf(Spaceship::Portal::AppGroup)
|
343
357
|
|
344
358
|
r = request(:post, 'account/ios/identifiers/addApplicationGroup.action', {
|
345
359
|
name: valid_name_for(name),
|
@@ -350,7 +364,7 @@ module Spaceship
|
|
350
364
|
end
|
351
365
|
|
352
366
|
def delete_app_group!(app_group_id)
|
353
|
-
ensure_csrf(Spaceship::AppGroup)
|
367
|
+
ensure_csrf(Spaceship::Portal::AppGroup)
|
354
368
|
|
355
369
|
r = request(:post, 'account/ios/identifiers/deleteApplicationGroup.action', {
|
356
370
|
teamId: team_id,
|
@@ -441,7 +455,7 @@ module Spaceship
|
|
441
455
|
})
|
442
456
|
result = parse_response(r, 'devices')
|
443
457
|
|
444
|
-
csrf_cache[Spaceship::Device] = self.csrf_tokens
|
458
|
+
csrf_cache[Spaceship::Portal::Device] = self.csrf_tokens
|
445
459
|
|
446
460
|
result
|
447
461
|
end
|
@@ -462,7 +476,7 @@ module Spaceship
|
|
462
476
|
end
|
463
477
|
|
464
478
|
def create_device!(device_name, device_id, mac: false)
|
465
|
-
ensure_csrf(Spaceship::Device)
|
479
|
+
ensure_csrf(Spaceship::Portal::Device)
|
466
480
|
|
467
481
|
req = request(:post, "account/#{platform_slug(mac)}/device/addDevices.action", {
|
468
482
|
teamId: team_id,
|
@@ -509,7 +523,7 @@ module Spaceship
|
|
509
523
|
end
|
510
524
|
|
511
525
|
def create_certificate!(type, csr, app_id = nil, mac = false)
|
512
|
-
ensure_csrf(Spaceship::Certificate)
|
526
|
+
ensure_csrf(Spaceship::Portal::Certificate)
|
513
527
|
|
514
528
|
r = request(:post, "account/#{platform_slug(mac)}/certificate/submitCertificateRequest.action", {
|
515
529
|
teamId: team_id,
|
@@ -537,7 +551,7 @@ module Spaceship
|
|
537
551
|
end
|
538
552
|
|
539
553
|
def revoke_certificate!(certificate_id, type, mac: false)
|
540
|
-
ensure_csrf(Spaceship::Certificate)
|
554
|
+
ensure_csrf(Spaceship::Portal::Certificate)
|
541
555
|
|
542
556
|
r = request(:post, "account/#{platform_slug(mac)}/certificate/revokeCertificate.action", {
|
543
557
|
teamId: team_id,
|
@@ -564,7 +578,7 @@ module Spaceship
|
|
564
578
|
|
565
579
|
result = parse_response(req, 'provisioningProfiles')
|
566
580
|
|
567
|
-
csrf_cache[Spaceship::ProvisioningProfile] = self.csrf_tokens
|
581
|
+
csrf_cache[Spaceship::Portal::ProvisioningProfile] = self.csrf_tokens
|
568
582
|
|
569
583
|
result
|
570
584
|
end
|
@@ -587,7 +601,7 @@ module Spaceship
|
|
587
601
|
|
588
602
|
result = parse_response(req, 'provisioningProfiles')
|
589
603
|
|
590
|
-
csrf_cache[Spaceship::ProvisioningProfile] = self.csrf_tokens
|
604
|
+
csrf_cache[Spaceship::Portal::ProvisioningProfile] = self.csrf_tokens
|
591
605
|
|
592
606
|
result
|
593
607
|
end
|
@@ -601,7 +615,7 @@ module Spaceship
|
|
601
615
|
end
|
602
616
|
|
603
617
|
def create_provisioning_profile!(name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil, template_name: nil)
|
604
|
-
ensure_csrf(Spaceship::ProvisioningProfile) do
|
618
|
+
ensure_csrf(Spaceship::Portal::ProvisioningProfile) do
|
605
619
|
fetch_csrf_token_for_provisioning
|
606
620
|
end
|
607
621
|
|
@@ -623,7 +637,7 @@ module Spaceship
|
|
623
637
|
end
|
624
638
|
|
625
639
|
def download_provisioning_profile(profile_id, mac: false)
|
626
|
-
ensure_csrf(Spaceship::ProvisioningProfile) do
|
640
|
+
ensure_csrf(Spaceship::Portal::ProvisioningProfile) do
|
627
641
|
fetch_csrf_token_for_provisioning
|
628
642
|
end
|
629
643
|
|
@@ -640,7 +654,7 @@ module Spaceship
|
|
640
654
|
end
|
641
655
|
|
642
656
|
def delete_provisioning_profile!(profile_id, mac: false)
|
643
|
-
ensure_csrf(Spaceship::ProvisioningProfile) do
|
657
|
+
ensure_csrf(Spaceship::Portal::ProvisioningProfile) do
|
644
658
|
fetch_csrf_token_for_provisioning
|
645
659
|
end
|
646
660
|
|
@@ -1,3 +1,8 @@
|
|
1
|
+
require_relative 'app'
|
2
|
+
require_relative 'device'
|
3
|
+
require_relative 'certificate'
|
4
|
+
require_relative 'provisioning_profile_template'
|
5
|
+
|
1
6
|
module Spaceship
|
2
7
|
module Portal
|
3
8
|
# Represents a provisioning profile of the Apple Dev Portal
|
@@ -81,7 +86,7 @@ module Spaceship
|
|
81
86
|
# @return (App) The app this profile is for
|
82
87
|
#
|
83
88
|
# @example Example Value
|
84
|
-
# <Spaceship::App
|
89
|
+
# <Spaceship::Portal::App
|
85
90
|
# @app_id="2UMR2S6PAA"
|
86
91
|
# @name="App Name"
|
87
92
|
# @platform="ios"
|
@@ -98,7 +103,7 @@ module Spaceship
|
|
98
103
|
# @return (Array) A list of certificates used for this profile
|
99
104
|
# @example Example Value
|
100
105
|
# [
|
101
|
-
# <Spaceship::Certificate::Production
|
106
|
+
# <Spaceship::Portal::Certificate::Production
|
102
107
|
# @status=nil
|
103
108
|
# @id="XC5PH8D4AA"
|
104
109
|
# @name="iOS Distribution"
|
@@ -118,7 +123,7 @@ module Spaceship
|
|
118
123
|
# This will always be [] for AppStore profiles
|
119
124
|
#
|
120
125
|
# @example Example Value
|
121
|
-
# <Spaceship::Device
|
126
|
+
# <Spaceship::Portal::Device
|
122
127
|
# @id="WXQ7V239BE"
|
123
128
|
# @name="Grahams iPhone 4s"
|
124
129
|
# @udid="ba0ac7d70f7a14c6fa02ef0e02f4fe9c5178e2f7"
|
@@ -188,6 +193,7 @@ module Spaceship
|
|
188
193
|
# Create a new object based on a hash.
|
189
194
|
# This is used to create a new object based on the server response.
|
190
195
|
def factory(attrs)
|
196
|
+
# rubocop:disable Lint/MissingRequireStatement
|
191
197
|
# available values of `distributionMethod` at this point: ['adhoc', 'store', 'limited', 'direct']
|
192
198
|
klass = case attrs['distributionMethod']
|
193
199
|
when 'limited'
|
@@ -201,6 +207,7 @@ module Spaceship
|
|
201
207
|
else
|
202
208
|
raise "Can't find class '#{attrs['distributionMethod']}'"
|
203
209
|
end
|
210
|
+
# rubocop:enable Lint/MissingRequireStatement
|
204
211
|
|
205
212
|
# Parse the dates
|
206
213
|
# rubocop:disable Style/RescueModifier
|
@@ -252,9 +259,9 @@ module Spaceship
|
|
252
259
|
# @return (ProvisioningProfile): The profile that was just created
|
253
260
|
def create!(name: nil, bundle_id: nil, certificate: nil, devices: [], mac: false, sub_platform: nil, template_name: nil)
|
254
261
|
raise "Missing required parameter 'bundle_id'" if bundle_id.to_s.empty?
|
255
|
-
raise "Missing required parameter 'certificate'. e.g. use `Spaceship::Certificate::Production.all.first`" if certificate.to_s.empty?
|
262
|
+
raise "Missing required parameter 'certificate'. e.g. use `Spaceship::Portal::Certificate::Production.all.first`" if certificate.to_s.empty?
|
256
263
|
|
257
|
-
app = Spaceship::App.find(bundle_id, mac: mac)
|
264
|
+
app = Spaceship::Portal::App.find(bundle_id, mac: mac)
|
258
265
|
raise "Could not find app with bundle id '#{bundle_id}'" unless app
|
259
266
|
|
260
267
|
raise "Invalid sub_platform #{sub_platform}, valid values are tvOS" if !sub_platform.nil? and sub_platform != 'tvOS'
|
@@ -262,7 +269,7 @@ module Spaceship
|
|
262
269
|
# Fill in sensible default values
|
263
270
|
name ||= [bundle_id, self.pretty_type].join(' ')
|
264
271
|
|
265
|
-
if self == AppStore || self == InHouse || self == Direct
|
272
|
+
if self == AppStore || self == InHouse || self == Direct # rubocop:disable Lint/MissingRequireStatement
|
266
273
|
# Distribution Profiles MUST NOT have devices
|
267
274
|
devices = []
|
268
275
|
end
|
@@ -274,14 +281,14 @@ module Spaceship
|
|
274
281
|
certificate_parameter = certificate_parameter.first if certificate_parameter.count == 1
|
275
282
|
|
276
283
|
if devices.nil? or devices.count == 0
|
277
|
-
if self == Development or self == AdHoc
|
284
|
+
if self == Development or self == AdHoc # rubocop:disable Lint/MissingRequireStatement
|
278
285
|
# For Development and AdHoc we usually want all compatible devices by default
|
279
286
|
if mac
|
280
|
-
devices = Spaceship::Device.all_macs
|
287
|
+
devices = Spaceship::Portal::Device.all_macs
|
281
288
|
elsif sub_platform == 'tvOS'
|
282
|
-
devices = Spaceship::Device.all_apple_tvs
|
289
|
+
devices = Spaceship::Portal::Device.all_apple_tvs
|
283
290
|
else
|
284
|
-
devices = Spaceship::Device.all_ios_profile_devices
|
291
|
+
devices = Spaceship::Portal::Device.all_ios_profile_devices
|
285
292
|
end
|
286
293
|
end
|
287
294
|
end
|
@@ -326,8 +333,8 @@ module Spaceship
|
|
326
333
|
# a details request (see `profile_details`). This is an expensive operation
|
327
334
|
# which we can't do for every single provisioning profile
|
328
335
|
# Instead we'll treat App Store profiles the same way as Ad Hoc profiles
|
329
|
-
# Spaceship::ProvisioningProfile::AdHoc.all will return the same array as
|
330
|
-
# Spaceship::ProvisioningProfile::AppStore.all, containing only AppStore
|
336
|
+
# Spaceship::Portal::ProvisioningProfile::AdHoc.all will return the same array as
|
337
|
+
# Spaceship::Portal::ProvisioningProfile::AppStore.all, containing only AppStore
|
331
338
|
# profiles. To determine if it's an Ad Hoc profile, you can use the
|
332
339
|
# is_adhoc? method on the profile.
|
333
340
|
klass = self
|
@@ -438,19 +445,19 @@ module Spaceship
|
|
438
445
|
unless certificate_valid?
|
439
446
|
if mac?
|
440
447
|
if self.kind_of? Development
|
441
|
-
self.certificates = [Spaceship::Certificate::MacDevelopment.all.first]
|
448
|
+
self.certificates = [Spaceship::Portal::Certificate::MacDevelopment.all.first]
|
442
449
|
elsif self.kind_of? Direct
|
443
|
-
self.certificates = [Spaceship::Certificate::DeveloperIDApplication.all.first]
|
450
|
+
self.certificates = [Spaceship::Portal::Certificate::DeveloperIDApplication.all.first]
|
444
451
|
else
|
445
|
-
self.certificates = [Spaceship::Certificate::MacAppDistribution.all.first]
|
452
|
+
self.certificates = [Spaceship::Portal::Certificate::MacAppDistribution.all.first]
|
446
453
|
end
|
447
454
|
else
|
448
455
|
if self.kind_of? Development
|
449
|
-
self.certificates = [Spaceship::Certificate::Development.all.first]
|
456
|
+
self.certificates = [Spaceship::Portal::Certificate::Development.all.first]
|
450
457
|
elsif self.kind_of? InHouse
|
451
|
-
self.certificates = [Spaceship::Certificate::InHouse.all.first]
|
458
|
+
self.certificates = [Spaceship::Portal::Certificate::InHouse.all.first]
|
452
459
|
else
|
453
|
-
self.certificates = [Spaceship::Certificate::Production.all.first]
|
460
|
+
self.certificates = [Spaceship::Portal::Certificate::Production.all.first]
|
454
461
|
end
|
455
462
|
end
|
456
463
|
end
|
@@ -470,7 +477,7 @@ module Spaceship
|
|
470
477
|
end
|
471
478
|
|
472
479
|
# We need to fetch the provisioning profile again, as the ID changes
|
473
|
-
profile = Spaceship::ProvisioningProfile.all(mac: mac?).find do |p|
|
480
|
+
profile = Spaceship::Portal::ProvisioningProfile.all(mac: mac?).find do |p|
|
474
481
|
p.name == self.name # we can use the name as it's valid
|
475
482
|
end
|
476
483
|
|
@@ -482,7 +489,7 @@ module Spaceship
|
|
482
489
|
def certificate_valid?
|
483
490
|
return false if (certificates || []).count == 0
|
484
491
|
certificates.each do |c|
|
485
|
-
if Spaceship::Certificate.all(mac: mac?).collect(&:id).include?(c.id)
|
492
|
+
if Spaceship::Portal::Certificate.all(mac: mac?).collect(&:id).include?(c.id)
|
486
493
|
return true
|
487
494
|
end
|
488
495
|
end
|