readem 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/readem +3 -2
  2. data/lib/readem/version.rb +1 -1
  3. 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
- readmes = Pathname.glob("/home/marius/Projects/*/README.md")
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("/home/marius/Projects/#{params[:dir]}/README.md")
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
@@ -1,3 +1,3 @@
1
1
  module Readem
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: readem
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Marius Mathiesen