diff options
author | Azul <azul@riseup.net> | 2013-12-19 15:59:55 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2013-12-19 15:59:55 +0100 |
commit | f47712d803811f06b4371f50fabdfc1fefffe4cc (patch) | |
tree | c079d8802695c21fececba629e4446b23044145d /bin | |
parent | e4df501035434cbb1920ccca21e489599b5ad382 (diff) |
add design docs on db creation, use Pathname
Pathname makes dealing with files easier than String.
Tapicero will look for design documents in design directory in the tapicero path for now.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tapicero | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/tapicero b/bin/tapicero index 9a5a7ee..b8b88f1 100755 --- a/bin/tapicero +++ b/bin/tapicero @@ -1,10 +1,11 @@ #!/usr/bin/ruby +require 'pathname' # # Tapicero Daemon # -BASE_DIR = File.expand_path('../..', File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__) +BASE_DIR = Pathname.new(__FILE__).realpath + '../..' begin # @@ -17,7 +18,7 @@ rescue LoadError # require "#{BASE_DIR}/lib/tapicero/version.rb" Tapicero::REQUIRE_PATHS.each do |path| - path = File.expand_path(path, BASE_DIR) + path = BASE_DIR + path $LOAD_PATH.unshift path unless $LOAD_PATH.include?(path) end require 'rubygems' |