b0VIM 8.1_LZjoshJoshs-Mac-mini.local~josh/Projects/fastlane/fastlane/spaceship/lib/spaceship/connect_api/models/build.rbutf-8 3210#"! UtpsAtads_^Al<;" z y d D  n = j 8  v \ @ (   d 9 / .  ukjW wvPy=32VyQGF F( limit: limit sort: sort, includes: includes, filter: { app: app_id, "preReleaseVersion.version" => version, version: build_number, processingState: processing_states }, resps = client.get_builds( client ||= Spaceship::ConnectAPI def self.all(client: nil, app_id: nil, version: nil, build_number: nil, platform: nil, processing_states: "PROCESSING,FAILED,INVALID,VALID", includes: ESSENTIAL_INCLUDES, sort: "-uploadedDate", limit: 30) # # API # end return Spaceship::TestFlight::Build.new(h) } 'trainVersion' => app_version 'bundleId' => bundle_id, 'appAdamId' => app_id, 'externalState' => processed? ? Spaceship::TestFlight::Build::BUILD_STATES[:active] : Spaceship::TestFlight::Build::BUILD_STATES[:processing], 'uploadDate' => uploaded_date, 'buildVersion' => version, 'id' => id, h = { def to_testflight_build # This is here temporarily until the removal of Spaceship::TestFlight end return build_beta_detail.ready_for_beta_submission? raise "No build_beta_detail included" unless build_beta_detail def ready_for_beta_submission? end return build_beta_detail.nil? == false && build_beta_detail.ready_for_internal_testing? def ready_for_internal_testing? end return processing_state != ProcessingState::PROCESSING def processed? end return pre_release_version.platform raise "No pre_release_version included" unless pre_release_version def platform end return app.bundle_id raise "No app included" unless app def bundle_id end return app.id raise "No app included" unless app def app_id end return pre_release_version.version raise "No pre_release_version included" unless pre_release_version def app_version # # Helpers # end return "builds" def self.type end VALID = "VALID" INVALID = "INVALID" FAILED = "FAILED" PROCESSING = "PROCESSING" module ProcessingState ESSENTIAL_INCLUDES = "app,buildBetaDetail,preReleaseVersion" }) "preReleaseVersion" => "pre_release_version" "buildBetaDetail" => "build_beta_detail", "betaBuildMetrics" => "beta_build_metrics", "betaAppReviewSubmission" => "beta_app_review_submission", "app" => "app", "usesNonExemptEncryption" => "uses_non_exempt_encryption", "processingState" => "processing_state", "iconAssetToken" => "icon_asset_token", "minOsVersion" => "min_os_version", "expired" => "expired", "expirationDate" => "expiration_date", "uploadedDate" => "uploaded_date", "version" => "version", attr_mapping({ attr_accessor :pre_release_version attr_accessor :build_beta_detail attr_accessor :beta_build_metrics attr_accessor :beta_app_review_submission attr_accessor :app attr_accessor :uses_non_exempt_encryption attr_accessor :processing_state attr_accessor :icon_asset_token attr_accessor :min_os_version attr_accessor :expired attr_accessor :expiration_date attr_accessor :uploaded_date attr_accessor :version include Spaceship::ConnectAPI::Model class Build class ConnectAPImodule Spaceshiprequire 'spaceship/test_flight/build'require_relative '../model'adMmAXD7 ] ' k P ! S * u J @ ? f H 2   q,"!wqm_eeeeeeeeeeeeeend end end end return client.patch_builds(build_id: id, attributes: { expired: true }) client ||= Spaceship::ConnectAPI def expire!(client: nil) end return client.post_beta_app_review_submissions(build_id: id) client ||= Spaceship::ConnectAPI def post_beta_app_review_submission(client: nil) end return resps.flat_map(&:to_models) ).all_pages limit: limit sort: sort, includes: includes, filter: { build: id }, resps = client.get_build_beta_details( client ||= Spaceship::ConnectAPI def get_build_beta_details(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) end return resps.flat_map(&:to_models) ).all_pages limit: limit sort: sort, includes: includes, filter: { build: id }, resps = client.get_beta_build_localizations( client ||= Spaceship::ConnectAPI def get_beta_build_localizations(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) end return client.add_beta_groups_to_build(build_id: id, beta_group_ids: beta_group_ids) beta_group_ids = beta_groups.map(&:id) beta_groups ||= [] client ||= Spaceship::ConnectAPI def add_beta_groups(client: nil, beta_groups: nil) end return client.patch_builds(build_id: id, attributes: attributes).first attributes = reverse_attr_mapping(attributes) client ||= Spaceship::ConnectAPI def update(client: nil, attributes: nil) end return client.get_build(build_id: build_id, includes: includes).first client ||= Spaceship::ConnectAPI def self.get(client: nil, build_id: nil, includes: ESSENTIAL_INCLUDES) end return models end end build.pre_release_version && build.pre_release_version.platform == platform models = models.select do |build| if platform # Filtering after models are fetched since there is no way to do this in a query param filter models = resps.flat_map(&:to_models) ).all_pages