lib/spaceship/tunes/application.rb in spaceship-0.21.1 vs lib/spaceship/tunes/application.rb in spaceship-0.22.0

- old
+ new

@@ -132,10 +132,19 @@ attrs = client.app_details(apple_id) attrs.merge!(application: self) Tunes::AppDetails.factory(attrs) end + def versions_history + ensure_not_a_bundle + versions = client.versions_history(apple_id, platform) + versions.map do |attrs| + attrs.merge!(application: self) + Tunes::AppVersionHistory.factory(attrs) + end + end + ##################################################### # @!group Modifying ##################################################### # Create a new version of your app @@ -332,9 +341,16 @@ tester = find_external_tester(identifier) raise "Tester is not on #{self.name} betatesters" unless tester tester.remove_from_app!(self.apple_id) + end + + # private to module + def ensure_not_a_bundle + # we only support applications + platform = Spaceship::Tunes::AppVersionCommon.find_platform(raw_data['versionSets']) + raise "We do not support BUNDLE types right now" if platform['type'] == 'BUNDLE' end end end end