Sha256: f049c0d8fa4321a3e678710a8cc9c8cc954db22a2a4443c2d0f613d49771b36f

Contents?: true

Size: 593 Bytes

Versions: 8

Compression:

Stored size: 593 Bytes

Contents

# frozen_string_literal: true

module SidekiqAlive
  module Helpers
    class << self
      def sidekiq_7
        current_sidekiq_version >= Gem::Version.new("7")
      end

      def sidekiq_6
        current_sidekiq_version >= Gem::Version.new("6") &&
          current_sidekiq_version < Gem::Version.new("7")
      end

      def sidekiq_5
        current_sidekiq_version >= Gem::Version.new("5") &&
          current_sidekiq_version < Gem::Version.new("6")
      end

      private

      def current_sidekiq_version
        Gem.loaded_specs["sidekiq"].version
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sidekiq_alive-2.3.1 lib/sidekiq_alive/helpers.rb
sidekiq_alive-2.3.0 lib/sidekiq_alive/helpers.rb
sidekiq_alive-2.2.3 lib/sidekiq_alive/helpers.rb
sidekiq_alive-2.2.2 lib/sidekiq_alive/helpers.rb
sidekiq_alive-2.2.1 lib/sidekiq_alive/helpers.rb
sidekiq_alive-2.2.0 lib/sidekiq_alive/helpers.rb
sidekiq_alive-2.1.9 lib/sidekiq_alive/helpers.rb
sidekiq_alive-2.1.8 lib/sidekiq_alive/helpers.rb