Sha256: fe511142ec1ec82eac1ca69f30427081ef2d3794e1de86b7dc1ee5768e5231b1

Contents?: true

Size: 721 Bytes

Versions: 47

Compression:

Stored size: 721 Bytes

Contents

Inferno::Application.boot(:suites) do
  init do
    use :logging

    files_to_load = Dir.glob(File.join(Dir.pwd, 'lib', '*.rb'))

    if ENV['LOAD_DEV_SUITES'].present?
      ENV['LOAD_DEV_SUITES'].split(',').map(&:strip).reject(&:empty?).each do |suite|
        files_to_load.concat Dir.glob(File.join(Inferno::Application.root, 'dev_suites', suite, '**', '*.rb'))
      end
    end

    if ENV['APP_ENV'] == 'test'
      files_to_load.concat Dir.glob(File.join(Inferno::Application.root, 'spec', 'fixtures', '**', '*.rb'))
    end

    files_to_load.map! { |path| File.realpath(path) }

    files_to_load.each do |path|
      require_relative path
    end

    ObjectSpace.each_object(TracePoint, &:disable)
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
inferno_core-0.1.0 lib/inferno/config/boot/suites.rb
inferno_core-0.1.0.pre lib/inferno/config/boot/suites.rb
inferno_core-0.0.8 lib/inferno/config/boot/suites.rb
inferno_core-0.0.8.pre2 lib/inferno/config/boot/suites.rb
inferno_core-0.0.8.pre lib/inferno/config/boot/suites.rb
inferno_core-0.0.7 lib/inferno/config/boot/suites.rb
inferno_core-0.0.6 lib/inferno/config/boot/suites.rb