lib/spaceship/tunes/build_train.rb in spaceship-0.16.0 vs lib/spaceship/tunes/build_train.rb in spaceship-0.17.0
- old
+ new
@@ -68,9 +68,14 @@
@processing_builds = (self.raw_data['buildsInProcessing'] || []).collect do |attrs|
attrs.merge!(build_train: self)
Tunes::Build.factory(attrs)
end
+
+ # since buildsInProcessing appears empty, fallback to also including processing state from @builds
+ @builds.each do |build|
+ @processing_builds << build if build.processing == true && build.valid == true
+ end
end
# @return (Spaceship::Tunes::Build) The latest build for this train, sorted by upload time.
def latest_build
@builds.max_by(&:upload_date)