lib/tasks/api.rake in apirunner-0.5.0 vs lib/tasks/api.rake in apirunner-0.5.5
- old
+ new
@@ -1,8 +1,15 @@
+if defined?(Rails) and Rails.version.match(/^2.+$/)
+ APIRUNNER_ROOT = File.dirname(__FILE__).to_s + "/../../"
+ TEST_EXAMPLES_PATH = APIRUNNER_ROOT + "examples/test/api_runner"
+ CONFIG_EXAMPLE_PATH = APIRUNNER_ROOT + "examples/config"
+end
+
begin
config = YAML.load_file("#{Rails.root}/config/api_runner.yml")
rescue
end
+
namespace :api do
namespace :run do
config.delete_if{ |key| key == "general" }.each_key do |env|
desc "runs a series of nessecary api calls and parses their response in environment #{env}"
task env.to_sym => :environment do