about summary refs log tree commit diff stats
path: root/lib/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/.keep0
-rw-r--r--lib/tasks/wittle_tasks.rake8
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/tasks/.keep b/lib/tasks/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lib/tasks/.keep
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 @@
1namespace :wittle do 1namespace :wittle do
2 desc "Generate new puzzles for the day" 2 desc "Generate new puzzles for the day"
3 task :generate_puzzles => :environment do 3 task :generate_puzzles => :environment do
4 Wittle::Puzzle.create(data: WittleGenerator.new.generate_easy, category: :normal) 4 require "wittle_generator"
5 Wittle::Puzzle.create(data: WittleGenerator.new.generate_medium, category: :hard) 5
6 Wittle::Puzzle.create(data: WittleGenerator.new.generate_expert, category: :expert) 6 Puzzle.create(data: WittleGenerator.new.generate_easy, category: :normal)
7 Puzzle.create(data: WittleGenerator.new.generate_medium, category: :hard)
8 Puzzle.create(data: WittleGenerator.new.generate_expert, category: :expert)
7 end 9 end
8end 10end