Class: TcServer::Applications

Inherits:
Shared::MutableCollection show all
Defined in:
lib/vas/tc_server/applications.rb

Overview

Used to enumerate, create, and delete applications.

Instance Attribute Summary

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::MutableCollection

#delete

Methods inherited from Shared::Collection

#each

Constructor Details

#initialize(location, client) ⇒ Applications

:nodoc:



23
24
25
# File 'lib/vas/tc_server/applications.rb', line 23

def initialize(location, client) #:nodoc:
  super(location, client, "applications", Application)
end

Instance Method Details

#create(name, context_path, service, host) ⇒ Object

Creates an Application named name with the given context_path. The application will deploy its revisions to the given service and host.



29
30
31
# File 'lib/vas/tc_server/applications.rb', line 29

def create(name, context_path, service, host)
  Application.new(client.post(location, {"context-path" => context_path, :name => name, :host => host, :service => service}, "group-application"), client)
end