Class: Deployment

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource
Defined in:
lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb

Instance Method Summary collapse

Instance Method Details

#finished!(attrs) ⇒ Object



35
36
37
38
39
40
# File 'lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb', line 35

def finished!(attrs)
  return true if finished?
  attrs = attrs.dup
  attrs['finished_at'] ||= Time.now
  update(attrs)
end

#finished?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb', line 31

def finished?
  finished_at != nil
end

#inspectObject



18
19
20
# File 'lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb', line 18

def inspect
  "#<Deployment app_environment:#{app_environment.inspect}>"
end

#resolved_refObject

normally a property, but we don’t have the code to find this so just pretend



27
28
29
# File 'lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb', line 27

def resolved_ref
  "resolved-#{ref}"
end

#user_nameObject



22
23
24
# File 'lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb', line 22

def user_name
  app_environment.app..user.name
end