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-16.0.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.8.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-14.5.2 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.7.1 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.7.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.6.1 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.6.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.5.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.4.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.3.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.2.2 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.2.1 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.2.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.1.2 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.1.1 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.1.0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.1.0.rc0 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.1.0.beta6 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.1.0.beta5 lib/generators/pageflow/resque/resque_generator.rb
pageflow-15.1.0.beta4 lib/generators/pageflow/resque/resque_generator.rb