Class: Inspec::Resources::IisApp

Inherits:
Object
  • Object
show all
Defined in:
lib/resources/iis_app.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, site_name) ⇒ IisApp

Returns a new instance of IisApp.



21
22
23
24
25
26
# File 'lib/resources/iis_app.rb', line 21

def initialize(path, site_name)
  @path = path
  @site_name = site_name
  @cache = nil
  @inspec = inspec
end

Instance Method Details

#application_poolObject



28
29
30
# File 'lib/resources/iis_app.rb', line 28

def application_pool
  iis_app[:application_pool]
end

#exists?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/resources/iis_app.rb', line 48

def exists?
  !iis_app[:path].empty?
end

#has_application_pool?(application_pool) ⇒ Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/resources/iis_app.rb', line 56

def has_application_pool?(application_pool)
  iis_app[:application_pool] == application_pool
end

#has_path?(path) ⇒ Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/resources/iis_app.rb', line 60

def has_path?(path)
  iis_app[:path] == path
end

#has_physical_path?(physical_path) ⇒ Boolean

Returns:

  • (Boolean)


64
65
66
# File 'lib/resources/iis_app.rb', line 64

def has_physical_path?(physical_path)
  iis_app[:physical_path] == physical_path
end

#has_protocol?(protocol) ⇒ Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/resources/iis_app.rb', line 68

def has_protocol?(protocol)
  iis_app[:protocols].include?(protocol)
end

#has_site_name?(site_name) ⇒ Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/resources/iis_app.rb', line 52

def has_site_name?(site_name)
  iis_app[:site_name] == site_name
end

#pathObject



40
41
42
# File 'lib/resources/iis_app.rb', line 40

def path
  iis_app[:path]
end

#physical_pathObject



44
45
46
# File 'lib/resources/iis_app.rb', line 44

def physical_path
  iis_app[:physical_path]
end

#protocolsObject



32
33
34
# File 'lib/resources/iis_app.rb', line 32

def protocols
  iis_app[:protocols]
end

#site_nameObject



36
37
38
# File 'lib/resources/iis_app.rb', line 36

def site_name
  iis_app[:site_name]
end

#to_sObject



72
73
74
# File 'lib/resources/iis_app.rb', line 72

def to_s
  "iis_app '#{@site_name}#{@path}'"
end