Sha256: 44e5ca57e1ac5fc67acc4bcb6cece6c9e0ffa06a61a35c5aaa13cc9ec84fc99c

Contents?: true

Size: 686 Bytes

Versions: 61

Compression:

Stored size: 686 Bytes

Contents

require 'rails/generators'

module Pageflow
  module Generators
    class ResqueGenerator < Rails::Generators::Base
      desc "Configure resque for pageflow."

      source_root File.expand_path("../templates", __FILE__)

      def create_initializers
        template 'resque.rb', 'config/initializers/resque.rb'
        template 'resque_enqueue_after_commit_patch.rb', 'config/initializers/resque_enqueue_after_commit_patch.rb'
        template 'resque.rake', 'lib/tasks/resque.rake'

        inject_into_file 'config/application.rb', after: "config.load_defaults 5.2\n" do
          <<-RUBY
    config.active_job.queue_adapter = :resque
RUBY
        end
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
pageflow-13.0.0.beta1 lib/generators/pageflow/resque/resque_generator.rb