Sha256: d4ff51b765af3c33129d771d6c8942bebf8bfbbf8b67ec66682045f0ad8e02a1

Contents?: true

Size: 712 Bytes

Versions: 51

Compression:

Stored size: 712 Bytes

Contents

# frozen_string_literal: true

require 'avm/patches/eac_ruby_gems_utils/gem'

module Avm
  module Instances
    class Configuration < ::EacRubyUtils::Configs
      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

51 entries across 51 versions & 1 rubygems

Version Path
avm-tools-0.96.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.95.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.94.3 lib/avm/instances/configuration/_tests.rb
avm-tools-0.94.2 lib/avm/instances/configuration/_tests.rb
avm-tools-0.94.1 lib/avm/instances/configuration/_tests.rb
avm-tools-0.94.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.93.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.92.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.91.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.90.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.89.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.88.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.87.1 lib/avm/instances/configuration/_tests.rb
avm-tools-0.87.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.86.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.85.1 lib/avm/instances/configuration/_tests.rb
avm-tools-0.85.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.84.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.83.0 lib/avm/instances/configuration/_tests.rb
avm-tools-0.82.1 lib/avm/instances/configuration/_tests.rb