Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix config.ru for heroku (hopefully, grr.)

  • Loading branch information...
commit 57883cf8ac291a9eb49ab9b41aeaabcf9477414b 1 parent bc2570a
@svenfuchs svenfuchs authored
View
22 config.ru
@@ -1,6 +1,18 @@
-urls = Dir['**/*'].map { |path| "/#{path}" }
-urls = Hash[*urls.zip(urls).flatten]
-urls.merge!('/' => 'index.html')
+# urls = Dir['**/*.*']
+# urls = Hash[*urls.map { |path| "/#{path}" }.zip(urls).flatten]
+# urls.merge!('/' => 'index.html')
+#
+# use Rack::Static, :urls => urls, :root => '.'
+# run lambda{ |env| [ 404, { 'Content-Type' => 'text/html' }, ['404 - page not found'] ] }
-use Rack::Static, :urls => urls
-run lambda{ |env| [ 404, { 'Content-Type' => 'text/html' }, ['404 - page not found'] ] }
+use Rack::Static,
+ :urls => Dir['*'].map { |path| "/#{path}" },
+ :root => "."
+
+run lambda { |env|
+ if env['PATH_INFO'] == '/'
+ [ 200, { 'Content-Type' => 'text/html', 'Cache-Control' => 'public, max-age=86400' }, File.open('index.html', File::RDONLY) ]
+ else
+ [ 404, { 'Content-Type' => 'text/html' }, ["404 - not found: #{env['PATH_INFO']}"] ]
+ end
+}
View
2  index.html
@@ -2,7 +2,7 @@
<head>
<meta charset="UTF-8">
<title>Travis CI needs your help</title>
- <link href="styles.css" rel="stylesheet" type="text/css" media="all">
+ <link href="stylesheets/styles.css" rel="stylesheet" type="text/css" media="all">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<script type="text/javascript" src="javascripts/scripts.js"></script>
View
2  javascripts/scripts.js
@@ -50,7 +50,7 @@ $.fn.slides = function(options) {
var Testimonials = function(element) {
this.element = element;
- $.get('testimonials.json', this.render.bind(this));
+ $.get('/testimonials.json', this.render.bind(this));
}
$.extend(Testimonials.prototype, {
render: function(records) {
View
36 styles.css → stylesheets/styles.css
@@ -72,7 +72,7 @@ section > div {
width: 200px;
height: 63px;
margin: 0px;
- background: url(images/travis-ci.png) no-repeat;
+ background: url(/images/travis-ci.png) no-repeat;
overflow: hidden;
text-indent: -9999px;
}
@@ -125,7 +125,7 @@ section > div {
#blob {
position: relative;
padding: 20px 0 30px 0;
- background: url(images/background-blob.png) repeat-x;
+ background: url(/images/background-blob.png) repeat-x;
color: white;
}
#blob .slides {
@@ -187,7 +187,7 @@ section > div {
position: relative;
padding: 5px 40px;
border-width: 15px 0 15px 0;
- -webkit-border-image: url(images/background-sub.png) 15 0 15 0 stretch;
+ -webkit-border-image: url(/images/background-sub.png) 15 0 15 0 stretch;
background-color: #e4e7ed;
}
#sub blockquote {
@@ -316,7 +316,7 @@ section:hover .sidenote {
.sidenote span {
position: absolute;
display: block;
- background: url("images/handwritten-arrow.png") no-repeat;
+ background: url("/images/handwritten-arrow.png") no-repeat;
}
.sidenote.left {
top: 210px;
@@ -357,7 +357,7 @@ section:hover .sidenote {
height: 327px;
margin: 0 -40px;
padding-left: 35px;
- background: url(images/rails-core/background.png) top center;
+ background: url(/images/rails-core/background.png) top center;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
@@ -371,7 +371,7 @@ section:hover .sidenote {
width: 217px;
height: 293 px;
padding: 15px 2px 0 2px;
- background: url(images/rails-core/badge_background.png) no-repeat 5px 15px;
+ background: url(/images/rails-core/badge_background.png) no-repeat 5px 15px;
text-align: center;
cursor: hand;
}
@@ -425,28 +425,28 @@ section:hover .sidenote {
animation: mouth 0.7s infinite;
}
#rails-core #jon .head {
- background: url(images/rails-core/jon_head.png) no-repeat center;
+ background: url(/images/rails-core/jon_head.png) no-repeat center;
}
#rails-core #jon a {
- background: url(images/rails-core/jon_mouth.png) no-repeat center;
+ background: url(/images/rails-core/jon_mouth.png) no-repeat center;
}
#rails-core #jose .head {
- background: url(images/rails-core/jose_head.png) no-repeat center;
+ background: url(/images/rails-core/jose_head.png) no-repeat center;
}
#rails-core #jose a {
- background: url(images/rails-core/jose_mouth.png) no-repeat center;
+ background: url(/images/rails-core/jose_mouth.png) no-repeat center;
}
#rails-core #aaron .head {
- background: url(images/rails-core/aaron_head.png) no-repeat center;
+ background: url(/images/rails-core/aaron_head.png) no-repeat center;
}
#rails-core #aaron a {
- background: url(images/rails-core/aaron_mouth.png) no-repeat center;
+ background: url(/images/rails-core/aaron_mouth.png) no-repeat center;
}
#rails-core #yehuda .head {
- background: url(images/rails-core/yehuda_head.png) no-repeat center;
+ background: url(/images/rails-core/yehuda_head.png) no-repeat center;
}
#rails-core #yehuda a {
- background: url(images/rails-core/yehuda_mouth.png) no-repeat center;
+ background: url(/images/rails-core/yehuda_mouth.png) no-repeat center;
}
#rails-core .sidenote {
top: 180px;
@@ -729,16 +729,16 @@ section:hover .sidenote {
}
#future-plans #pullrequests {
- background: url(images/features/pullrequests.png) no-repeat right;
+ background: url(/images/features/pullrequests.png) no-repeat right;
}
#future-plans #languages {
- background: url(images/features/languages.png) no-repeat right;
+ background: url(/images/features/languages.png) no-repeat right;
}
#future-plans #artifacts {
- background: url(images/features/artifacts.png) no-repeat right;
+ background: url(/images/features/artifacts.png) no-repeat right;
}
#future-plans #private {
- background: url(images/features/private.png) no-repeat right;
+ background: url(/images/features/private.png) no-repeat right;
}
#stickers {
Please sign in to comment.
Something went wrong with that request. Please try again.