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
avm-eac_rails_base1-0.9.2 lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.74.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.74.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.73.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.72.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
avm-eac_rails_base1-0.9.1 lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.70.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
avm-eac_rails_base1-0.9.0 lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.70.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.69.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.69.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.68.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.67.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.67.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.66.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.65.1 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.65.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.64.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
eac_tools-0.63.0 sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
avm-eac_rails_base1-0.8.4 lib/avm/eac_rails_base1/sources/base.rb