readem 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/readem +3 -2
- data/lib/readem/version.rb +1 -1
- metadata +1 -1
data/bin/readem
CHANGED
@@ -12,14 +12,15 @@ set :root, File.expand_path(File.dirname(__FILE__) + "/../")
|
|
12
12
|
set :run, true
|
13
13
|
|
14
14
|
get "/" do
|
15
|
-
|
15
|
+
home_dir = ENV["HOME"]
|
16
|
+
readmes = Pathname.glob("#{home_dir}/Projects/*/README.md")
|
16
17
|
readme_dirs = readmes.map(&:dirname)
|
17
18
|
@local_dirnames = readme_dirs.map {|dir| dir.to_s.split("/").last}
|
18
19
|
erb :index
|
19
20
|
end
|
20
21
|
|
21
22
|
get "/:dir" do
|
22
|
-
readme = Pathname("/
|
23
|
+
readme = Pathname("#{home_dir}/Projects/#{params[:dir]}/README.md")
|
23
24
|
readme_data = readme.read
|
24
25
|
@markup = Makeup::Markup.new.render("README.md", readme_data)
|
25
26
|
erb :readme
|
data/lib/readem/version.rb
CHANGED