Sha256: 807a971969be04e459ff3a1aa7aa9bedbc8903d870a5b586bd7ac59427944a9e

Contents?: true

Size: 956 Bytes

Versions: 14

Compression:

Stored size: 956 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.info('Test suite time execution recording enabled.')
          bind_time_tracker
          bind_save_report
        end

        if KnapsackPro::Config::Env.queue_recording_enabled?
          KnapsackPro.logger.info('Test suite time execution queue recording enabled.')
          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
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
knapsack_pro-0.30.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.29.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.28.1 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.28.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.27.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.26.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.25.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.24.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.23.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.22.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.21.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.20.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.19.0 lib/knapsack_pro/adapters/base_adapter.rb
knapsack_pro-0.18.0 lib/knapsack_pro/adapters/base_adapter.rb