spaceship/lib/spaceship/connect_api/models/build.rb in fastlane-2.132.0.beta.20190929200020 vs spaceship/lib/spaceship/connect_api/models/build.rb in fastlane-2.132.0.beta.20190930200026

- old
+ new

@@ -107,11 +107,11 @@ filter: { app: app_id, "preReleaseVersion.version" => version, version: build_number, processingState: processing_states }, includes: includes, sort: sort, limit: limit ).all_pages - models = resps.map(&:to_models).flatten + models = resps.flat_map(&:to_models) # Filtering after models are fetched since there is no way to do this in a query param filter if platform models = models.select do |build| build.pre_release_version && build.pre_release_version.platform == platform @@ -136,20 +136,20 @@ filter: { build: id }, includes: includes, sort: sort, limit: limit ).all_pages - return resps.map(&:to_models).flatten + return resps.flat_map(&:to_models) end def get_build_beta_details(filter: {}, includes: nil, limit: nil, sort: nil) resps = Spaceship::ConnectAPI.get_build_beta_details( filter: { build: id }, includes: includes, sort: sort, limit: limit ).all_pages - return resps.map(&:to_models).flatten + return resps.flat_map(&:to_models) end def post_beta_app_review_submission return Spaceship::ConnectAPI.post_beta_app_review_submissions(build_id: id) end