Created
February 16, 2012 22:57
-
-
Save practicingruby/1848551 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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