Module: Naginata::SharedHelpers

Included in:
Loader
Defined in:
lib/naginata/shared_helpers.rb

Instance Method Summary collapse

Instance Method Details

#find_naginatafileObject



4
5
6
7
8
9
10
11
12
# File 'lib/naginata/shared_helpers.rb', line 4

def find_naginatafile
  file = %w(
    Naginatafile
    ~/.naginata/Naginatafile
    /etc/naginata/Naginatafile
  ).map{ |path| File.expand_path(path) }.find { |path| File.file?(path) }
  raise NaginatafileNotFound, "Could not locate Gemfile" unless file
  return file
end