module Blix::Rest

for now it does not seem neccessary.

pass a response object to the controller to set header status and content.

Constants

AUTH_HEADER
CACHE_CONTROL
CACHE_NO_STORE
CONTENT_TYPE

EXPIRED_TOKEN_MESSAGE = 'token expired' INVALID_TOKEN_MESSAGE = 'invalid token'

CONTENT_TYPE_HTML
CONTENT_TYPE_JSON
CONTENT_TYPE_XML
HTML_ENCODED
HTTP_BODY_VERBS
HTTP_DATE_FORMAT
HTTP_VERBS
JSON_ENCODED
MIME_TYPE_JSON
NO_CACHE
PRAGMA
URL_ENCODED
VERSION
XML_ENCODED

Public Class Methods

environment() click to toggle source

the test/development/production environment

# File lib/blix/rest.rb, line 30
def self.environment
  @_environment ||= ENV['RACK_ENV'] || 'development'
end
environment=(val) click to toggle source
# File lib/blix/rest.rb, line 38
def self.environment=(val)
  @_environment = val.to_s
end
environment?(val) click to toggle source
# File lib/blix/rest.rb, line 34
def self.environment?(val)
  environment == val.to_s
end
full_path(path) click to toggle source
# File lib/blix/rest/request_mapper.rb, line 327
def self.full_path(path)
  RequestMapper.full_path(path)
end
logger() click to toggle source
# File lib/blix/rest.rb, line 46
def self.logger
  @_logger ||= begin
    l = Logger.new(STDOUT)
    unless l.respond_to? :write   # common logger needs a write method
      def l.write(*args)
        self.<<(*args)
      end
    end
    l
  end
end
logger=(val) click to toggle source
# File lib/blix/rest.rb, line 42
def self.logger=(val)
  @_logger = val
end
no_template_cache=(val) click to toggle source
# File lib/blix/rest/controller.rb, line 509
def self.no_template_cache=(val)
  Controller.no_template_cache = val
end
path_root() click to toggle source
# File lib/blix/rest/request_mapper.rb, line 323
def self.path_root
  RequestMapper.path_root
end
set_erb_root(*args) click to toggle source
# File lib/blix/rest/controller.rb, line 505
def self.set_erb_root(*args)
  Controller.set_erb_root(*args)
end
set_path_root(*args) click to toggle source
# File lib/blix/rest/request_mapper.rb, line 319
def self.set_path_root(*args)
  RequestMapper.set_path_root(*args)
end