Sha256: d809e6d8cd5327012f44a34a1d7ff6845651afa9b3bc3832f4aeefc75f102273

Contents?: true

Size: 1.04 KB

Versions: 26

Compression:

Stored size: 1.04 KB

Contents

module Spaceship::TestFlight
  class BuildTrains < Base
    ##
    # BuildTrains represent the collection of builds for a `train_version`
    #
    # Note: builds returned by BuildTrains are _partially_ complete. Properties
    # such as `exportCompliance`, `testInfo` and many others are not provided.
    # It is the responsibility of Build to lazy-load the necessary properties.
    #
    # See `Spaceship::TestFlight::Build#reload`

    def self.all(app_id: nil, platform: nil, retry_count: 0)
      data = client.get_build_trains(app_id: app_id, platform: platform)
      trains = {}
      data.each do |train_version|
        builds_data = client.get_builds_for_train(app_id: app_id, platform: platform, train_version: train_version, retry_count: retry_count)
        trains[train_version] = builds_data.map { |attrs| Build.new(attrs) }
      end

      self.new(trains)
    end

    def initialize(trains = {})
      @trains = trains
    end

    def get(key)
      @trains[key]
    end
    alias [] get

    def values
      @trains.values
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
fastlane-2.65.0.beta.20171117010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.65.0.beta.20171116010004 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.65.0.beta.20171115010004 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.65.0.beta.20171114010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.64.1 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.65.0.beta.20171113010004 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.65.0.beta.20171112010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.65.0.beta.20171111010004 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.65.0.beta.20171110010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.65.0.beta.20171109010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.65.0.beta.20171108010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.65.0.beta.20171107010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.64.0 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.64.0.beta.20171106010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.64.0.beta.20171105010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.64.0.beta.20171104010004 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.64.0.beta.20171103010004 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.64.0.beta.20171102010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.64.0.beta.20171101010004 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.63.0 spaceship/lib/spaceship/test_flight/build_trains.rb