class LitmusPaper::App

Public Instance Methods

_cache() click to toggle source
# File lib/litmus_paper/app.rb, line 127
def _cache
  @cache ||= LitmusPaper::Cache.new(
    LitmusPaper.cache_location,
    "litmus_cache",
    LitmusPaper.cache_ttl
  )
end
_create_status_file(status_file) click to toggle source
# File lib/litmus_paper/app.rb, line 135
def _create_status_file(status_file)
  status_file.create(params[:reason], params[:health])
  _text 201, "File created"
end
_delete_status_file(status_file) click to toggle source
# File lib/litmus_paper/app.rb, line 140
def _delete_status_file(status_file)
  if status_file.exists?
    status_file.delete
    _text 200, "File deleted"
  else
    _text 404, "NOT FOUND"
  end
end
_text(response_code, body, headers ={}) click to toggle source
# File lib/litmus_paper/app.rb, line 149
def _text(response_code, body, headers ={})
  [response_code, { "Content-Type" => "text/plain" }.merge(headers), body]
end