servedown 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -10
- data/lib/servedown/application/app.rb +7 -3
- data/servedown.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ab82abe49509b16f51ad4a4120324c82aff9d3f
|
|
4
|
+
data.tar.gz: 8ad996a408be548f290f08392e9c8b812970597c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8468c275ddd68bb1f6a8c6d046ec49e93261e01f023e2d3065afe12203e3d7c786bc4ad3b93247cb2143df3f968cb9cf34cdca0f6adf569538dbe15c0c866bc2
|
|
7
|
+
data.tar.gz: cfffd8b6ed80047647a364b22f4da19964f0114cc981da948512c5e0ec4945b30fa1d7346193f19137f32dee1f954effe0429f6c769c6e1de3a1542f5f013c4e
|
data/README.md
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
# Servedown
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Generates a website for each .md file in the current directory
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
Add this line to your application's Gemfile:
|
|
8
|
-
|
|
9
|
-
gem 'servedown'
|
|
10
|
-
|
|
11
|
-
And then execute:
|
|
12
|
-
|
|
13
|
-
$ bundle
|
|
14
|
-
|
|
15
7
|
Or install it yourself as:
|
|
16
8
|
|
|
17
9
|
$ gem install servedown
|
|
18
10
|
|
|
19
11
|
## Usage
|
|
20
12
|
|
|
21
|
-
|
|
13
|
+
Start the server
|
|
14
|
+
|
|
15
|
+
$ servedown
|
|
16
|
+
|
|
17
|
+
and open <localhost:4567> in your browser
|
|
22
18
|
|
|
23
19
|
## Contributing
|
|
24
20
|
|
|
@@ -10,9 +10,13 @@ module Servedown
|
|
|
10
10
|
|
|
11
11
|
get '/view' do
|
|
12
12
|
file = params['file']
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if Dir['./**/*.md'].include? file
|
|
14
|
+
text = File.open(file).read
|
|
15
|
+
@html = Kramdown::Document.new(text).to_html
|
|
16
|
+
haml :view
|
|
17
|
+
else
|
|
18
|
+
404
|
|
19
|
+
end
|
|
16
20
|
end
|
|
17
21
|
end
|
|
18
22
|
end
|
data/servedown.gemspec
CHANGED
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = 'servedown'
|
|
7
|
-
spec.version = '0.0.
|
|
7
|
+
spec.version = '0.0.3'
|
|
8
8
|
spec.authors = ['Leon Rische']
|
|
9
9
|
spec.email = ['hello@l3kn.de']
|
|
10
10
|
spec.summary = 'Serve a directory of markdown files'
|