class Serverspec::Type::OctopusDeployUpgradeConfig
Public Class Methods
new(*url_and_api_key)
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_upgrade_config.rb, line 13 def initialize(*url_and_api_key) serverUrl, apiKey = get_octopus_creds(url_and_api_key) @name = "Octopus Deploy Upgrade Config #{serverUrl}" @runner = Specinfra::Runner @serverUrl = serverUrl @apiKey = apiKey # is it still nil? if serverUrl.nil? raise "'serverUrl' was not provided. Unable to connect to Octopus server to validate configuration." end if apiKey.nil? raise "'apiKey' was not provided. Unable to connect to Octopus server to validate configuration." end @upgradeConfig = get_upgrade_config_via_api(serverUrl, apiKey) end
Public Instance Methods
allow_checking?()
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_upgrade_config.rb, line 57 def allow_checking? false if @upgradeConfig.nil? @upgradeConfig['AllowChecking'] == true end
always_show_notifications?()
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_upgrade_config.rb, line 42 def always_show_notifications? false if @upgradeConfig.nil? has_notification_mode?('AlwaysShow') end
has_notification_mode?(mode)
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_upgrade_config.rb, line 32 def has_notification_mode?(mode) false if @upgradeConfig.nil? @upgradeConfig['NotificationMode'] == mode end
include_statistics?()
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_upgrade_config.rb, line 52 def include_statistics? false if @upgradeConfig.nil? @upgradeConfig['IncludeStatistics'] == true end
never_show_notifications?()
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_upgrade_config.rb, line 37 def never_show_notifications? false if @upgradeConfig.nil? has_notification_mode?('NeverShow') end
show_major_minor_notifications?()
click to toggle source
# File lib/octopus_serverspec_extensions/type/octopus_deploy_upgrade_config.rb, line 47 def show_major_minor_notifications? false if @upgradeConfig.nil? has_notification_mode?('ShowOnlyMajorMinor') end