Output JSON from rails pets:load[pet_name]

Gonna use this for making mock data for automatic testing!
This commit is contained in:
Emi Matchu 2024-10-21 14:03:56 -07:00
parent 09e5a39b4c
commit 881e63cfbd

View file

@ -1,7 +1,8 @@
namespace :pets do
desc "Load a pet's viewer data"
task :load, [:name] => [:environment] do |task, args|
pp Neopets::CustomPets.fetch_viewer_data(args[:name])
viewer_data = Neopets::CustomPets.fetch_viewer_data(args[:name])
puts JSON.pretty_generate(viewer_data)
end
desc "Find pets that were, last we saw, of the given color and species"