Class: Pluto::Server

Inherits:
Sinatra::Base
  • Object
show all
Includes:
Models
Defined in:
lib/pluto/server.rb

Constant Summary collapse

PUBLIC_FOLDER =
"#{Pluto.root}/lib/pluto/server/public"
VIEWS_FOLDER =
"#{Pluto.root}/lib/pluto/server/views"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details



18
19
20
# File 'lib/pluto/server.rb', line 18

def self.banner
  "pluto-service #{Pluto::VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] on Sinatra/#{Sinatra::VERSION} (#{ENV['RACK_ENV']})"
end

Instance Method Details

#site_config_hashObject

Utilities



42
43
44
45
46
47
48
49
50
# File 'lib/pluto/server.rb', line 42

def site_config_hash
  h = {}
  site = Site.first      # FIX: for now assume one planet per DB (fix later; allow planet key or similar)
  if site.present?
    h['title']  = site.title
  else
    h['title']  = 'Planet Untitled'
  end
end