summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTom Black <[email protected]>2018-02-25 01:51:08 -0800
committerTom Black <[email protected]>2018-02-25 01:51:08 -0800
commit2e07255723428d09eab38ad1a5fde11fc9a287d8 (patch)
tree4646ddbffdc18970c1730c213fa0d6ea5dcff12e
parent975b21df2b1c3835353441619c34abdf2fb76b7e (diff)
downloadruby2d-2e07255723428d09eab38ad1a5fde11fc9a287d8.tar.gz
ruby2d-2e07255723428d09eab38ad1a5fde11fc9a287d8.zip
Serve built web apps for Rake tests
DOM security restrictions will block assets otherwise
-rw-r--r--Rakefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 4daba79..808e1d5 100644
--- a/Rakefile
+++ b/Rakefile
@@ -53,7 +53,11 @@ def run_web_test(file)
when /mingw/
open_cmd = "start"
end
- run_cmd "#{open_cmd} build/app.html"
+ Thread.new do
+ sleep 2
+ run_cmd "#{open_cmd} http://localhost:4001/build/app.html"
+ end
+ run_cmd "ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port => 4001, :DocumentRoot => Dir.pwd).start'"
end
def run_apple_test(device)