-
Notifications
You must be signed in to change notification settings - Fork 3
/
ruby.yml
39 lines (38 loc) · 1.02 KB
/
ruby.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
features:
- ruby latest
nginx:
root: public_html/public
passenger:
enabled: "on"
ruby: .rvm/rubies/default/bin/ruby
source: clear
commands:
- filename: app.rb
content: |
$html_text = <<-TEXT
<!DOCTYPE html>
<html>
<head>
<title>Ruby App</title>
<link rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css">
</head>
<body class="p-5 text-center">
<p><img src="//images.unsplash.com/photo-1465153690352-10c1b29577f8?fit=crop&w=200&h=200"
class="img-fluid rounded-circle"></p>
<h1 class="mb-3">Hello, world!</h1>
<p>Serving from Ruby version %{ver}</p>
<p class="text-muted">DOM Cloud</p>
</body>
</html>
TEXT
class App
def call(env)
return [200,
{"content-type" => "text/html"},
[$html_text % {ver: RUBY_VERSION}]]
end
end
- filename: config.ru
content: |
require './app'
run App.new