Sha256: d4c1e1113b13721f922a19251b068c76e5b291130250be058ec09519e9e007c1
Contents?: true
Size: 1.55 KB
Versions: 4
Compression:
Stored size: 1.55 KB
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 rails_project_fixture_path File.expand_path( File.join(File.dirname(__FILE__), "../fixtures/projects/valid_with_rails_app") ) end module_function :rails_project_fixture_path def project_fixture_config( env = "production", options = {}, logger = Appsignal.internal_logger ) Appsignal::Config.new( project_fixture_path, env, logger ).tap do |c| c.merge_dsl_options(options) c.validate end end module_function :project_fixture_config def build_config( root_path: project_fixture_path, env: "production", options: {}, logger: Appsignal.internal_logger ) Appsignal::Config.new( root_path, env, logger ).tap do |c| c.merge_dsl_options(options) if options.any? c.validate end end module_function :build_config def start_agent(env: "production", options: {}, internal_logger: nil) env = "production" if env == :default env ||= "production" Appsignal.configure(env, :root_path => project_fixture_path) do |config| options.each do |option, value| config.send("#{option}=", value) end end Appsignal.start Appsignal.internal_logger = internal_logger if internal_logger end def clear_integration_env_vars! ENV.delete("RAILS_ENV") ENV.delete("RACK_ENV") ENV.delete("PADRINO_ENV") end end
Version data entries
4 entries across 4 versions & 1 rubygems