From e3228eb9674ac0340ce26cd826c21477b73806ef Mon Sep 17 00:00:00 2001 From: Patrick Meier Date: Wed, 14 Jan 2015 13:25:13 +0100 Subject: [PATCH] add json format option Signed-off-by: Patrick Meier --- README.md | 2 +- Rakefile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0462ab7..e5f4c2e 100644 --- a/README.md +++ b/README.md @@ -39,5 +39,5 @@ bundle exec rake serverspec:default target_host= ASK_LOGIN_PASSWORD=true bundle exec rake serverspec:default target_host=192.168.1.222 user=stack ``` -add `format=html` to get a report.html document +add `format=html|json` to get a report.html or report.json document diff --git a/Rakefile b/Rakefile index a06b576..3bc2908 100644 --- a/Rakefile +++ b/Rakefile @@ -37,6 +37,7 @@ namespace :serverspec do desc "Run serverspec suite #{suite}" ServerspecTask.new(suite.to_sym) do |t| t.rspec_opts = '--no-color --format html --out report.html' if ENV['format'] == 'html' + t.rspec_opts = '--no-color --format json --out report.json' if ENV['format'] == 'json' t.target = ENV['TARGET_HOST'] || ENV['target_host'] t.ruby_opts = "-I #{suite}/serverspec" t.pattern = "#{suite}/serverspec/*_spec.rb"