From 22ecb41d0f129a9c96e52ed1e5da7a4a0f5b73d4 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 30 Nov 2023 15:25:16 -0500 Subject: Schedule new puzzles daily --- 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 0ad3954..e183bdc 100644 --- a/Gemfile +++ b/Gemfile @@ -90,3 +90,4 @@ gem "enumerize" gem "sassc-rails" gem "jquery-rails" gem "rake-compiler" +gem 'whenever', "~> 1.0.0", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 0d907ae..4397b84 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -109,6 +109,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) + chronic (0.10.2) concurrent-ruby (1.2.2) connection_pool (2.4.1) crass (1.0.6) @@ -277,6 +278,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) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.6.12) @@ -313,6 +316,7 @@ DEPENDENCIES terser (~> 1.1.19) tzinfo-data web-console + whenever (~> 1.0.0) RUBY VERSION ruby 3.2.2p53 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