class Deployment
Constants
- AWSM_SERVERSIDE_VERSION
Public Instance Methods
deploy()
click to toggle source
pretend to trigger a deploy
this deploy will be instant, unlike real deploys
# File lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb, line 38 def deploy unless serverside_version # only set serverside version if it's not set, to imitate the api # behavior of choosing its own serverside version if one is not # sent update :serverside_version => AWSM_SERVERSIDE_VERSION end finished!( :successful => true, :output => 'Deployment triggered by the API' ) end
finished!(attrs)
click to toggle source
# File lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb, line 55 def finished!(attrs) return true if finished? attrs = attrs.dup attrs['finished_at'] ||= Time.now update(attrs) end
finished?()
click to toggle source
# File lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb, line 51 def finished? finished_at != nil end
inspect()
click to toggle source
# File lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb, line 21 def inspect "#<Deployment app_environment:#{app_environment.inspect}>" end
resolved_ref()
click to toggle source
normally a property, but we don’t have the code to find this so just pretend
# File lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb, line 30 def resolved_ref "resolved-#{ref}" end
user_name()
click to toggle source
# File lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb, line 25 def user_name app_environment.app.account.user.name end