Module: Roda::BIN

Extended by:
BIN
Included in:
BIN
Defined in:
lib/roda/bin.rb,
lib/roda/bin/version.rb

Constant Summary collapse

VERSION =
"0.1.8"

Instance Method Summary collapse

Instance Method Details

#envsObject



28
29
30
# File 'lib/roda/bin.rb', line 28

def envs
  @envs ||= {}
end

#serverObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/roda/bin.rb', line 8

def server
  args = [
    'thin', 'start', '--threaded', '--max-persistent-conns', '300',
    "--max-conns", "400", "-p", "8080"
  ].concat(argv)

  options = {
    cmd: args.join(' '),
    signal: 'TERM',
    background: true,
    growl: false,
    name: 'Roda Server',
    ignore: [],
    dir: ["."],
    pattern: "{Gemfile,Gemfile.lock,.gems,.bundle,.env*,config.ru,Rakefile,**/*.{rb,js,coffee,css,scss,sass,styl,erb,html,haml,ru,yml,slim,md,mab,rake}}"
  }

  Rerun::Runner.keep_running(options[:cmd], options)
end