Sha256: b1fc52b17a7ca9388cd877ad5b65b4347abe88d18d46206bf287b3ffdaab29dd

Contents?: true

Size: 767 Bytes

Versions: 9

Compression:

Stored size: 767 Bytes

Contents

# frozen_string_literal: true

require 'avm/patches/eac_ruby_gems_utils/gem'

module Avm
  module Sources
    class Configuration < ::EacConfig::OldConfigs
      module Tests
        BUNDLE_TEST_COMMAND_KEY = 'test.bundle_command'
        TEST_COMMAND_KEY = 'test.command'

        def any_test_command
          bundle_test_command || test_command
        end

        def test_command
          read_command(TEST_COMMAND_KEY)
        end

        def bundle_test_command
          read_entry(BUNDLE_TEST_COMMAND_KEY).if_present do |v|
            args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
            ::EacRubyGemsUtils::Gem.new(::File.dirname(storage_path)).bundle(*args).chdir_root
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
avm-0.21.0 lib/avm/sources/configuration/tests.rb
avm-tools-0.119.0 sub/avm/lib/avm/sources/configuration/tests.rb
avm-0.20.0 lib/avm/sources/configuration/tests.rb
avm-tools-0.118.0 sub/avm/lib/avm/sources/configuration/tests.rb
avm-tools-0.117.3 sub/avm/lib/avm/sources/configuration/tests.rb
avm-tools-0.117.2 sub/avm/lib/avm/sources/configuration/tests.rb
avm-tools-0.117.1 sub/avm/lib/avm/sources/configuration/tests.rb
avm-0.19.0 lib/avm/sources/configuration/tests.rb
avm-tools-0.117.0 sub/avm/lib/avm/sources/configuration/tests.rb