Sha256: 0113bcd3c9f10fae084f78311d626b8799f6f86a4d23d57f45264b7118eabd18

Contents?: true

Size: 1.3 KB

Versions: 135

Compression:

Stored size: 1.3 KB

Contents

module DependencyHelper
  module_function

  def running_jruby?
    defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
  end

  def rails_present?
    dependency_present? "rails"
  end

  def sequel_present?
    dependency_present? "sequel"
  end

  def resque_present?
    dependency_present? "resque"
  end

  def redis_present?
    dependency_present? "redis"
  end

  def action_cable_present?
    dependency_present? "actioncable"
  end

  def active_job_present?
    dependency_present? "activejob"
  end

  def active_support_present?
    dependency_present? "activesupport"
  end

  def sinatra_present?
    dependency_present? "sinatra"
  end

  def padrino_present?
    dependency_present? "padrino"
  end

  def grape_present?
    dependency_present? "grape"
  end

  def webmachine_present?
    dependency_present? "webmachine"
  end

  def capistrano_present?
    dependency_present? "capistrano"
  end

  def capistrano2_present?
    capistrano_present? &&
      Gem.loaded_specs["capistrano"].version < Gem::Version.new("3.0")
  end

  def capistrano3_present?
    capistrano_present? &&
      Gem.loaded_specs["capistrano"].version >= Gem::Version.new("3.0")
  end

  def que_present?
    dependency_present? "que"
  end

  def dependency_present?(dependency_file)
    Gem.loaded_specs.key? dependency_file
  end
end

Version data entries

135 entries across 135 versions & 1 rubygems

Version Path
appsignal-2.10.9.beta.1-java spec/support/helpers/dependency_helper.rb
appsignal-2.10.9.beta.1 spec/support/helpers/dependency_helper.rb
appsignal-2.10.8 spec/support/helpers/dependency_helper.rb
appsignal-2.10.8-java spec/support/helpers/dependency_helper.rb
appsignal-2.10.7-java spec/support/helpers/dependency_helper.rb
appsignal-2.10.7 spec/support/helpers/dependency_helper.rb
appsignal-2.10.6-java spec/support/helpers/dependency_helper.rb
appsignal-2.10.6 spec/support/helpers/dependency_helper.rb
appsignal-2.10.6.beta.1-java spec/support/helpers/dependency_helper.rb
appsignal-2.10.6.beta.1 spec/support/helpers/dependency_helper.rb
appsignal-2.10.5-java spec/support/helpers/dependency_helper.rb
appsignal-2.10.5 spec/support/helpers/dependency_helper.rb
appsignal-2.10.4 spec/support/helpers/dependency_helper.rb
appsignal-2.10.4-java spec/support/helpers/dependency_helper.rb
appsignal-2.10.3-java spec/support/helpers/dependency_helper.rb
appsignal-2.10.3 spec/support/helpers/dependency_helper.rb
appsignal-2.10.2-java spec/support/helpers/dependency_helper.rb
appsignal-2.10.2 spec/support/helpers/dependency_helper.rb
appsignal-2.10.1-java spec/support/helpers/dependency_helper.rb
appsignal-2.10.1 spec/support/helpers/dependency_helper.rb