Sha256: af3f9c6de28db796f2a49465765fcb4c7842909972256185b0d4cd6e5cd140e9

Contents?: true

Size: 1.02 KB

Versions: 137

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

require 'avm/eac_ruby_base1/sources/base'
require 'eac_ruby_utils/core_ext'

module Avm
  module EacRailsBase1
    module Sources
      class Base < ::Avm::EacRubyBase1::Sources::Base
        CONFIG_RU_SUBPATH = 'config.ru'
        EAC_RAILS_BASE1_TEST_NAME = 'eac_rails_base1'
        RAKE_TEST_COMMAND_DEFAULT_TASK_NAME = 'test'
        SUBS_PATHS_DEFAULT = ['sub/*/*'].freeze

        def config_ru_path
          path.join(CONFIG_RU_SUBPATH)
        end

        def default_test_commands
          {
            EAC_RAILS_BASE1_TEST_NAME => eac_rails_base1_test_command
          }
        end

        def eac_rails_base1_test_command
          rake_test_command
        end

        def rake_test_command(task_name = RAKE_TEST_COMMAND_DEFAULT_TASK_NAME)
          rake(task_name).chdir_root.envvar('RAILS_ENV', 'test')
        end

        def subs_paths_default
          SUBS_PATHS_DEFAULT
        end

        def valid?
          super && config_ru_path.exist?
        end
      end
    end
  end
end

Version data entries

137 entries across 137 versions & 2 rubygems

Version Path
eac_tools-0.55.3 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.55.2 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.55.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.55.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.54.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.53.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.52.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.51.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.50.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.49.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.48.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
avm-eac_rails_base1-0.8.0 lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.48.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.47.2 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.47.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.47.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
avm-eac_rails_base1-0.7.1 lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.46.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.45.2 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.45.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb