From 01d74535e0cf0dc66da41afb02ee44c2b920e4c6 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 30 Oct 2023 14:39:21 -0400 Subject: Scheduled daily new Wittle puzzles --- Capfile | 1 + Gemfile | 1 + Gemfile.lock | 4 ++++ config/schedule.rb | 3 +++ 4 files changed, 9 insertions(+) create mode 100644 config/schedule.rb diff --git a/Capfile b/Capfile index 1ace4ce..8915892 100644 --- a/Capfile +++ b/Capfile @@ -14,6 +14,7 @@ require "capistrano/bundler" require "capistrano/rails/assets" require "capistrano/rails/migrations" require "capistrano/passenger" +require "whenever/capistrano" # Load custom tasks from `lib/capistrano/tasks` if you have any defined Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } diff --git a/Gemfile b/Gemfile index 88a4899..2aec2a4 100644 --- a/Gemfile +++ b/Gemfile @@ -85,3 +85,4 @@ gem "image_processing", ">= 1.2" gem "meta-tags" gem 'rails_autolink' gem 'wittle', git: "https://git.fourisland.com/wittle", branch: "main" +gem 'whenever', "~> 1.0.0", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 29af576..0e4154a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -158,6 +158,7 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (>= 2.0, < 4.0) + chronic (0.10.2) climate_control (0.2.0) coffee-rails (4.2.2) coffee-script (>= 2.2.0) @@ -392,6 +393,8 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) + whenever (1.0.0) + chronic (>= 0.6.3) will_paginate (4.0.0) xpath (3.2.0) nokogiri (~> 1.8) @@ -445,6 +448,7 @@ DEPENDENCIES uglifier (>= 1.3.0) web-console (>= 3.3.0) webrick (~> 1.7) + whenever (~> 1.0.0) will_paginate (~> 4.0) wittle! diff --git a/config/schedule.rb b/config/schedule.rb new file mode 100644 index 0000000..987b14a --- /dev/null +++ b/config/schedule.rb @@ -0,0 +1,3 @@ +every 1.day, at: "12:00am" do + rake "wittle:generate_puzzles" +end -- cgit 1.4.1