diff --git a/lib/spectre/prompt.rb b/lib/spectre/prompt.rb index 3cad922..7a73058 100644 --- a/lib/spectre/prompt.rb +++ b/lib/spectre/prompt.rb @@ -9,7 +9,7 @@ class << self attr_reader :prompts_path def prompts_path - @prompts_path ||= detect_prompts_path + @prompts_path = detect_prompts_path end # Render a prompt by reading and rendering the YAML template @@ -69,8 +69,8 @@ def find_project_root(dir) while dir != '/' do # Check for Gemfile, .git directory, or config/application.rb (Rails) return dir if File.exist?(File.join(dir, 'Gemfile')) || - File.directory?(File.join(dir, '.git')) || - File.exist?(File.join(dir, 'config', 'application.rb')) + File.exist?(File.join(dir, 'config', 'application.rb')) || + File.directory?(File.join(dir, '.git')) # Move up one directory dir = File.expand_path('..', dir)