Class: Inspec::Resources::IisApp
- Inherits:
-
Object
- Object
- Inspec::Resources::IisApp
- Defined in:
- lib/resources/iis_app.rb
Instance Method Summary collapse
- #application_pool ⇒ Object
- #exists? ⇒ Boolean
- #has_application_pool?(application_pool) ⇒ Boolean
- #has_path?(path) ⇒ Boolean
- #has_physical_path?(physical_path) ⇒ Boolean
- #has_protocol?(protocol) ⇒ Boolean
- #has_site_name?(site_name) ⇒ Boolean
-
#initialize(path, site_name) ⇒ IisApp
constructor
A new instance of IisApp.
- #path ⇒ Object
- #physical_path ⇒ Object
- #protocols ⇒ Object
- #site_name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(path, site_name) ⇒ IisApp
Returns a new instance of IisApp.
20 21 22 23 24 25 26 27 28 |
# File 'lib/resources/iis_app.rb', line 20 def initialize(path, site_name) @path = path @site_name = site_name @cache = nil @inspec = inspec # verify that this resource is only supported on Windows return skip_resource 'The `iis_app` resource is not supported on your OS.' unless inspec.os.windows? end |
Instance Method Details
#application_pool ⇒ Object
30 31 32 |
# File 'lib/resources/iis_app.rb', line 30 def application_pool iis_app[:application_pool] end |
#exists? ⇒ Boolean
50 51 52 |
# File 'lib/resources/iis_app.rb', line 50 def exists? !iis_app[:path].empty? end |
#has_application_pool?(application_pool) ⇒ Boolean
58 59 60 |
# File 'lib/resources/iis_app.rb', line 58 def has_application_pool?(application_pool) iis_app[:application_pool] == application_pool end |
#has_path?(path) ⇒ Boolean
62 63 64 |
# File 'lib/resources/iis_app.rb', line 62 def has_path?(path) iis_app[:path] == path end |
#has_physical_path?(physical_path) ⇒ Boolean
66 67 68 |
# File 'lib/resources/iis_app.rb', line 66 def has_physical_path?(physical_path) iis_app[:physical_path] == physical_path end |
#has_protocol?(protocol) ⇒ Boolean
70 71 72 |
# File 'lib/resources/iis_app.rb', line 70 def has_protocol?(protocol) iis_app[:protocols].include?(protocol) end |
#has_site_name?(site_name) ⇒ Boolean
54 55 56 |
# File 'lib/resources/iis_app.rb', line 54 def has_site_name?(site_name) iis_app[:site_name] == site_name end |
#path ⇒ Object
42 43 44 |
# File 'lib/resources/iis_app.rb', line 42 def path iis_app[:path] end |
#physical_path ⇒ Object
46 47 48 |
# File 'lib/resources/iis_app.rb', line 46 def physical_path iis_app[:physical_path] end |
#protocols ⇒ Object
34 35 36 |
# File 'lib/resources/iis_app.rb', line 34 def protocols iis_app[:protocols] end |
#site_name ⇒ Object
38 39 40 |
# File 'lib/resources/iis_app.rb', line 38 def site_name iis_app[:site_name] end |
#to_s ⇒ Object
74 75 76 |
# File 'lib/resources/iis_app.rb', line 74 def to_s "iis_app '#{@site_name}#{@path}'" end |