Module: Drakkon::Web
- Defined in:
- lib/drakkon/web.rb
Overview
Web Helper
Class Method Summary collapse
-
.output ⇒ Object
Send output to console.
-
.run!(_args = []) ⇒ Object
Free running.
-
.run_cmd ⇒ Object
Exec skips the weird shell stuff.
- .runtime ⇒ Object
Class Method Details
.output ⇒ Object
Send output to console
20 21 22 23 24 25 26 |
# File 'lib/drakkon/web.rb', line 20 def self.output loop do next unless @dragonruby.ready? puts @dragonruby.readline end end |
.run!(_args = []) ⇒ Object
Free running
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/drakkon/web.rb', line 5 def self.run!(_args = []) # Save Current Directory before changing to Version Directory @context = Dir.pwd # Yes... Run.run! Dir.chdir(Run.version_dir) do runtime output end rescue SystemExit, Interrupt LogBot.info('Web', 'Exiting') exit 0 end |
.run_cmd ⇒ Object
Exec skips the weird shell stuff
33 34 35 |
# File 'lib/drakkon/web.rb', line 33 def self.run_cmd ['./dragonruby-httpd', @context, '8000'] end |