Class: Inspec::Resources::Postgres
- Inherits:
- 
      Object
      
        - Object
- Inspec::Resources::Postgres
 
- Defined in:
- lib/resources/postgres.rb
Instance Attribute Summary collapse
- 
  
    
      #cluster  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute cluster. 
- 
  
    
      #conf_dir  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute conf_dir. 
- 
  
    
      #conf_path  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute conf_path. 
- 
  
    
      #data_dir  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute data_dir. 
- 
  
    
      #service  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute service. 
- 
  
    
      #version  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute version. 
Instance Method Summary collapse
- 
  
    
      #initialize  ⇒ Postgres 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Postgres. 
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Postgres
Returns a new instance of Postgres.
| 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # File 'lib/resources/postgres.rb', line 11 def initialize # determine dirs and service based on versions determine_dirs determine_service # print warnings if the dirs do not exist verify_dirs if !@version.nil? && !@conf_dir.empty? @conf_path = File.join @conf_dir, 'postgresql.conf' else @conf_path = nil return skip_resource 'Seems like PostgreSQL is not installed on your system' end end | 
Instance Attribute Details
#cluster ⇒ Object (readonly)
Returns the value of attribute cluster.
| 10 11 12 | # File 'lib/resources/postgres.rb', line 10 def cluster @cluster end | 
#conf_dir ⇒ Object (readonly)
Returns the value of attribute conf_dir.
| 10 11 12 | # File 'lib/resources/postgres.rb', line 10 def conf_dir @conf_dir end | 
#conf_path ⇒ Object (readonly)
Returns the value of attribute conf_path.
| 10 11 12 | # File 'lib/resources/postgres.rb', line 10 def conf_path @conf_path end | 
#data_dir ⇒ Object (readonly)
Returns the value of attribute data_dir.
| 10 11 12 | # File 'lib/resources/postgres.rb', line 10 def data_dir @data_dir end | 
#service ⇒ Object (readonly)
Returns the value of attribute service.
| 10 11 12 | # File 'lib/resources/postgres.rb', line 10 def service @service end | 
#version ⇒ Object (readonly)
Returns the value of attribute version.
| 10 11 12 | # File 'lib/resources/postgres.rb', line 10 def version @version end | 
Instance Method Details
#to_s ⇒ Object
| 27 28 29 | # File 'lib/resources/postgres.rb', line 27 def to_s 'PostgreSQL' end |