Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
Added external_testing_enabled and external_expiry_date to builds
Browse files Browse the repository at this point in the history
  • Loading branch information
KrauseFx committed Jul 18, 2015
1 parent 04cd200 commit 3b57673
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/spaceship/tunes/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ class Build < TunesBase
# @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

Expand Down Expand Up @@ -78,6 +86,7 @@ class Build < TunesBase
'sessionCount' => :session_count,
'crashCount' => :crash_count,
'internalExpiry' => :internal_expiry_date,
'externalExpiry' => :external_expiry_date,
'watchKitEnabled' => :watch_kit_enabled,
'readyToInstall' => :ready_to_install,
)
Expand All @@ -89,6 +98,10 @@ def factory(attrs)
self.new(attrs)
end
end

def setup
@external_testing_enabled = self.external_expiry_date > 0
end
end
end
end
Expand Down
2 changes: 2 additions & 0 deletions spec/tunes/build_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
expect(build.app_name).to eq('Yeahaa')
expect(build.platform).to eq('ios')
expect(build.internal_expiry_date).to eq(1416562036000)
expect(build.external_expiry_date).to eq(0)
expect(build.external_testing_enabled).to eq(false)
expect(build.watch_kit_enabled).to eq(false)
expect(build.ready_to_install).to eq(false)

Expand Down

0 comments on commit 3b57673

Please sign in to comment.