Skip to content

Instantly share code, notes, and snippets.

@practicingruby
Created February 16, 2012 22:57
Show Gist options
  • Select an option

  • Save practicingruby/1848551 to your computer and use it in GitHub Desktop.

Select an option

Save practicingruby/1848551 to your computer and use it in GitHub Desktop.
module Newman
Runner = Object.new
class << Runner
def from_file(filename, config)
self.basepath = File.dirname(filename)
self.config = config
eval(File.read(filename), binding)
end
def run(apps)
Newman::Server.simple(apps, config)
end
def require_relative(path)
require "#{File.dirname(basepath)}/#{path}"
end
private
attr_accessor :config, :basepath
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment