Sha256: 55d49dd52b38654c7692814bcdf670ef79f467b989072a043c3166552242cd27

Contents?: true

Size: 680 Bytes

Versions: 1

Compression:

Stored size: 680 Bytes

Contents

module Initial
  class SidekiqGenerator < Rails::Generators::Base
    def add_gems
      gem 'sidekiq'
      gem 'sidetiq'

      Bundler.with_clean_env do
        run "bundle install"
      end

      copy_file 'sidekiq/_sidekiq_example_worker.rb',
                'app/workers/_sidekiq_example_worker.rb'
      copy_file 'sidekiq/_sidetiq_example_worker.rb',
                'app/workers/_sidetiq_example_worker.rb'


      prepend_to_file "app/config/routes.rb",
                       %q{
require 'sidekiq/web'
require 'sidetiq/web'
                         }

                         route %q{
  mount Sidekiq::Web => '/sidekiq'
                         }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
teleporter-1.1.0 lib/generators/initial/sidekiq.rb