spaceship/lib/spaceship/test_flight/build.rb in fastlane-2.29.0.beta.20170427010043 vs spaceship/lib/spaceship/test_flight/build.rb in fastlane-2.29.0.beta.20170428010037

- old
+ new

@@ -65,11 +65,12 @@ }) BUILD_STATES = { processing: 'testflight.build.state.processing', active: 'testflight.build.state.testing.active', - ready: 'testflight.build.state.submit.ready', + ready_to_submit: 'testflight.build.state.submit.ready', + ready_to_test: 'testflight.build.state.testing.ready', export_compliance_missing: 'testflight.build.state.export.compliance.missing' } # Find a Build by `build_id`. Returns `nil` if can't find it. # @@ -108,13 +109,17 @@ def reload self.raw_data = self.class.find(app_id: app_id, build_id: id).raw_data end def ready_to_submit? - external_state == BUILD_STATES[:ready] + external_state == BUILD_STATES[:ready_to_submit] end + def ready_to_test? + external_state == BUILD_STATES[:ready_to_test] + end + def active? external_state == BUILD_STATES[:active] end def processing? @@ -164,9 +169,10 @@ test_info.whats_new = whats_new save! end def submit_for_testflight_review! + return if ready_to_test? client.post_for_testflight_review(app_id: app_id, build_id: id, build: self) end def add_group!(group) client.add_group_to_build(app_id: app_id, group_id: group.id, build_id: id)