From f47712d803811f06b4371f50fabdfc1fefffe4cc Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 19 Dec 2013 15:59:55 +0100 Subject: 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. --- bin/tapicero | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin/tapicero') 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' -- cgit v1.2.3