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:



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

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

Instance Method Details

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

Creates an new application

Parameters:

  • name (String)

    the name of the application

  • context_path (String)

    the context path of the application

  • service (String)

    the service that the application will deploy its revisions to

  • host (String)

    the host that the application will deploy its revisions to

Returns:



34
35
36
# File 'lib/vas/tc_server/applications.rb', line 34

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