Sha256: 93aa54b7cf69b8c512374a4637fbed600d04b26e27bf4953d5a30e7d5e6135f9

Contents?: true

Size: 1017 Bytes

Versions: 29

Compression:

Stored size: 1017 Bytes

Contents

module KnapsackPro
  module Adapters
    class BaseAdapter
      # Just example, please overwrite constant in subclass
      TEST_DIR_PATTERN = 'test/**{,/*/**}/*_test.rb'

      def self.bind
        adapter = new
        adapter.bind
        adapter
      end

      def bind
        if KnapsackPro::Config::Env.recording_enabled?
          KnapsackPro.logger.debug('Test suite time execution recording enabled.')
          bind_time_tracker
          bind_save_report
        end

        if KnapsackPro::Config::Env.queue_recording_enabled?
          KnapsackPro.logger.debug('Test suite time execution queue recording enabled.')
          bind_queue_mode
        end
      end

      def bind_time_tracker
        raise NotImplementedError
      end

      def bind_save_report
        raise NotImplementedError
      end

      def bind_before_queue_hook
        raise NotImplementedError
      end

      def bind_queue_mode
        bind_before_queue_hook
        bind_time_tracker
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
knapsack_pro-1.20.2 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.20.1 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.20.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.19.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.18.2 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.18.1 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.18.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.17.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.16.1 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.16.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.15.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.14.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.13.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.12.1 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.12.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.11.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.10.1 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.10.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.9.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.8.0 lib/knapsack_pro/adapters/base_adapter.rb