class Serverspec::Type::OctopusDeploySpace
Public Class Methods
new(*url_and_api_key, space_name)
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_space.rb, line 12 def initialize(*url_and_api_key, space_name) serverUrl, apiKey = get_octopus_creds(url_and_api_key) @name = "Octopus Deploy Space #{space_name}" @runner = Specinfra::Runner @serverUrl = serverUrl @apiKey = apiKey if space_name.nil? raise "'space_name' was not included. Cannot contact server to validate space." end @spaceName = space_name end
Public Instance Methods
default?()
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_space.rb, line 32 def default? load_resource_if_nil false if @space.nil? @space['IsDefault'] == true end
exists?()
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_space.rb, line 27 def exists? load_resource_if_nil @space.nil? == false end
has_description?(description)
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_space.rb, line 44 def has_description?(description) load_resource_if_nil false if @space.nil? @space['Description'] == description end
has_running_task_queue?()
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_space.rb, line 38 def has_running_task_queue? load_resource_if_nil false if @space.nil? @space['TaskQueueStopped'] == false end
load_resource_if_nil()
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_space.rb, line 50 def load_resource_if_nil if @space.nil? @space = get_space_via_api end end