Sha256: 719518abead17b9c01bd07b592fbdf69c9b80ec0ed40beeb9f80c7c10c0ae42d

Contents?: true

Size: 685 Bytes

Versions: 7

Compression:

Stored size: 685 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 .*\n/ do
          <<-RUBY
    config.active_job.queue_adapter = :resque
RUBY
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pageflow-17.0.4 lib/generators/pageflow/resque/resque_generator.rb
pageflow-17.0.3 lib/generators/pageflow/resque/resque_generator.rb
pageflow-17.0.2 lib/generators/pageflow/resque/resque_generator.rb
pageflow-17.0.1 lib/generators/pageflow/resque/resque_generator.rb
pageflow-17.0.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-16.2.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-16.1.0 lib/generators/pageflow/resque/resque_generator.rb