summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile3
-rw-r--r--Gemfile.lock23
-rw-r--r--app.rb8
-rwxr-xr-xbin/server6
-rw-r--r--lib/app.rb7
-rw-r--r--lib/views/index.erb9
6 files changed, 55 insertions, 1 deletions
diff --git a/Gemfile b/Gemfile
index 7281247..a4a9815 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,4 +4,7 @@ source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
+gem "commonmarker", "~> 0.20"
+gem "github-markup", "~> 3.0"
gem "rake", "~> 12.3"
+gem "sinatra", "~> 2.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index f6a7f56..0b8cc36 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,13 +1,34 @@
GEM
remote: https://rubygems.org/
specs:
+ commonmarker (0.20.1)
+ ruby-enum (~> 0.5)
+ concurrent-ruby (1.1.5)
+ github-markup (3.0.4)
+ i18n (1.7.0)
+ concurrent-ruby (~> 1.0)
+ mustermann (1.0.3)
+ rack (2.0.7)
+ rack-protection (2.0.7)
+ rack
rake (12.3.2)
+ ruby-enum (0.7.2)
+ i18n
+ sinatra (2.0.7)
+ mustermann (~> 1.0)
+ rack (~> 2.0)
+ rack-protection (= 2.0.7)
+ tilt (~> 2.0)
+ tilt (2.0.10)
PLATFORMS
ruby
DEPENDENCIES
+ commonmarker (~> 0.20)
+ github-markup (~> 3.0)
rake (~> 12.3)
+ sinatra (~> 2.0)
BUNDLED WITH
- 2.0.1
+ 2.0.2
diff --git a/app.rb b/app.rb
new file mode 100644
index 0000000..bc5c540
--- /dev/null
+++ b/app.rb
@@ -0,0 +1,8 @@
+require 'sinatra'
+require 'github/markup'
+
+get '/' do
+ content = IO.read("README.md")
+ GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, content)
+ erb :index
+end
diff --git a/bin/server b/bin/server
new file mode 100755
index 0000000..2a384c8
--- /dev/null
+++ b/bin/server
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+set -e
+
+cd "$(dirname "$0")/.."
+bundle exec ruby lib/app.rb
diff --git a/lib/app.rb b/lib/app.rb
new file mode 100644
index 0000000..3468116
--- /dev/null
+++ b/lib/app.rb
@@ -0,0 +1,7 @@
+require 'sinatra'
+require 'github/markup'
+
+get '/' do
+ @content = IO.read("README.md")
+ erb :index
+end
diff --git a/lib/views/index.erb b/lib/views/index.erb
new file mode 100644
index 0000000..52e1a0a
--- /dev/null
+++ b/lib/views/index.erb
@@ -0,0 +1,9 @@
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <%= GitHub::Markup.render_s(GitHub::Markups::MARKUP_MARKDOWN, @content) %>
+ </body>
+</html>