Sha256: 762fc48f9fbf4165bc4597077c0091842ff97a7bf8a6144cac029ccf50c19a1e
Contents?: true
Size: 948 Bytes
Versions: 6
Compression:
Stored size: 948 Bytes
Contents
require 'roo_on_rails/checks/base' require 'thor' module RooOnRails module Checks module Sidekiq class Sidekiq < Base WORKER_PROCFILE_LINE = 'worker: bundle exec roo_on_rails sidekiq'.freeze def intro 'Checking Sidekiq Setup...' end def call unless ENV.fetch('SIDEKIQ_ENABLED', 'true').to_s =~ /\A(YES|TRUE|ON|1)\Z/i pass 'SIDEKIQ_ENABLED is set to false' return end check_for_procfile end def fix if File.exist?('Procfile') append_to_file 'Procfile', "\n#{WORKER_PROCFILE_LINE}" else create_file 'Procfile', WORKER_PROCFILE_LINE end end def check_for_procfile return if File.exist?('Procfile') && File.read('Procfile').include?('worker') fail! "No Procfile found with a 'worker' command" end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems