Skip to content

Commit a517ad6

Browse files
committed
Merge pull request #26 from atomic111/master
add json format option
2 parents 1a1b8f5 + 9852f10 commit a517ad6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ bundle exec rake serverspec:default target_host=<name-or-ip-of-target-server>
4040
ASK_LOGIN_PASSWORD=true bundle exec rake serverspec:default target_host=192.168.1.222 user=stack
4141
```
4242

43-
add `format=html` to get a report.html document
43+
add `format=html|json` to get a report.html or report.json document
4444

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ namespace :serverspec do
3737
desc "Run serverspec suite #{suite}"
3838
ServerspecTask.new(suite.to_sym) do |t|
3939
t.rspec_opts = '--no-color --format html --out report.html' if ENV['format'] == 'html'
40+
t.rspec_opts = '--no-color --format json --out report.json' if ENV['format'] == 'json'
4041
t.target = ENV['TARGET_HOST'] || ENV['target_host']
4142
t.ruby_opts = "-I #{suite}/serverspec"
4243
t.pattern = "#{suite}/serverspec/*_spec.rb"

0 commit comments

Comments
 (0)