Module: Verge::Server::Config

Defined in:
lib/verge/server/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.database_pathObject

Returns the value of attribute database_path.



5
6
7
# File 'lib/verge/server/config.rb', line 5

def database_path
  @database_path
end

.site_signaturesObject

Returns the value of attribute site_signatures.



5
6
7
# File 'lib/verge/server/config.rb', line 5

def site_signatures
  @site_signatures
end

Class Method Details

.generic_signature=(val) ⇒ Object

Set the generic site’s token, if only one token is to be shared across all sites.



16
17
18
# File 'lib/verge/server/config.rb', line 16

def generic_signature=(val)
  @site_signatures[Verge::Server::Site::GENERIC_HOST] = val
end

.load_signaturesObject

Loads the signatures from the config into sites



35
36
37
38
39
40
41
42
# File 'lib/verge/server/config.rb', line 35

def load_signatures
  return if @site_signatures.nil?
  @site_signatures.each do |host, signature|
    site = Site.first(:host => host) || Site.new(:host => host)
    site.signature = signature
    site.save
  end
end