Permalink
Browse files

Added therubyracer

  • Loading branch information...
1 parent 9e58206 commit d9bd7c9aa2b0388b98eff56d5c012131472cb348 @ivanvanderbyl committed Jan 5, 2012
Showing with 42 additions and 2 deletions.
  1. +2 −1 Gemfile
  2. +4 −0 Gemfile.lock
  3. +36 −1 config.ru
View
@@ -1,4 +1,5 @@
source "http://rubygems.org"
gem "middleman", "~>2.0.14"
-gem 'haml-coderay'
+gem 'haml-coderay'
+gem 'therubyracer'
View
@@ -37,6 +37,7 @@ GEM
rack (>= 1.0.0)
url_mount (~> 0.2.1)
i18n (0.6.0)
+ libv8 (3.3.10.4)
maruku (0.6.0)
syntax (>= 1.0.0)
middleman (2.0.14)
@@ -90,6 +91,8 @@ GEM
tilt (~> 1.1, != 1.3.0)
syntax (1.0.0)
temple (0.3.4)
+ therubyracer (0.9.9)
+ libv8 (~> 3.3.10)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
@@ -108,3 +111,4 @@ PLATFORMS
DEPENDENCIES
haml-coderay
middleman (~> 2.0.14)
+ therubyracer
View
@@ -1,4 +1,39 @@
require 'rubygems'
require 'middleman'
-run Middleman.server
+run Middleman.server
+
+# require 'bundler/setup'
+# require 'sinatra/base'
+#
+# # The project root directory
+# $root = ::File.dirname(__FILE__)
+#
+# class SinatraStaticServer < Sinatra::Base
+#
+# get('/') do
+# # send_sinatra_file(request.path) {404}
+# redirect '/ui/'
+# end
+#
+# get('/ui') do
+# redirect '/ui/'
+# end
+#
+# get(/ui(\/.*)/) do
+# send_sinatra_file(request.path) {404}
+# end
+#
+# not_found do
+# send_sinatra_file('404.html') {"Sorry, I cannot find #{request.path}"}
+# end
+#
+# def send_sinatra_file(path, &missing_file_block)
+# file_path = File.join(File.dirname(__FILE__), 'build', path)
+# file_path = File.join(file_path, 'index.html') unless file_path =~ /\.[a-z]+$/i
+# File.exist?(file_path) ? send_file(file_path) : missing_file_block.call
+# end
+#
+# end
+#
+# run SinatraStaticServer

0 comments on commit d9bd7c9

Please sign in to comment.