Sha256: 4bf4bc2f579596a1baa00aee96c5e43731164a150072fd57a6e1f12cfff341ec

Contents?: true

Size: 1.2 KB

Versions: 8

Compression:

Stored size: 1.2 KB

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_save_queue_report
        raise NotImplementedError
      end

      def bind_tracker_reset
        raise NotImplementedError
      end

      def bind_before_queue_hook
        raise NotImplementedError
      end

      def bind_queue_mode
        bind_tracker_reset
        bind_before_queue_hook
        bind_time_tracker
        bind_save_queue_report
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
knapsack_pro-1.0.1 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-1.0.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.57.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.56.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.55.2 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.55.1 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.55.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.54.0 lib/knapsack_pro/adapters/base_adapter.rb