bin/petli in petli-0.0.2 vs bin/petli in petli-0.0.3
- old
+ new
@@ -1,7 +1,8 @@
#!/usr/bin/env ruby
require 'petli'
+require 'tatty'
require 'optparse'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: petli [options]"
@@ -10,28 +11,28 @@
opts.on("-b", "--bread", "Feed your pet bread without viewing") {|v| options[:bread] = v}
opts.on("-c", "--candy", "Feed your pet candy without viewing") {|v| options[:candy] = v}
opts.on("-m", "--medicine", "Feed your pet candy without viewing") {|v| options[:medicine] = v}
opts.on("-l", "--clean", "Clean up any 'dirt' without viewing") {|v| options[:clean] = v}
opts.on("-p", "--path [PATH]", "path to your pet data (defaults to system config dir)") do |v|
- $petlidboverride = v
+ $tattydboverridepath = v
end
end.parse!
pet = Petli::Pet.new
pet.display # force pet to update first
if options[:reset]
- Petli::DB.clear
+ Tatty::DB.clear
puts "Goodbye. I hope you love your next pet!"
elsif options[:status]
- puts Petli::DB.dump
+ puts Tatty::DB.dump
elsif options[:bread]
pet.feed!(food: :bread)
elsif options[:candy]
pet.feed!(food: :candy)
elsif options[:medicine]
pet.feed!(food: :medicine)
elsif options[:clean]
pet.clean
else
- Petli::HUD.new.run
+ Tatty.run(Petli::Stages::Main, pet: pet)
end