Sha256: 29e101780b4992c8a86f079ef3c4ba0e485c827f6b06ba843b45fc7b7c29cca3

Contents?: true

Size: 710 Bytes

Versions: 33

Compression:

Stored size: 710 Bytes

Contents

# frozen_string_literal: true

require 'avm/patches/eac_ruby_gems_utils/gem'

module Avm
  module Sources
    class Configuration < ::EacConfig::OldConfigs
      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

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
avm-tools-0.116.2 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-0.18.1 lib/avm/sources/configuration/_tests.rb
avm-0.18.0 lib/avm/sources/configuration/_tests.rb
avm-tools-0.116.1 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-tools-0.116.0 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-0.17.0 lib/avm/sources/configuration/_tests.rb
avm-tools-0.115.0 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-0.16.0 lib/avm/sources/configuration/_tests.rb
avm-tools-0.114.2 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-0.15.0 lib/avm/sources/configuration/_tests.rb
avm-tools-0.114.1 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-tools-0.114.0 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-tools-0.113.6 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-0.14.0 lib/avm/sources/configuration/_tests.rb
avm-tools-0.113.5 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-0.13.0 lib/avm/sources/configuration/_tests.rb
avm-tools-0.113.4 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-0.12.1 lib/avm/sources/configuration/_tests.rb
avm-tools-0.113.3 sub/avm/lib/avm/sources/configuration/_tests.rb
avm-0.12.0 lib/avm/sources/configuration/_tests.rb