Module: Drakkon::Web

Defined in:
lib/drakkon/web.rb

Overview

Web Helper

Class Method Summary collapse

Class Method Details

.run!(_args = []) ⇒ Object

Free running



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/drakkon/web.rb', line 5

def self.run!(_args = [])
  # Web::Runny.run!

  # Save Current Directory before changing to Version Directory
  @context = Dir.pwd

  # Yes... Run.run!
  Dir.chdir(Run.version_dir) do
    system run_cmd
  end
end

.run_cmdObject

Exec skips the weird shell stuff



24
25
26
# File 'lib/drakkon/web.rb', line 24

def self.run_cmd
  "PATH=#{Run.version_dir}:$PATH exec dragonruby-httpd #{@context} 8000"
end

.runtimeObject



17
18
19
20
21
# File 'lib/drakkon/web.rb', line 17

def self.runtime
  @dragonruby = IO.popen(run_cmd)

  # @dragonruby = Process.spawn run_cmd
end