File: options.rb

package info (click to toggle)
libinnate-ruby 2010.07-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 812 kB
  • ctags: 621
  • sloc: ruby: 4,242; makefile: 2
file content (37 lines) | stat: -rw-r--r-- 1,037 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module Innate
  # this has to be run after a couple of other files have been required

  options.dsl do
    o "Innate::start will not start an adapter if true",
      :started, false

    o "Will send ::setup to each element during Innate::start",
      :setup, [Innate::Cache, Innate::Node]

    o "Trap this signal to issue shutdown, nil/false to disable trap",
      :trap, 'SIGINT'

    o "The compiler for middleware",
      :middleware_compiler, Innate::MiddlewareCompiler

    o "Indicates which default middleware to use, (:dev|:live)",
      :mode, :dev

    o "The directories this application resides in",
      :roots, [File.dirname($0)]

    o "The directories containing static files to be served",
      :publics, ['public']

    o "Directories containing the view templates",
      :views, ['view']

    o "Directories containing the layout templates",
      :layouts, ['layout']

    o "Prefix used to create relative links",
      :prefix, '/'

    trigger(:mode){|value| Innate.middleware_recompile(value) }
  end
end