From 0929719a845897cc8567cf972e07a69a71f0fa6f Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 30 Nov 2023 13:29:08 -0500 Subject: Migrate to a full rails app --- lib/tasks/.keep | 0 lib/tasks/wittle_tasks.rake | 8 +++++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 lib/tasks/.keep (limited to 'lib/tasks') diff --git a/lib/tasks/.keep b/lib/tasks/.keep new file mode 100644 index 0000000..e69de29 diff --git a/lib/tasks/wittle_tasks.rake b/lib/tasks/wittle_tasks.rake index b9300c7..1be45e2 100644 --- a/lib/tasks/wittle_tasks.rake +++ b/lib/tasks/wittle_tasks.rake @@ -1,8 +1,10 @@ namespace :wittle do desc "Generate new puzzles for the day" task :generate_puzzles => :environment do - Wittle::Puzzle.create(data: WittleGenerator.new.generate_easy, category: :normal) - Wittle::Puzzle.create(data: WittleGenerator.new.generate_medium, category: :hard) - Wittle::Puzzle.create(data: WittleGenerator.new.generate_expert, category: :expert) + require "wittle_generator" + + Puzzle.create(data: WittleGenerator.new.generate_easy, category: :normal) + Puzzle.create(data: WittleGenerator.new.generate_medium, category: :hard) + Puzzle.create(data: WittleGenerator.new.generate_expert, category: :expert) end end -- cgit 1.4.1