Sha256: cdc4296a23efed50cc16634a0ce60f1f216595ce72080b96cdbeb9fb314def1f

Contents?: true

Size: 1 KB

Versions: 248

Compression:

Stored size: 1 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)
      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)
        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

248 entries across 248 versions & 1 rubygems

Version Path
fastlane-2.63.0.beta.20171025010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.63.0.beta.20171024010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.62.1 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.63.0.beta.20171023010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.63.0.beta.20171022010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.63.0.beta.20171021010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.63.0.beta.20171020010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.63.0.beta.20171019010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.63.0.beta.20171018010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.62.0 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.62.0.beta.20171017010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.62.0.beta.20171016010004 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.62.0.beta.20171015010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.62.0.beta.20171014010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.62.0.beta.20171011010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.62.0.beta.20171010010004 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.61.0 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.61.0.beta.20171009010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.61.0.beta.20171008010003 spaceship/lib/spaceship/test_flight/build_trains.rb
fastlane-2.61.0.beta.20171007010004 spaceship/lib/spaceship/test_flight/build_trains.rb