Sha256: 9e966d14ff7f395b46cacc9c9248805c3da7e3e33fe6e37e3e578b49a0bc66a3

Contents?: true

Size: 766 Bytes

Versions: 17

Compression:

Stored size: 766 Bytes

Contents

# frozen_string_literal: true

require 'avm/patches/eac_ruby_gems_utils/gem'

module Avm
  module Apps
    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
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
avm-tools-0.106.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-apps-0.4.1 lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.105.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.104.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.103.1 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.103.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-apps-0.4.0 lib/avm/apps/sources/configuration/_tests.rb
ehbrs-tools-0.22.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.102.2 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.102.1 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.102.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-apps-0.3.0 lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.101.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.100.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.99.1 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb
avm-apps-0.2.1 lib/avm/apps/sources/configuration/_tests.rb
avm-tools-0.99.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb