Sha256: 3140f07d55fd0277bd25655172258bb214ae15a7a16bccac1601501c1cd660fa

Contents?: true

Size: 543 Bytes

Versions: 6

Compression:

Stored size: 543 Bytes

Contents

# frozen_string_literal: true

require 'rails/generators'

module EIVO
  module Sidekiq
    class InstallGenerator < Rails::Generators::Base

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

      def self.namespace(name = nil)
        @namespace ||= super.sub('e_i_v_o', 'eivo')
      end

      def create_initializer_file
        copy_file 'config/sidekiq.yml'
        copy_file 'app/jobs/application_job.rb'
        append_to_file 'Procfile', "worker: bundle exec sidekiq -C config/sidekiq.yml\n"
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
eivo-rails-sidekiq-0.1.5 lib/generators/eivo/sidekiq/install_generator.rb
eivo-rails-sidekiq-0.1.4 lib/generators/eivo/sidekiq/install_generator.rb
eivo-rails-sidekiq-0.1.3 lib/generators/eivo/sidekiq/install_generator.rb
eivo-rails-sidekiq-0.1.2 lib/generators/eivo/sidekiq/install_generator.rb
eivo-rails-sidekiq-0.1.1 lib/generators/eivo/sidekiq/install_generator.rb
eivo-rails-sidekiq-0.1.0 lib/generators/eivo/sidekiq/install_generator.rb