Sha256: 7fc159a130e12afbdc39a7e1f5e24c1392580d645ec19176d672ac30f2a5ee16

Contents?: true

Size: 823 Bytes

Versions: 16

Compression:

Stored size: 823 Bytes

Contents

module ConfigHelpers
  def project_fixture_path
    File.expand_path(
      File.join(File.dirname(__FILE__), "../fixtures/projects/valid")
    )
  end
  module_function :project_fixture_path

  def project_fixture_config( # rubocop:disable Metrics/ParameterLists
    env = "production",
    initial_config = {},
    logger = Appsignal.internal_logger,
    config_file = nil
  )
    Appsignal::Config.new(
      project_fixture_path,
      env,
      initial_config,
      logger,
      config_file
    )
  end
  module_function :project_fixture_config, :project_fixture_path

  def start_agent(env = "production")
    Appsignal._config = project_fixture_config(env)
    Appsignal.start
  end

  def clear_integration_env_vars!
    ENV.delete("RAILS_ENV")
    ENV.delete("RACK_ENV")
    ENV.delete("PADRINO_ENV")
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
appsignal-3.13.1-java spec/support/helpers/config_helpers.rb
appsignal-3.13.1 spec/support/helpers/config_helpers.rb
appsignal-3.13.1.alpha.1-java spec/support/helpers/config_helpers.rb
appsignal-3.13.1.alpha.1 spec/support/helpers/config_helpers.rb
appsignal-3.13.0-java spec/support/helpers/config_helpers.rb
appsignal-3.13.0 spec/support/helpers/config_helpers.rb
appsignal-3.12.6-java spec/support/helpers/config_helpers.rb
appsignal-3.12.6 spec/support/helpers/config_helpers.rb
appsignal-3.12.5-java spec/support/helpers/config_helpers.rb
appsignal-3.12.5 spec/support/helpers/config_helpers.rb
appsignal-3.12.4-java spec/support/helpers/config_helpers.rb
appsignal-3.12.4 spec/support/helpers/config_helpers.rb
appsignal-3.12.3-java spec/support/helpers/config_helpers.rb
appsignal-3.12.3 spec/support/helpers/config_helpers.rb
appsignal-3.12.2-java spec/support/helpers/config_helpers.rb
appsignal-3.12.2 spec/support/helpers/config_helpers.rb