 
 glob = require 'glob'
 fs = require 'fs'
-clone = require 'clone'
 protagonist = require 'protagonist'
 async = require 'async'
 request = require 'request'

          return callback({message: "Blueprint file or files not found on path: '#{config.options.path}'"}, stats)

        # remove duplicate filenames
        config.files = config.files.filter (item, pos) ->
          return config.files.indexOf(item) == pos
        cb()


    # load all files
    loadFiles = (cb) ->


CONNECTION_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE']

removeDuplicates = (arr) ->
  arr.reduce (alreadyProcessed, currentItem) ->
    if alreadyProcessed.indexOf(currentItem) is -1
      return alreadyProcessed.concat currentItem
    return alreadyProcessed
  , []

class Dredd
  constructor: (config) ->
    @tests = []
    @stats =
      tests: 0
      failures: 0
      errors: 0
      passes: 0
      skipped: 0
      start: 0
      end: 0
      duration: 0

    @configuration = applyConfiguration(config, @stats)
    @configuration.options ?= {}

    configureReporters @configuration, @stats, @tests
    @runner = new Runner @configuration

