Sha256: fe2081d22f1822755bddb3468b9f3c69c40cfccbb6ada55ad1b06cdd26513bc0

Contents?: true

Size: 535 Bytes

Versions: 9

Compression:

Stored size: 535 Bytes

Contents

class GemInstallerJob < ApplicationJob
  queue_as :default

  def perform(gem_name, version = nil)
    SuckerPunch.logger.info "install #{gem_name} #{version}"
    pl = Plugin.new(gem_name: gem_name, version: version)
    begin
      # NOTE: uninstall all versions of `gem_name` then install it for upgrade/downgrade
      pl.uninstall! if pl.installed?
      pl.install!
      logger.info "installed #{gem_name} #{version}"
    rescue Plugin::GemError
      logger.warn "installing #{gem_name} #{version} is failed"
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fluentd-ui-1.2.1 app/jobs/gem_installer_job.rb
fluentd-ui-1.2.0 app/jobs/gem_installer_job.rb
fluentd-ui-1.1.0 app/jobs/gem_installer_job.rb
fluentd-ui-1.0.1 app/jobs/gem_installer_job.rb
fluentd-ui-1.0.0 app/jobs/gem_installer_job.rb
fluentd-ui-1.0.0.beta.1 app/jobs/gem_installer_job.rb
fluentd-ui-1.0.0.alpha.3 app/jobs/gem_installer_job.rb
fluentd-ui-1.0.0.alpha.2 app/jobs/gem_installer_job.rb
fluentd-ui-1.0.0.alpha.1 app/jobs/gem_installer_job.rb