Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to define the output directory for cobertura xml reports. #37

Merged
merged 4 commits into from
Nov 10, 2014
Merged

Conversation

jkrumow
Copy link
Collaborator

@jkrumow jkrumow commented Nov 9, 2014

The output directory can now be defined via property output_directory in the .slather.yml file or the commandline option --output-directory.

Relates to issue #35

Regards
tarbrain.

@yas375
Copy link

yas375 commented Nov 9, 2014

Awesome! @tarbrain, thanks for doing this! 👍

FileUtils.mkdir_p(output_directory) unless File.exists?(output_directory)
output_file = "#{output_directory}/#{output_file}"
end
File.open(output_file, 'w') { |file| file.write(report.to_s) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to not use File.write(output_file, report.to_s)?

@kylef
Copy link
Contributor

kylef commented Nov 9, 2014

Perfect, thanks for the pull-request 👌.

@marklarr
Copy link
Contributor

Super cool!

marklarr added a commit that referenced this pull request Nov 10, 2014
Add an option to define the output directory for cobertura xml reports.
@marklarr marklarr merged commit d3e18c1 into SlatherOrg:master Nov 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants