Permalink
Browse files

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

  • Loading branch information...
1 parent d65d29f commit 3d606e273d18edbf98e689de516e127c09e2b69c @hedgehog committed Nov 4, 2011
Showing with 8 additions and 3 deletions.
  1. +1 −1 Gemfile
  2. +1 −1 Gemfile.lock
  3. +6 −1 lib/tmuxinator/cli.rb
View
@@ -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
@@ -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)
@@ -157,7 +157,12 @@ def method_missing method, *args, &block
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

0 comments on commit 3d606e2

Please sign in to comment.