lib/spaceship/tunes/build.rb in spaceship-0.1.1 vs lib/spaceship/tunes/build.rb in spaceship-0.1.2
- old
+ new
@@ -35,10 +35,18 @@
attr_accessor :platform
# @return (Integer) When is this build going to be invalid
attr_accessor :internal_expiry_date
+ # @return (Integer): When is the external build going to expire?
+ attr_accessor :external_expiry_date
+
+ # @return (Boolean): Is this build available for external beta testing
+ # this is only true after the build was approved by Apple
+ attr_accessor :external_testing_enabled
+
+
# @return (Bool) Does this build support WatchKit?
attr_accessor :watch_kit_enabled
# @return (Bool):
attr_accessor :ready_to_install
@@ -76,19 +84,26 @@
'internalInstallCount' => :internal_install_count,
'externalInstallCount' => :external_install_count,
'sessionCount' => :session_count,
'crashCount' => :crash_count,
'internalExpiry' => :internal_expiry_date,
+ 'externalExpiry' => :external_expiry_date,
'watchKitEnabled' => :watch_kit_enabled,
'readyToInstall' => :ready_to_install,
)
class << self
# Create a new object based on a hash.
# This is used to create a new object based on the server response.
def factory(attrs)
self.new(attrs)
end
+ end
+
+ def setup
+ super
+
+ @external_testing_enabled = (self.external_expiry_date || 0) > 0
end
end
end
end