lib/totem/shell.rb in totem-0.0.4 vs lib/totem/shell.rb in totem-0.0.5
- old
+ new
@@ -11,10 +11,18 @@
def initialize(args)
@args = args
end
def run
+ env_path = 'config/environment.rb'
+ if File.exists?(env_path)
+ load(env_path)
+ else
+ puts "Unable to find #{env_path}. You must run this command from your project root directory."
+ exit
+ end
+
if @args[0].nil?
puts_usage
return
end
@@ -40,10 +48,10 @@
end
private
def puts_usage
- puts "Usage:\n totem <command>"
+ puts "Usage:\n bundle exec totem <command>"
puts
puts "Commands:\n #{self.class.cmds.keys.join(', ')}"
end
end
end