Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix start_web_server_async to store port correctly, stop ffmpeg from

blocking on stdin
  • Loading branch information...
commit 2edf1dfd715bf36c9a6af1e150da998575a89b14 1 parent e574916
@paulcbetts authored
Showing with 14 additions and 2 deletions.
  1. +11 −0 lib/controllers.rb
  2. +2 −2 lib/main.rb
  3. +1 −0  lib/platform.rb
View
11 lib/controllers.rb
@@ -31,6 +31,7 @@
require 'builder/xmlmarkup'
require 'fileutils'
require 'uri'
+require 'activesupport'
# Yikes
require 'config'
@@ -79,6 +80,7 @@ def screenshot_url
end
end
+
### Controllers
class MainController < Ramaze::Controller
@@ -94,6 +96,15 @@ def index
# FIXME: Figure out when we have internet why this fails
#@items.sort! {|x| x.finished_at}
end
+
+ def debug
+ Yikes.instance.active_engines.to_json
+ end
+
+ def quit
+ $do_quit = true
+ _("Thanks for using Yikes!")
+ end
end
class PodcastController < Ramaze::Controller
View
4 lib/main.rb
@@ -194,14 +194,14 @@ def start_web_service_async(port = 4000)
# we're in a spec file, we shouldn't actually start the web server
Ramaze.start :adaptor => :webrick, :port => port, :force => true
end
- @port = port
+ @@port = port
end
def self.url_base
# FIXME: Something weird is going wrong with Bonjour DNS resolution
# when "hostname.local" == localhost
#"http://#{Platform.hostname}.local:#{port}"
- "http://localhost:#{@port}"
+ "http://localhost:#{@@port}"
end
end
View
1  lib/platform.rb
@@ -41,6 +41,7 @@ def run_external_command_fork(cmd)
# FIXME: Dumb hack code!
pid = nil
unless (pid = fork)
+ STDIN.reopen '/dev/null'
STDOUT.reopen '/dev/null'
STDERR.reopen '/dev/null'
logger.debug "Executing: #{cmd}"
Please sign in to comment.
Something went wrong with that request. Please try again.