Sha256: dcc92e03cfb263360d95486f86571883edfc4e3020bc2dcefd5fce9178d4fc6f

Contents?: true

Size: 1.14 KB

Versions: 8

Compression:

Stored size: 1.14 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_tracker_reset
          bind_before_queue_hook
          bind_time_tracker
          bind_save_queue_report
        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
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
knapsack_pro-0.53.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.52.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.51.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.50.1 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.50.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.49.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.48.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.47.0 lib/knapsack_pro/adapters/base_adapter.rb