Load config from .tmuxinator beneath current dir: closes GH issue #31

This commit is contained in:
Hedgehog 2011-11-04 12:36:10 +11:00
parent d65d29f3b3
commit 3d606e273d
3 changed files with 8 additions and 3 deletions

View File

@ -2,7 +2,7 @@ source "http://rubygems.org"
group :development do
gem "rspec", "~> 2.6.0"
gem "bundler", "~> 1.0.18"
gem "bundler", "~> 1.1.rc"
gem "jeweler", "~> 1.6.4"
gem "rcov", "~> 0.9.10"
end

View File

@ -22,7 +22,7 @@ PLATFORMS
ruby
DEPENDENCIES
bundler (~> 1.0.18)
bundler (~> 1.1.rc)
jeweler (~> 1.6.4)
rcov (~> 0.9.10)
rspec (~> 2.6.0)

View File

@ -157,7 +157,12 @@ module Tmuxinator
def root_dir
# create ~/.tmuxinator directory if it doesn't exist
Dir.mkdir("#{ENV["HOME"]}/.tmuxinator/") unless File.directory?(File.expand_path("~/.tmuxinator"))
"#{ENV["HOME"]}/.tmuxinator/"
sub_dir = File.join(File.expand_path(Dir.pwd), '.tmuxinator/')
if File.directory?(sub_dir)
return sub_dir
else
return "#{ENV["HOME"]}/.tmuxinator/"
end
end
def sample_config